Skip to content

Add --role-arn option for remove sub command. #98

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

Merged

Conversation

gouglhupf
Copy link
Contributor

Issue #, if available: -

Description of changes: Add --role-arn option for remove sub command.

The PR #81 added this flag to the deploy command. On occasion we needed this flag for the remove (delete) command too.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@gouglhupf gouglhupf force-pushed the add-role-arn-rm-command branch from 4d9f749 to 22bcfe5 Compare January 26, 2023 13:33
@gouglhupf gouglhupf force-pushed the add-role-arn-rm-command branch from 22bcfe5 to 6525fa6 Compare January 26, 2023 13:43
@@ -187,7 +187,7 @@ YAML:
}

if !stackExists {
err = cfn.DeleteStack(stackName)
err = cfn.DeleteStack(stackName, "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also apply the role arn here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. As I understand, we created the stack from scratch and deleting it if the user doesn't deploy the change set. If the user passes the role arn flag, the stack will already have the role set. If no role is passed to the API, it will reuse the correct role. Note that the stack is empty, so CloudFormation might not assume the role as no resources are being touched (no sure about that).
In my view, adding the role ARN flag is a matter of code intelligibility rather than functionality.
What do you think?

Thanks for the reviews!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as it won't fail, we don't need to add it.

@ericzbeard ericzbeard merged commit 269d73c into aws-cloudformation:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants