Skip to content

Commit 915c22e

Browse files
authored
Allow users to set component names (#35)
* Update policy-TerraformUpdateAccess.tf * Update variables.tf * Update
1 parent 3fa375a commit 915c22e

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/policy-TerraformUpdateAccess.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module "tfstate" {
1414

1515
bypass = !local.tf_update_access_enabled
1616

17-
component = "tfstate-backend"
17+
component = var.tfstate_backend_component_name
1818
environment = var.tfstate_environment_name
1919
stage = module.iam_roles.global_stage_name
2020
privileged = var.privileged

src/remote-state.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module "account_map" {
22
source = "cloudposse/stack-config/yaml//modules/remote-state"
33
version = "1.8.0"
44

5-
component = "account-map"
5+
component = var.account_map_component_name
66
environment = module.iam_roles.global_environment_name
77
stage = module.iam_roles.global_stage_name
88
tenant = module.iam_roles.global_tenant_name

src/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,15 @@ variable "session_duration" {
5858
description = "The default duration of the session in seconds for all permission sets. If not set, fallback to the default value in the module, which is 1 hour."
5959
default = ""
6060
}
61+
62+
variable "tfstate_backend_component_name" {
63+
type = string
64+
description = "The name of the tfstate-backend component"
65+
default = "tfstate-backend"
66+
}
67+
68+
variable "account_map_component_name" {
69+
type = string
70+
description = "The name of the account-map component"
71+
default = "account-map"
72+
}

0 commit comments

Comments
 (0)