aperswal / CloudFormation_To_Terraform

40 stars 6 forks source link

`Fn::GetAtt` causes `Error converting: list index out of range` #8

Open PatMyron opened 1 month ago

PatMyron commented 1 month ago

https://github.com/aperswal/CloudFormation_To_Terraform/blob/453012ab9aa3797142bbe2f6ef2d899cf91eeb13/cli_converter.py#L78-L79

Reproduction template:

Resources:
  Resource:
    Type: AWS::SNS::Topic
  Resource5:
    Type: AWS::SNS::Topic
    Properties:
      DisplayName:
        Fn::GetAtt: Resource.TopicName

Can workaround with !GetAtt syntax:

Resources:
  Resource:
    Type: AWS::SNS::Topic
  Resource5:
    Type: AWS::SNS::Topic
    Properties:
      DisplayName:
        !GetAtt Resource.TopicName