aws-scripting-guy/cform-VSCode

CloudFormation specific constructs are shown as invalid.

msplival opened this issue · 1 comments

Here is excerpt from my CloudFormation template for some Aurora stack:

AuroraClusterKey:
    Type: AWS::KMS::Key
    Properties:
      Description: !Sub "KMS key for - ${DBName}"
      EnableKeyRotation: true
      KeyPolicy:
        Statement:
          - Sid: !Sub '${DBName} Aurora PG Cluster KMS key policy'
            Effect: Allow
            Principal:
              AWS:
                - !Sub arn:aws:iam::${AWS::AccountId}:root
            Action:
              - kms:*
            Resource: "*"

But, all of the !Sub sections are marked as 'Unresolved Tag'.

I am using v0.0.24, freshly installed into VSCode.

image

I suppose I am doing something wrong, but I can't determine what :)

Ok, I'm silly enough not to read documentation properly. I had to include customTags snippet into my settiings.json file.

But I still have the issue, for this code snippet:

    Type: AWS::KMS::Alias
    Properties:
      AliasName: 
        !Sub 
         - "alias/rds/${clusterKeyDef}-key"
         - { clusterKeyDef: { Fn::ImportValue: !Sub '${MasterStack}:KMSKeyPrefix' } }
      TargetKeyId: !Ref AuroraClusterKey

The code deploys fine with aws cloudformation deploy. The !Sub is added as a custom tag via settings.json.

image