hashicorp / terraform-plugin-sdk

Terraform Plugin SDK enables building plugins (providers) to manage any service providers or custom in-house solutions
https://developer.hashicorp.com/terraform/plugin
Mozilla Public License 2.0
427 stars 230 forks source link

Terraform CloudFormation Multi Region Stacksets #1263

Closed rads18 closed 9 months ago

rads18 commented 9 months ago

Hello team,

We have been using AWS Stacksets to deploy directly from AWS UI(Cloudformation) and trying to use Terraform to deploy the same Stacksets templates.

Based on documentation it appears we should be able to supply multiple regions but i do not see a key to supply multiple regions for parallel execution. However, per document (link below) for Resource: aws_cloudformation_stack_set_instance it has a operational_preference parameter that allows PARALLEL execution.

region_concurrency_type

thanks Rads

Note: The below configuration works But only for one region (us-east-1). There is not provision to provide multiple regions, yet in the instance configuration and documentation we can do PARALLEL, what is the meaning and significance for that? Hence, the confusion!

CreateCloudstackSet.tf

resource "aws_cloudformation_stack_set" "amitest" {
  name = "ami-test-stackset"

  parameters = {
    ImageName = "xxxxxx"
  }

  template_body = file("../cftemplates/TestAmiLambda.yaml")
}

My instance.tf file is:

resource "aws_cloudformation_stack_set_instance" "amitest" {
  account_id = "xxxxxxxx"
  region     = "us-east-1"
  timeouts {
    create = "60m"
  }
  operation_preferences {
    region_concurrency_type = "PARALLEL"
  }
  stack_set_name = aws_cloudformation_stack_set.amitest.name
}

main.tf

provider "random" {}

## Provider us-east-1
provider "aws" {
  region = "us-east-1"
}
bendbennett commented 9 months ago

Hi @rads18 👋

Sorry you ran into trouble here.

I'm wondering if perhaps this issue should have been opened on the AWS Terraform Provider repository as the aws_cloudformation_stack_set_instance is part of the AWS provider.

rads18 commented 9 months ago

Thanks @bendbennett for getting back to me .

github-actions[bot] commented 8 months ago

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.