DontShaveTheYak / cf2tf

Convert Cloudformation templates to Terraform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

kzehnter opened this issue · 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.

commented

Thanks for reporting this.