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 a new variable to control the creation of a lifecycle policy #4

Merged
merged 5 commits into from
Jun 13, 2022

Conversation

phr3nzii
Copy link
Contributor

@phr3nzii phr3nzii commented Jun 11, 2022

Description

  • This pull request adds a new variable that determines whether a lifecycle policy is created. The previous default behaviour was to always create a lifecycle policy. If you didn't want a lifecycle policy, there was no way to do this. You will now have to set create_lifecycle_policy to true if you want a lifecycle policy to be created.
  • Add missing usage of create_repository_policy variable to policy creation

Motivation and Context

Sometimes a lifecycle policy isn't needed or wanted. This fixes #2
Closes #5

Breaking Changes

I wouldn't call this a breaking change. However, users who do want to have a lifecycle policy created will need to add the new variable to ensure that it is created.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

I have tested using the complete example by setting create_lifecycle_policy to both true and false. I've also updated this example to ensure that the lifecycle policy is created in future.

I also tested this using the reproduction code from #2

@phr3nzii phr3nzii changed the title Add a new variable to control the creation of a lifecycle policy feat: Add a new variable to control the creation of a lifecycle policy Jun 11, 2022
variables.tf Outdated Show resolved Hide resolved
wrappers/main.tf Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @phr3nzii !

@bryantbiggs bryantbiggs merged commit 18c0515 into terraform-aws-modules:master Jun 13, 2022
antonbabenko pushed a commit that referenced this pull request Jun 13, 2022
## [1.3.0](v1.2.0...v1.3.0) (2022-06-13)

### Features

* Add a new variable to control the creation of a lifecycle policy ([#4](#4)) ([18c0515](18c0515))
@antonbabenko
Copy link
Member

This PR is included in version 1.3.0 🎉

@github-actions
Copy link

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 13, 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.

repository_lifecycle_policy returns an error if omitted
3 participants