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

feat: Add ability for controlling whether or not to create a policy #163

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

gabops
Copy link
Contributor

@gabops gabops commented Sep 10, 2021

Description

Add ability for controlling whether or not to create a policy

Motivation and Context

In certain scenarios can be useful to decide which specific policy should be created or not. Let's imagine that we create a module from this module for creating a set of policies that might change depending on the account you are targeting. This change allows you to do that.

Breaking Changes

There is no breaking change as the module still behaving the same by default.

How Has This Been Tested?

  • [✅] I have tested and validated these changes using one or more of the provided examples/* projects
  • [✅] Tested over my own AWS account.

source = "../../modules/iam-policy"
create_policy = false

name = "example_optional"
Copy link
Member

Choose a reason for hiding this comment

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

There are default values already specified for all variables in the module, so you can remove everything starting from line 61 (like 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.

Ok, I've removed "path" and "description".

Thank you for your time!

Copy link
Member

Choose a reason for hiding this comment

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

Please remove everything and leave just source and create_policy = false with empty line in between.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@antonbabenko antonbabenko merged commit c2343ee into terraform-aws-modules:master Sep 10, 2021
@antonbabenko
Copy link
Member

Thanks, @gabops !

v4.4.0 has been just released.

@gabops
Copy link
Contributor Author

gabops commented Sep 10, 2021

Thanks, @gabops !

v4.4.0 has been just released.

Thanks to you for your time reviewing this!

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants