Conversation
designs/intrinsics_design.md
Outdated
|
|
||
| ### AWS::AccountId | ||
|
|
||
| This property will be resolved by running an aws command to figure out the configuration. If there is an error, a randomly such as non-authenticated, a randomly generated string will take its place. |
There was a problem hiding this comment.
Why? We have a default value already, why are we reaching out to the cloud for this?
designs/intrinsics_design.md
Outdated
|
|
||
| ### AWS::StackId | ||
|
|
||
| Currently, there is no real way to figure this one out. It will be a randomly generated String |
There was a problem hiding this comment.
static to remain consistent with what we do now. Also we should just state here what the static values are.
You should do a pass through all of these Pseudo Parameters and apply this feedback to each.
designs/intrinsics_design.md
Outdated
|
|
||
| ## Implementing the Code | ||
|
|
||
| This can be seperated into a Intrinsics resolver and a SymbolResolver. |
There was a problem hiding this comment.
I think an Intrinsics resolver is but should define what a SymbolResolver is and what it does.
designs/intrinsics_design.md
Outdated
|
|
||
| ## Integration into SAM-CLI | ||
|
|
||
| This can be very easily plugged into the current SAM-CLI code. This needs to be run after the SamBaseTranslator runs in the ApiProvider. This will go through every property and check if it requires intrinsic resolution. |
There was a problem hiding this comment.
SamBaseTranslator runs in any provider not just the ApiProvider.
There was a problem hiding this comment.
I was talking about how it can be integrated into the current codebase and where this can be added into the ApiProvider
| * Customers can use tools such as AWS CDK to generate a template. The templates will have intrinsic properties. The customer can create their AWS CDK project with `cdk init app` and then generate their CloudFormation code using `cdk synth.`They can input their CloudFormation code to test it locally using the SAM CLI command. | ||
| * Customers can author CloudFormation resources and test them locally by inputting their templates into sam local start-api. | ||
|
|
||
| Once the user has their CloudFormation code, they will be running `sam local start-api --template /path/to/template.yaml` |
There was a problem hiding this comment.
Comment above still holds. This looks like it was from your other design and not sure how it relates to the intrinsic support.
|
|
||
| This intrinsic function is very similar to the Fn::And function, but will check that at least one of the items in the last returns a truthy value. | ||
|
|
||
| ## Pseudo Parameters |
There was a problem hiding this comment.
Can we add what each of the Pseudo Parameters resolve to?
| } | ||
| ``` | ||
|
|
||
| * common_attribute_resolver: resolves common attributes that will be true across all |
There was a problem hiding this comment.
Is this used for helping resolve Fn::GetAtt for all the 'common' attributes a resource could typically have?
designs/intrinsics_design.md
Outdated
| ``` | ||
|
|
||
|
|
||
| First pseudo types are checked. If item is present in the logical_id_translator it is returned. Otherwise, it falls back to the default_pseudo_resolver. Then the default_type_resolver is checked, which has common attributes and functions for each types. Then the common_attribute_resolver is run, which has functions that are common for each attribute. |
There was a problem hiding this comment.
All of this is for Pseudo Parameters? Pseudo parameters are all predefined. Seems like a lot of extra work that isn't needed.
There was a problem hiding this comment.
The paragraph might need to be clarified. The paragraph describes the flow of logic for resolving symbol table attributes.
designs/intrinsics_design.md
Outdated
| processed_template[processed_key] = processed_resource | ||
| ``` | ||
|
|
||
| If there is an error with the resource, the item will be ignored and processed. |
There was a problem hiding this comment.
What do you mean by error with the resource? Without understanding what you mean, it's hard to tell if this really should just ignore or bubble up the error to the customer.
There was a problem hiding this comment.
The idea was to not break any workflows for unresolved symbol table or reference errors. Currently, in SAM these properties are ignored and wouldn't cause any errors, so by ignoring the errors we are using the same functionality. This is true for refs that exist to cloud instances. To ignore the error, we just copy the resource as is.
I will update this in the description.
Issue #, if available:
Description of changes:
Checklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.