Cloudformation (Serverless Application Model - SAM) serverless.template in Visual Studio shows errors but builds and deploys

0

I have been putting together a serverless template in Visual Studio, building and deploying my architecture. Sometimes when I add new features to it they show up with red squiggles i.e. it says that there are errors. However the syntax is correct according to the documentation and the deployment works fine.

I currently have 21 errors in a document of about 1000 lines. My AWS toolkit is on the latest version but it does not seem to help.

For example here is one resource:

"MySQLUserDBCluster": {
       "Type":"AWS::RDS::DBCluster",
       "Properties": {        
       "DBClusterIdentifier": "UserDBCluster",
       "MasterUsername": "atadmin",
       "MasterUserPassword": {
         "Ref": "MasterMySQLPassword"
       },
       "EngineVersion": "8.0",
       "Engine" : "aurora-mysql",
       "EngineMode" : "provisioned",
         "ServerlessV2ScalingConfiguration": {
           "MaxCapacity": 20,
           "MinCapacity": 1
         },         
       "VpcSecurityGroupIds": [
         {
           "Ref": "MySecurityGroup"
         }
       ]
     }
   },

The lines

"ServerlessV2ScalingConfiguration": {
           "MaxCapacity": 20,
           "MinCapacity": 1

are shown to be in error. When I hover over "ServerlessV2ScalingConfiguration" it says "ServerlessV2ScalingConfiguration key is invalid for this object"

The same goes for the reference to MySecurityGroup. Hovering over it, It says "MySecurityGroup is an invalid type for this reference". However, it is not and it works fine.

Any suggestions? It makes it hard to see when there are real errors that need to be fixed.

2개 답변
1

It appears to be a bug. Could you please open an issue in the aws-toolkit-visual-studio GitHub repository?

profile picture
전문가
답변함 한 달 전
0
zeiddev
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠