aws / aws/aws-toolkit-visual-studio
Intellisense for Serverless.Template Json File In Visual Studio (.Net Core)
- Dominant language
- No language data
- Stars
- 135
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
When I add a Serverless Application and try to use an output parameter from that stack in the parent stack, Intellisense complains as an invalid key for this object, but it works fine when I deploy it.
Parent template:
`{`
` "AWSTemplateFormatVersion" : "2010-09-09",`
` "Transform" : "AWS::Serverless-2016-10-31",`
` "Resources" : { `
` "NestedStack" : {`
` "Type" : "AWS::Serverless::Application",`
` "Properties" : {`
` "Location" : "./serverless_nested.template"`
` }`
` }`
` },`
` "Outputs" : {`
` "NestedStackOutput" : {`
` "Value" : {"Fn::GetAtt" : [ "NestedStack", "Outputs.ApplicationOutputName"]}`
` }`
` }`
`}`
Nested template:
`{`
` "AWSTemplateFormatVersion" : "2010-09-09",`
` "Transform" : "AWS::Serverless-2016-10-31",`
` "Resources" : {`
` "OrdersTable" : {`
` "Type" : "AWS::Serverless::SimpleTable",`
` "Properties" : {`
` "TableName" : "Order",`
` "PrimaryKey" : {`
` "Name" : "Id",`
` "Type" : "Number"`
` },`
` "ProvisionedThroughput" : {`
` "ReadCapacityUnits" : 5,`
` "WriteCapacityUnits" : 5`
` }`
` }`
` }`
` },`
` "Outputs" : {`
` "ApplicationOutputName" : {`
` "Value" : { "Ref" : "OrdersTable" }`
` }`
` }`
`}`
## Expected Behavior
Intellisense was to accept this content.
## Current Behavior
Intellisense underline and colour the tag in red and shows a hint saying "Outputs.ApplicationOutputName is an unknown attribute for this resource".
## Possible Solution
I had a similar problem in the past ( #1191 ) and that was fixed by "updating the backing schema for the editor".
## Your Environment
* AWSSDK.Core version used: AWSToolsAndSDKForNet_sdk-3.3.529.0_ps-3.3.522.0_tk-1.14.5.0
* Operating System and version: Windows 10 Pro 10.0.18362 N/A Build 18362
* Visual Studio version: 2019 16.1.2
* Targeted .NET platform: 2.1.10
* AWS Toolkit for Visual Studio 2017 1.15.2.0
[logging]: http://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-other.html
Contributor guide
Research direction
No repository file or test is named. Reproduce the warning with the parent and nested Serverless template examples in the issue, then trace the Visual Studio editor's backing schema; done means the Outputs.ApplicationOutputName attribute is accepted without an unknown-attribute warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, json
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100