Skip to content
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

Add capabilities for Managed Stack #6309

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samcli/lib/utils/managed_cloudformation_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _create_stack(
Tags=[{"Key": "ManagedStackSource", "Value": "AwsSamCli"}],
ChangeSetType="CREATE",
ChangeSetName=change_set_name, # this must be unique for the stack, but we only create so that's fine
Capabilities=["CAPABILITY_IAM"],
Capabilities=["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"],
Parameters=parameters,
)
stack_id = change_set_resp["StackId"]
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/lib/utils/test_managed_cloudformation_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_new_stack(self, boto_mock):
"Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}],
"ChangeSetType": "CREATE",
"ChangeSetName": "InitialCreation",
"Capabilities": ["CAPABILITY_IAM"],
"Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"],
"Parameters": [],
}
ccs_resp = {"Id": "id", "StackId": "aws-sam-cli-managed-default"}
Expand Down Expand Up @@ -210,7 +210,7 @@ def test_change_set_creation_fails(self, patched_boto, patched_session):
"Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}],
"ChangeSetType": "CREATE",
"ChangeSetName": "InitialCreation",
"Capabilities": ["CAPABILITY_IAM"],
"Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"],
"Parameters": [],
}
stubber.add_client_error("create_change_set", service_error_code="ClientError", expected_params=ccs_params)
Expand All @@ -233,7 +233,7 @@ def test_change_set_execution_fails(self, patched_boto):
"Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}],
"ChangeSetType": "CREATE",
"ChangeSetName": "InitialCreation",
"Capabilities": ["CAPABILITY_IAM"],
"Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"],
"Parameters": [],
}
ccs_resp = {"Id": "id", "StackId": "aws-sam-cli-managed-default"}
Expand Down
Loading