terraform-provider-awscc icon indicating copy to clipboard operation
terraform-provider-awscc copied to clipboard

awscc_ec2_subnet not recognized as supported by Cloud Control API

Open tbulding opened this issue 3 years ago • 3 comments

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.0.11 on darwin_amd64

  • provider registry.terraform.io/hashicorp/aws v3.66.0
  • provider registry.terraform.io/hashicorp/awscc v0.7.0
  • provider registry.terraform.io/hashicorp/random v3.1.0

Affected Resource(s)

  • awscc_v0.7.0

Terraform Configuration Files

resource "awscc_ec2_subnet" "public" {
  count                   = local.public_subnet_count
  vpc_id                  = awscc_ec2_vpc.main[0].id
  cidr_block              = local.public_subnet_cidrs[count.index]
  availability_zone       = local.availability_zones[count.index]
  map_public_ip_on_launch = true

  tags = concat(
    [
      {
        key   = "Name"
        value = "${local.name}_public_${count.index}" 
      }
    ],
    local.tags_as_list
  )

Expected Behavior

aws_ec2_subnet.public_a[1]: Creation complete after 5s

Actual Behavior

 Error: AWS SDK Go Service Operation Unsuccessful
│ 
│   with module.aws-ia_vpc.awscc_ec2_subnet.public[0],
│   on ../../main.tf line 182, in resource "awscc_ec2_subnet" "public":
│  182: resource "awscc_ec2_subnet" "public" {
│ 
│ Calling Cloud Control API service CreateResource operation returned: operation error CloudControl: CreateResource, https response error StatusCode: 400,
│ RequestID: 3ffac67f-d184-4c3b-8927-ef7eb7b38699, UnsupportedActionException: The resource AWS::EC2::Subnet is not yet supported via Cloud Control API

Steps to Reproduce

  1. terraform apply

Important Factoids

The resource awscc_ec2_subnet is listed as an available resource in the provider documentation for v0.7.0

References

* awscc_ec2_subnet

tbulding avatar Nov 24 '21 04:11 tbulding

@tbulding Thanks for raising this issue. Which AWS Region are you targeting with terraform apply?

ewbankkit avatar Dec 08 '21 17:12 ewbankkit

us-east-1

tbulding avatar Dec 08 '21 17:12 tbulding

I observed a different error regarding subnet. it seems the original issue has been resolved but a new one has surfaced. CC issue opened here: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1031

drewmullen avatar Jan 11 '22 15:01 drewmullen