cf2tf icon indicating copy to clipboard operation
cf2tf copied to clipboard

VPCGatewayAttachment-Conversion needs to assess the parameters to decide on right resource

Open kzehnter opened this issue 1 year ago • 1 comments

Expected Behaviour: AWS::EC2::VPCGatewayAttachment with InternetGatewayId Parameter should be converted into a aws_internet_gateway_attachment

Actual Behaviour:

  InternetGatewayVpcAttachment:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      InternetGatewayId: !Ref InternetGateway
      VpcId: !Ref VPC

gets converted to:

resource "aws_vpn_gateway_attachment" "internet_gateway_vpc_attachment" {
  vpc_id = aws_vpc.vpc.arn
}

Terraform has 2 different resources (aws_vpn_gateway_attachment and aws_internet_gateway_attachment) that should be chosen depending on the properties (VpnGatewayId and InternetGatewayId) in the AWS::EC2::VPCGatewayAttachment.

kzehnter avatar Aug 22 '23 22:08 kzehnter

Thanks for reporting this.

shadycuz avatar Sep 11 '23 14:09 shadycuz