aws-ia / terraform-aws-control_tower_account_factory

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

Overriding provider blocks in provider.tf file #419

Closed rfum closed 4 months ago

rfum commented 5 months ago

Describe the outcome you'd like

Currently there's a pre-defined provider file exists on providers.tf. We would like to configure that provider file by overriding default values.

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

We tried to override that file from the module block that we use the aft module to configure aft, but we are getting the following error

│ The configuration of module.aft has its own local configuration for
│ aws.aft_management, and so it cannot accept an overridden configuration
│ provided by the root module.

for every other provider block too.

Additional context

This is a blocker to us while we are deploying aft. Are there any formal ways to override those values without creating our fork and making certain changes on the module?

snebhu3 commented 5 months ago

@rfum thank you for reaching out. Please may you give us more context on your use case and what you are trying to achieve and the problem you are trying to solve? The providers.tf currently defines what roles should be used by AFT to access the member accounts / regions.

rfum commented 5 months ago

we'd like to change assume role sections based on our security requirements on all of the providers. but currently we cannot. is there a way to override provider fields?

snebhu3 commented 5 months ago

@rfum thanks for providing more context. These providers defined in providers.tf are used to deploy the AFT infrastructure in respective member accounts. Overriding these is currently not supported. I have created an internal backlog to potentially provide more configurability here.