-
Notifications
You must be signed in to change notification settings - Fork 311
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
[Resolve #1283] Deprecating iam_role, role_arn, and template_path; Introducing sceptre_role, cloudformation_service_role #1295
Merged
jfalkenstein
merged 17 commits into
Sceptre:master
from
jfalkenstein:1283-attribute-deprecations
Jan 24, 2023
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
86bb05f
removing template_path, setting other deprecated fields
jfalkenstein aa34264
adding tests
jfalkenstein f2a8466
updating connection manager and its tests
jfalkenstein b4b943b
renaming other fields
jfalkenstein 51d9803
updating docstrings
jfalkenstein cf194f8
updating docs for renames; updating template_path
jfalkenstein 01194ac
emitting deprecation warnings in ConnectionManager and fixing tests
jfalkenstein 4229ced
fixing tests
jfalkenstein a6660af
updating sceptre docs
jfalkenstein 7b62dd5
updating docstrings
jfalkenstein f1ae19f
updating type annotations
jfalkenstein 6c08f09
not overriding warnoptions already passed
jfalkenstein 773b44b
passing template path again
jfalkenstein c9f9747
fixing test
jfalkenstein 023b973
fixing docstring
jfalkenstein 7b65b05
testing deprecated alias helper
jfalkenstein 9c95382
supporting None for removal
jfalkenstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,11 @@ particular Stack. The available keys are listed below. | |
- `parameters`_ *(optional)* | ||
- `protected`_ *(optional)* | ||
- `role_arn`_ *(optional)* | ||
- `cloudformation_service_role`_ *(optional)* | ||
- `iam_role`_ *(optional)* | ||
- `sceptre_role`_ (*optional)* | ||
- `iam_role_session_duration`_ *(optional)* | ||
- `sceptre_role_session_duration`_ *(optional)* | ||
- `sceptre_user_data`_ *(optional)* | ||
- `stack_name`_ *(optional)* | ||
- `stack_tags`_ *(optional)* | ||
|
@@ -47,7 +50,7 @@ from the Stack config filename. | |
|
||
.. warning:: | ||
|
||
This key is deprecated in favor of the `template`_ key. | ||
This key is deprecated in favor of the `template`_ key. It will be removed in version 5.0.0. | ||
|
||
template | ||
~~~~~~~~ | ||
|
@@ -312,49 +315,77 @@ role_arn | |
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
.. warning:: | ||
This field is deprecated as of v4.0.0 and will be removed in v5.0.0. It has been renamed to | ||
`cloudformation_service_role`_ as a clearer name for its purpose. | ||
|
||
cloudformation_service_role | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
* Resolvable: Yes | ||
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
The ARN of a `CloudFormation Service Role`_ that is assumed by *CloudFormation* (not Sceptre) | ||
to create, update or delete resources. For more information on this configuration, its implications, | ||
and its uses see :ref:`Sceptre and IAM: role_arn <role_arn_permissions>`. | ||
and its uses see :ref:`Sceptre and IAM: cloudformation_service_role <cloudformation_service_role_permissions>`. | ||
|
||
iam_role | ||
~~~~~~~~ | ||
* Resolvable: Yes | ||
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
.. warning:: | ||
This field is deprecated as of v4.0.0 and will be removed in v5.0.0. It has been renamed to | ||
`sceptre_role`_ as a clearer name for its purpose. | ||
|
||
sceptre_role | ||
~~~~~~~~~~~~ | ||
* Resolvable: Yes | ||
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
This is the IAM Role ARN that **Sceptre** should *assume* using AWS STS when executing any actions | ||
on the Stack. | ||
|
||
This is different from the ``role_arn`` option, which sets a CloudFormation service role for the | ||
stack. The ``iam_role`` configuration does not configure anything on the stack itself. | ||
This is different from the ``cloudformation_service_role`` option, which sets a CloudFormation | ||
service role for the stack. The ``sceptre_role`` configuration does not configure anything on the | ||
stack itself. | ||
|
||
.. warning:: | ||
|
||
If you set the value of ``iam_role`` with ``!stack_output``, that ``iam_role`` | ||
If you set the value of ``sceptre_role`` with ``!stack_output``, that ``sceptre_role`` | ||
will not actually be used to obtain the stack_output, but it *WILL* be used for all subsequent stack | ||
actions. Therefore, it is important that the user executing the stack action have permissions to get | ||
stack outputs for the stack outputting the ``iam_role``. | ||
stack outputs for the stack outputting the ``sceptre_role``. | ||
|
||
For more information on this configuration, its implications, and its uses, see | ||
:ref:`Sceptre and IAM: iam_role <iam_role_permissions>`. | ||
:ref:`Sceptre and IAM: sceptre_role <sceptre_role_permissions>`. | ||
|
||
iam_role_session_duration | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
* Resolvable: No | ||
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
This is the session duration when **Sceptre** *assumes* the **iam_role** IAM Role using AWS STS when | ||
.. warning:: | ||
This field is deprecated as of v4.0.0 and will be removed in v5.0.0. It has been renamed to | ||
`sceptre_role_session_duration`_ as a clearer name for its purpose. | ||
|
||
sceptre_role_session_duration | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
* Resolvable: No | ||
* Can be inherited from StackGroup: Yes | ||
* Inheritance strategy: Overrides parent if set | ||
|
||
This is the session duration when **Sceptre** *assumes* the **sceptre_role** IAM Role using AWS STS when | ||
executing any actions on the Stack. | ||
|
||
.. warning:: | ||
|
||
If you set the value of ``iam_role_session_duration`` to a number that *GREATER* than 3600, you | ||
will need to make sure that the ``iam_role`` has a configuration of ``MaxSessionDuration``, and | ||
its value is *GREATER* than or equal to the value of ``iam_role_session_duration``. | ||
|
||
For more information on this configuration, its implications, and its uses, see | ||
:ref:`Sceptre and IAM: iam_role_session_duration <iam_role_permissions>`. | ||
If you set the value of ``sceptre_role_session_duration`` to a number that *GREATER* than 3600, you | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a vestigial "that" here. I think this is supposed to read: "to a number GREATER than" |
||
will need to make sure that the ``sceptre_role`` has a configuration of ``MaxSessionDuration``, and | ||
its value is *GREATER* than or equal to the value of ``sceptre_role_session_duration``. | ||
|
||
sceptre_user_data | ||
~~~~~~~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
stack_timeout: 1 | ||
template_path: malformed_template.json | ||
template: | ||
path: malformed_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: sam_template.yaml | ||
template: | ||
path: sam_template.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: sam_updated_template.yaml | ||
template: | ||
path: sam_updated_template.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json | ||
stack_tags: | ||
Project: '{{ project }}' | ||
Key: '{{ keyC }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json | ||
stack_tags: | ||
Project: '{{ project }}' | ||
Key: '{{ keyB }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json | ||
stack_tags: | ||
Key: '{{ keyA }}' | ||
Project: '{{ project }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: updated_template.json | ||
template: | ||
path: updated_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: updated_template.json | ||
template: | ||
path: updated_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: updated_template.json | ||
template: | ||
path: updated_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dependencies: | ||
- 3/A.yaml | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dependencies: | ||
- 3/B.yaml | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json | ||
dependencies: | ||
- 3/A.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: valid_template.json | ||
template: | ||
path: valid_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
template_path: dependencies/independent_template.json | ||
template: | ||
path: dependencies/independent_template.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
template_path: dependencies/dependent_template.json | ||
template: | ||
path: dependencies/dependent_template.json | ||
parameters: | ||
DependentStackName: !stack_output 6/1/A.yaml::StackName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
template_path: dependencies/dependent_template.json | ||
template: | ||
path: dependencies/dependent_template.json | ||
parameters: | ||
DependentStackName: !stack_output 6/1/B.yaml::StackName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
template_path: dependencies/independent_template.json | ||
template: | ||
path: dependencies/independent_template.json | ||
region: eu-west-1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
would it make sense to mark these as deprecated here as well? something like
[Deprecated] iam_role_ *(optional)*
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.
I was thinking about that... that's easy enough to do.