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.

zeiddev
preguntada hace un mes216 visualizaciones
2 Respuestas
1

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

profile picture
EXPERTO
respondido hace un mes
0
zeiddev
respondido hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas