Mathieu SERRA
02/23/2021, 10:33 AMaws-terraform-component. In most of this modules you require the module iam-roles. But you call it with few parameters:
module "iam_roles" {
source = "../account-map/modules/iam-roles"
stage = var.stage
assume_role = false
region = var.region
}
But this module need other information to access remote state of account-map. Like the account id, the namespace or the bucket envirnoment_name. I think someting like that can work:
module "iam_roles" {
source = "../account-map/modules/iam-roles"
stage = var.stage
tfstate_assume_role = false
tfstate_bucket_environment_name = var.tfstate_bucket_environment_name
region = var.region
context = module.this.context
tfstate_account_id = var.tfstate_account_id
}
Or maybe you have a way in atmos to pass this variables to the module directly.
ThanksJoe Hosteny
04/30/2021, 7:18 PMterraform-null-label but for the tfstate-context?Matt Gowie
04/30/2021, 8:36 PM<http://tfstate-context.tf|tfstate-context.tf> files was a pattern that I believe the CP team tried out, but it didn’t work out and was deprecated.Joe Hosteny
04/30/2021, 8:37 PMMatt Gowie
04/30/2021, 8:37 PMJoe Hosteny
04/30/2021, 8:41 PMMatt Gowie
04/30/2021, 8:44 PMMatt Gowie
04/30/2021, 8:45 PMMatt Gowie
04/30/2021, 8:45 PMJoe Hosteny
04/30/2021, 8:46 PMMatt Gowie
04/30/2021, 8:46 PMMatt Gowie
04/30/2021, 8:46 PMMatt Gowie
04/30/2021, 8:47 PMMatt Gowie
04/30/2021, 8:47 PMJoe Hosteny
04/30/2021, 8:47 PMMatt Gowie
04/30/2021, 9:50 PMJoe Hosteny
04/30/2021, 9:50 PMall-new-components branch. I diff'ed a lot of the changes between that and the upstream-account-comps branch, and wound up just deleting the tfstate-context.tf and tfstate.tf files from the account-map component, and everything worked cleanlyJoe Hosteny
04/30/2021, 9:51 PMassume_role_restricted: false)