-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
CloudFormation V2 Engine: Support for Pseudo Parameter References #12595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently, only patch changes are allowed on master. Your PR labels (semver: minor) indicate that it cannot be merged into the master at this time. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 21m 39s ⏱️ - 1h 19m 54s Results for commit 87bc478. ± Comparison against base commit 5f9ae76. This pull request removes 3961 and adds 1 tests. Note that renamed tests count towards both.
This pull request removes 209 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A great set of changes and a nice pr thanks!
# TODO: review required behaviour of before and after, are pseudo parameter values constant during | ||
# change set lifecycles? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, yes they are
# TODO: review required behaviour of before and after, are pseudo parameter values constant during | |
# change set lifecycles? |
# change set lifecycles? | ||
match pseudo_parameter_name: | ||
case "AWS::Partition": | ||
after = "aws" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about our other partition support like govcloud? Maybe leave a todo. What does the v1 engine do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, indeed we can use the get_partition
utility about the region name as the v1 provider does
@@ -318,6 +318,8 @@ def test_cfn_deploy_apigateway_integration(deploy_cfn_template, snapshot, aws_cl | |||
"$.get-stage.lastUpdatedDate", | |||
"$.get-stage.methodSettings", | |||
"$.get-stage.tags", | |||
"$..endpointConfiguration.ipAddressType", | |||
"$..binaryMediaTypes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rebase onto master, this is now in that branch
template_1 = { | ||
"Resources": { | ||
"Topic": {"Type": "AWS::SNS::Topic", "Properties": {"TopicName": topic_name}}, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we create an sns topic in template one and use a completely different resource in template two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there is no particular reason other than needing an update with a resource listing a number of supported pseudo parameters. I changed it to only use SNS topics.
{"Key": "AccountId", "Value": {"Ref": "AWS::AccountId"}}, | ||
{"Key": "Region", "Value": {"Ref": "AWS::Region"}}, | ||
{"Key": "StackName", "Value": {"Ref": "AWS::StackName"}}, | ||
{"Key": "StackId", "Value": {"Ref": "AWS::StackId"}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't cover urlsuffix here. I realise that by definition it will be different from AWS to LocalStack but at least it would be execute the code path
@@ -285,6 +290,31 @@ def _run(*args): | |||
|
|||
return ExecuteChangeSetOutput() | |||
|
|||
def _describe_change_set( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great I'm glad it's in the provider.
StackId=change_set.stack.stack_id, | ||
StackName=change_set.stack.stack_name, | ||
CreationTime=change_set.creation_time, | ||
Parameters=[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep the todo about masking ?
Motivation
The introduction of the CloudFormation v2 engine laid the foundation for a redesigned engine capable of accurately determining update requirements between CloudFormation deployments, while also enabling parallel execution during updates. However, the current implementation still lacks support for Pseudo Parameter References
Changes