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

awscc_cloudformation_stack_set: Resource doesn't work with StackInstancesGroup attribute #1451

Open
ericofusco opened this issue Feb 28, 2024 · 1 comment

Comments

@ericofusco
Copy link

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
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.7.3
on darwin_arm64
+ provider registry.terraform.io/hashicorp/awscc v0.71.0

Affected Resource(s)

  • awscc_cloudformation_stack_set

Terraform Configuration Files

resource "awscc_cloudformation_stack_set" "stackset" {
  stack_set_name   = "network-stackset"
  permission_model = "SERVICE_MANAGED"

  auto_deployment = {
    enabled                          = true
    retain_stacks_on_account_removal = false
  }

  stack_instances_group = [{
    deployment_targets = {
      organizational_unit_ids = ["ou-u7vc-ex6e8h34"]
    }
    regions = ["us-east-1"]
  }]

  template_body = jsonencode({
    Resources = {
      myVpc = {
        Type = "AWS::EC2::VPC"
        Properties = {
          CidrBlock = "10.0.0.0/16"
        }
      }
    }
  })
}

terraform {
  required_providers {
    awscc = {
      source  = "hashicorp/awscc"
      version = "0.71.0"
    }
  }
}

provider "awscc" {}

Debug Output

https://gist.github.com/ericofusco/8fc48b6da09f7e0ee5b1f146e2e015d1

Expected Behavior

State and attributes are stored accordingly based on the stacksets deployed.

Actual Behavior

╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to awscc_cloudformation_stack_set.stackset, provider "provider[\"registry.terraform.io/hashicorp/awscc\"]" produced an unexpected new value:
│ .stack_instances_group: was
│ cty.SetVal([]cty.Value{cty.ObjectVal(map[string]cty.Value{"deployment_targets":cty.ObjectVal(map[string]cty.Value{"account_filter_type":cty.UnknownVal(cty.String),
│ "accounts":cty.UnknownVal(cty.Set(cty.String)), "accounts_url":cty.UnknownVal(cty.String), "organizational_unit_ids":cty.SetVal([]cty.Value{cty.StringVal("ou-u7vc-ex6e8h34")})}),
│ "parameter_overrides":cty.UnknownVal(cty.Set(cty.Object(map[string]cty.Type{"parameter_key":cty.String, "parameter_value":cty.String}))),
│ "regions":cty.SetVal([]cty.Value{cty.StringVal("us-east-1")})})}), but now null.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Steps to Reproduce

  1. terraform apply

References

@ericofusco ericofusco changed the title CloudFormation StackSet: Resource doesn't work with StackInstancesGroup attribute awscc_cloudformation_stack_set: Resource doesn't work with StackInstancesGroup attribute Feb 28, 2024
@wellsiau-aws
Copy link
Collaborator

Related to #1586

I can consistently replicate this problem when I include attribute stack_instances_group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants