aws-ia / terraform-aws-control_tower_account_factory

AWS Control Tower Account Factory
Apache License 2.0
605 stars 386 forks source link

Parameterize Terraform Cloud workspace name #357

Open josukuttyulahannan opened 1 year ago

josukuttyulahannan commented 1 year ago

Paramaterize account-request workspace name

A clear and concise description of what you want to happen.

It would be better if we can provide the account request workspace name for terraform cloud to the AFT terraform template.

Is your feature request related to a problem you are currently experiencing? If so, please describe.

While managing more than one client with AFT using same terraform cloud account, the same ct-aft-account-request workspace in terraform cloud is utilized for all the clients. So using same tfc account for 2 or more clients would be troublesome. Now we are forced to use terraform oss for any new clients that requires AFT.

balltrev commented 1 year ago

Thanks @josukuttyulahannan for the request. I've gone ahead and added a backlog to address the addition of workspace name to to the account request parameters.

AliSajid commented 1 year ago

I need this desperately as well. What is the workaround at the moment?

josukuttyulahannan commented 1 year ago

I need this desperately as well. What is the workaround at the moment?

@AliSajid you can edit the buildspec and hardcode the workspace name, or create a paramater and use it in the buildspec till they release this.

wellsiau-aws commented 1 year ago

@josukuttyulahannan is there a reason why you dont use separate Terraform Cloud organization?

AFT creates workspace using AWS account id as a prefix, so the workspace name collusion is highly unlikely.

Can you elaborate on your use-cases?

josukuttyulahannan commented 1 year ago

@josukuttyulahannan is there a reason why you dont use separate Terraform Cloud organization?

AFT creates workspace using AWS account id as a prefix, so the workspace name collusion is highly unlikely.

Can you elaborate on your use-cases?

We are managing multiple clients with landing zone. Generally we use our terraform cloud account for managing their infra. But with AFT, the account request pipeline create a workspace called ct-aft-account-request. Which will be overriden when we use the same tfc for another client.

As you said the customizations pipeline creates workspaces with account id as prefix, but thats not the case for account-request workspace.

Hope the issue is clear now. I would suggest either parameterizing the account request workspace name, or adding account id as a prefix for that workspace also.

@wellsiau-aws

wellsiau-aws commented 1 year ago

make sense, thanks for clarifying that!