shalupov/idea-cloudformation

Remove unneccessary double quotes after aws reqoues renaming

ant-druha opened this issue · 0 comments

From https://youtrack.jetbrains.com/issue/IDEA-182749

This is usability bug for aws cloudformation plugin.

Create following aws yaml cloudformation file:

    MyKmsKey:
        Type: "AWS::KMS::Key"
        Properties:
            Description: "My ksm key"
            KeyPolicy:
                Version: "2012-10-17"
                Id: "my id"
                Statement:
                    -
                        Effect: "Allow"
                        Principal:
                            AWS: !Join ["", ["arn:aws:iam::", "myString", ":root"]]
                        Action:
                            - "kms:*"
                        Resource: "*"

    MyKmsKeyAlias:
        Type: AWS::KMS::Alias
        Properties:
            AliasName: !Join ["-", ["alias", "myRegion" ]]
            TargetKeyId:
                Ref: MyKmsKey

Put cursor onto last line on MyKmsKey word

press shift + f6

enter MyKmsKey2 as new name

Expected behavior: Ref: MyKmsKey -> Ref: MyKmsKey2 and MyKmsKey: -> MyKmsKey2: (first line)
Actual behavior: Ref: MyKmsKey -> Ref: "MyKmsKey2"

The doulble quotes can safely removed for readabulity.

Note
It would be the best is intellij Idea search for MyKmsKey and ask to change MyKmsKeyAlias but it does not do this even when Search in comment and string is enabled in rename popup dialog.