Skip to content

Commit

Permalink
rename to is_replicated_deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
anniehedgpeth committed Sep 21, 2023
1 parent f398ea1 commit 1377b0c
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 73 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/handler-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
cloud: AWS
test_name: Active/Active RHEL7 Proxy
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -42,7 +42,7 @@ jobs:
cloud: AWS
test_name: Public Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -59,7 +59,7 @@ jobs:
cloud: AWS
test_name: Private Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -76,7 +76,7 @@ jobs:
cloud: AWS
test_name: Private TCP Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -93,7 +93,7 @@ jobs:
cloud: AWS
test_name: Standalone Vault
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -117,7 +117,7 @@ jobs:
cloud: AWS
test_name: Active/Active RHEL7 Proxy (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -141,7 +141,7 @@ jobs:
cloud: AWS
test_name: Public Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -159,7 +159,7 @@ jobs:
cloud: AWS
test_name: Private Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -177,7 +177,7 @@ jobs:
cloud: AWS
test_name: Private TCP Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand All @@ -195,7 +195,7 @@ jobs:
cloud: AWS
test_name: Standalone Vault (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
pull_request_ref: ${{ github.event.client_payload.pull_request.head.sha }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/handler-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
test_name: Active/Active RHEL7 Proxy
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -41,7 +41,7 @@ jobs:
with:
test_name: Public Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -58,7 +58,7 @@ jobs:
with:
test_name: Private Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -75,7 +75,7 @@ jobs:
with:
test_name: Private TCP Active/Active
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -92,7 +92,7 @@ jobs:
with:
test_name: Standalone Vault
utility_test: false
is_legacy_deployment: false
is_replicated_deployment: false
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -117,7 +117,7 @@ jobs:
with:
test_name: Active/Active RHEL7 Proxy (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -141,7 +141,7 @@ jobs:
with:
test_name: Public Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -159,7 +159,7 @@ jobs:
with:
test_name: Private Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -177,7 +177,7 @@ jobs:
with:
test_name: Private TCP Active/Active (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -195,7 +195,7 @@ jobs:
with:
test_name: Standalone Vault (Legacy)
utility_test: false
is_legacy_deployment: true
is_replicated_deployment: true
module_repository_id: hashicorp/terraform-aws-terraform-enterprise
k6_work_dir: ./tests/tfe-load-test
pull_request_repo_name: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand Down
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module "database" {
# ------------------------------------------------------------------------------------
module "docker_compose_config" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/docker_compose_config?ref=main"
count = var.is_legacy_deployment ? 0 : 1
count = var.is_replicated_deployment ? 0 : 1

hostname = local.fqdn
tfe_license = var.hc_license
Expand Down Expand Up @@ -168,7 +168,7 @@ module "docker_compose_config" {
# --------------------------------------------------------------------------------------------------
module "tfe_init_fdo" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/tfe_init?ref=main"
count = var.is_legacy_deployment ? 0 : 1
count = var.is_replicated_deployment ? 0 : 1

cloud = "aws"
operational_mode = var.operational_mode
Expand Down Expand Up @@ -204,7 +204,7 @@ module "tfe_init_fdo" {
# ----------------------------------------------------------------------------------------
module "settings" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/settings?ref=main"
count = var.is_legacy_deployment ? 1 : 0
count = var.is_replicated_deployment ? 1 : 0

# TFE Base Configuration
consolidated_services = var.consolidated_services
Expand Down Expand Up @@ -275,7 +275,7 @@ module "settings" {
# -----------------------------------------------------------------------------
module "tfe_init_legacy" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/tfe_init_legacy?ref=main"
count = var.is_legacy_deployment ? 1 : 0
count = var.is_replicated_deployment ? 1 : 0

# TFE & Replicated Configuration data
cloud = "aws"
Expand Down Expand Up @@ -349,10 +349,10 @@ module "vm" {
friendly_name_prefix = var.friendly_name_prefix
key_name = var.key_name
instance_type = var.instance_type
is_legacy_deployment = var.is_legacy_deployment
is_replicated_deployment = var.is_replicated_deployment
network_id = local.network_id
network_subnets_private = local.network_private_subnets
network_private_subnet_cidrs = local.network_private_subnet_cidrs
node_count = var.node_count
user_data_base64 = var.is_legacy_deployment ? module.tfe_init_legacy[0].tfe_userdata_base64_encoded : module.tfe_init_fdo[0].tfe_userdata_base64_encoded
user_data_base64 = var.is_replicated_deployment ? module.tfe_init_legacy[0].tfe_userdata_base64_encoded : module.tfe_init_fdo[0].tfe_userdata_base64_encoded
}
6 changes: 3 additions & 3 deletions modules/vm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_security_group_rule" "tfe_ui" {
}

resource "aws_security_group_rule" "vault_cluster" {
count = var.active_active && !var.is_legacy_deployment ? 1 : 0
count = var.active_active && !var.is_replicated_deployment ? 1 : 0

security_group_id = aws_security_group.tfe_instance.id
type = "ingress"
Expand Down Expand Up @@ -62,7 +62,7 @@ resource "aws_security_group_rule" "tfe_outbound" {
}

resource "aws_security_group_rule" "tfe_dashboard" {
count = !var.active_active || var.is_legacy_deployment ? 1 : 0
count = !var.active_active || var.is_replicated_deployment ? 1 : 0
security_group_id = aws_security_group.tfe_instance.id
type = "ingress"
from_port = 8800
Expand Down Expand Up @@ -119,7 +119,7 @@ resource "aws_autoscaling_group" "tfe_asg" {
max_size = var.node_count
desired_capacity = var.node_count
vpc_zone_identifier = var.network_subnets_private
target_group_arns = var.active_active || !var.is_legacy_deployment ? [var.aws_lb_target_group_tfe_tg_443_arn] : [
target_group_arns = var.active_active || !var.is_replicated_deployment ? [var.aws_lb_target_group_tfe_tg_443_arn] : [
var.aws_lb_target_group_tfe_tg_8800_arn,
var.aws_lb_target_group_tfe_tg_443_arn,
]
Expand Down
2 changes: 1 addition & 1 deletion modules/vm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variable "friendly_name_prefix" {
description = "(Required) Friendly name prefix used for tagging and naming AWS resources."
}

variable "is_legacy_deployment" {
variable "is_replicated_deployment" {
type = bool
description = "TFE will be installed using a Replicated license and deployment method."
}
Expand Down
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ output "health_check_url" {
}

output "login_url" {
value = var.is_legacy_deployment ? "https://${local.fqdn}/admin/account/new?token=${module.settings[0].tfe_configuration.user_token.value}" : "On the TFE instance, retrieve the IACT Token with `docker exec -t terraform-enterprise-tfe-1 /bin/bash -c /usr/local/bin/retrieve-iact` and then navigate to https://${local.fqdn}/admin/account/new?token=<IACT_TOKEN>."
value = var.is_replicated_deployment ? "https://${local.fqdn}/admin/account/new?token=${module.settings[0].tfe_configuration.user_token.value}" : "On the TFE instance, retrieve the IACT Token with `docker exec -t terraform-enterprise-tfe-1 /bin/bash -c /usr/local/bin/retrieve-iact` and then navigate to https://${local.fqdn}/admin/account/new?token=<IACT_TOKEN>."
description = "Login URL to setup the TFE instance once it is initialized"
}

output "replicated_console_url" {
value = var.is_legacy_deployment ? "https://${local.fqdn}:8800/" : "FDO deployments do not have a console."
value = var.is_replicated_deployment ? "https://${local.fqdn}:8800/" : "FDO deployments do not have a console."
description = "The URL of the Terraform Enterprise Replicated administration console."
}

Expand All @@ -84,7 +84,7 @@ output "tfe_autoscaling_group" {
}

output "replicated_dashboard_password" {
value = var.is_legacy_deployment ? module.settings[0].replicated_configuration.DaemonAuthenticationPassword : "This is only used for legacy deployments."
value = var.is_replicated_deployment ? module.settings[0].replicated_configuration.DaemonAuthenticationPassword : "This is only used for legacy deployments."
description = "The password for the TFE console"
sensitive = true
}
Expand Down
2 changes: 1 addition & 1 deletion tests/active-active-rhel7-proxy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module "tfe" {
asg_tags = local.common_tags

# FDO Specific Values
is_legacy_deployment = var.is_legacy_deployment
is_replicated_deployment = var.is_replicated_deployment
hc_license = var.hc_license
license_reporting_opt_out = true
registry_password = var.registry_password
Expand Down
10 changes: 5 additions & 5 deletions tests/active-active-rhel7-proxy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ variable "domain_name" {
variable "hc_license" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The raw TFE license that is validated on application startup."
description = "(Not needed if is_replicated_deployment is true) The raw TFE license that is validated on application startup."
}

variable "is_legacy_deployment" {
variable "is_replicated_deployment" {
type = bool
description = "TFE will be installed using a Replicated license and deployment method."
default = true
Expand All @@ -74,19 +74,19 @@ variable "object_storage_iam_user_name" {
variable "registry_username" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images."
description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images."
}

variable "registry_password" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images."
description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images."
}

variable "tfe_image_tag" {
default = "latest"
type = string
description = "(Not needed if is_legacy_deployment is true) The image version of the terraform-enterprise image (e.g. \"1234567\")"
description = "(Not needed if is_replicated_deployment is true) The image version of the terraform-enterprise image (e.g. \"1234567\")"
}

variable "tfe_license_secret_id" {
Expand Down
2 changes: 1 addition & 1 deletion tests/private-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module "private_active_active" {
asg_tags = local.common_tags

# FDO Specific Values
is_legacy_deployment = var.is_legacy_deployment
is_replicated_deployment = var.is_replicated_deployment
hc_license = var.hc_license
license_reporting_opt_out = true
registry_password = var.registry_password
Expand Down
10 changes: 5 additions & 5 deletions tests/private-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ variable "domain_name" {
variable "hc_license" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The raw TFE license that is validated on application startup."
description = "(Not needed if is_replicated_deployment is true) The raw TFE license that is validated on application startup."
}

variable "is_legacy_deployment" {
variable "is_replicated_deployment" {
type = bool
description = "TFE will be installed using a Replicated license and deployment method."
default = true
Expand All @@ -48,19 +48,19 @@ variable "license_file" {
variable "registry_username" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images."
description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images."
}

variable "registry_password" {
default = null
type = string
description = "(Not needed if is_legacy_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images."
description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images."
}

variable "tfe_image_tag" {
default = "latest"
type = string
description = "(Not needed if is_legacy_deployment is true) The image version of the terraform-enterprise image (e.g. \"1234567\")"
description = "(Not needed if is_replicated_deployment is true) The image version of the terraform-enterprise image (e.g. \"1234567\")"
}

variable "tfe_license_secret_id" {
Expand Down
2 changes: 1 addition & 1 deletion tests/private-tcp-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module "private_tcp_active_active" {
asg_tags = local.common_tags

# FDO Specific Values
is_legacy_deployment = var.is_legacy_deployment
is_replicated_deployment = var.is_replicated_deployment
hc_license = var.hc_license
license_reporting_opt_out = true
registry_password = var.registry_password
Expand Down
Loading

0 comments on commit 1377b0c

Please sign in to comment.