hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 9k forks source link

capability_iam issue when executing cloudformation templates using terraform #11703

Open ghost opened 4 years ago

ghost commented 4 years ago

This issue was originally opened by @scrmtel as hashicorp/terraform#23896. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

0.11

Terraform Configuration Files

resource "aws_cloudformation_stack" "network" {
  name = "networking-stack"

  parameters = {
    VPCCidr = "10.0.0.0/16"
  }

  template_body = <<STACK
{
  "Parameters" : {
    "VPCCidr" : {
      "Type" : "String",
      "Default" : "10.0.0.0/16",
      "Description" : "Enter the CIDR block for the VPC. Default is 10.0.0.0/16."
    }
  },
  "Resources" : {
    "myVpc": {
      "Type" : "AWS::EC2::VPC",
      "Properties" : {
        "CidrBlock" : { "Ref" : "VPCCidr" },
        "Tags" : [
          {"Key": "Name", "Value": "Primary_CF_VPC"}
        ]
      }
    }
  }
}
STACK
}

Debug Output

CAPABILITY_IAM or CAPABILITY_AUTO_EXPAND is missing

Expected Behavior

capability_IAM errors should not come

Actual Behavior

CAPABILITY_IAM or CAPABILITY_AUTO_EXPAND is missing

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform apply
justinretzolk commented 2 years ago

Hey @scrmtel 👋 Thank you for taking the time to file this issue! Given that there's been a number of AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?