Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to supply regions and account_ids for aws_cloudformation_stack_set_instance #25209

Closed
ganhuang opened this issue Jun 7, 2022 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudformation Issues and PRs that pertain to the cloudformation service.

Comments

@ganhuang
Copy link

ganhuang commented Jun 7, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently only single region and single account can be supplied to resource arguments aws_cloudformation_stack_set_instance within SELF_MANAGED permission model, it appears the api supports to supply multiple regions and multiple accounts. And it appears to be an issue of the provider to restrict the ability to supply multiple regions/accounts in the resource arguments.

To workaround this issue, it's required to loop the matrix of regions and accounts, it will take a lot time to complete the resource creation.

New or Affected Resource(s)

  • aws_cloudformation_stack_set_instance

Potential Terraform Configuration

resource "aws_cloudformation_stack_set" "kms_key" {
  name                    = local.cfn_kms_stack_name
  administration_role_arn = aws_cloudformation_stack.self_managed_admin_role.outputs["AdminRoleArn"]
  permission_model        = "SELF_MANAGED"
  template_body = file("${local.cfn_local_prefix}/${local.cfn_kms_stack_name}.yml")
  operation_preferences {
    failure_tolerance_percentage = 0
    max_concurrent_percentage    = 100
    region_concurrency_type      = "PARALLEL"
  }
  parameters = {
    Prefix = local.cfn_stack_prefix
  }

}

resource "aws_cloudformation_stack_set_instance" "kms_key_instance" {
  account_id     = local.account
  region             = local.region
  stack_set_name = aws_cloudformation_stack_set.kms_key.name
  operation_preferences {
    failure_tolerance_percentage = 0
    max_concurrent_percentage    = 100
    region_concurrency_type      = "PARALLEL"
  }
}

References

@ganhuang ganhuang added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 7, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/cloudformation Issues and PRs that pertain to the cloudformation service. labels Jun 7, 2022
@justinretzolk justinretzolk added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed needs-triage Waiting for first response or review from a maintainer. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. labels Jun 7, 2022
@ganhuang
Copy link
Author

Dup with #24752, closing...

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudformation Issues and PRs that pertain to the cloudformation service.
Projects
None yet
Development

No branches or pull requests

2 participants