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!: Upgraded Terraform version to 1.0+. Added wrappers. #249

Merged
merged 2 commits into from
May 23, 2022

Conversation

antonbabenko
Copy link
Member

@antonbabenko antonbabenko commented May 23, 2022

Fixed #240

It was not possible to fix elegantly for Terraform 0.13, so upgraded to Terraform requirements to be 1.0.

@antonbabenko antonbabenko changed the title feat: Upgraded Terraform version to 1.0+. Added wrappers. feat!: Upgraded Terraform version to 1.0+. Added wrappers. May 23, 2022
@antonbabenko antonbabenko merged commit 25d31ee into master May 23, 2022
@antonbabenko antonbabenko deleted the fix-lambda-targets branch May 23, 2022 15:45
antonbabenko pushed a commit that referenced this pull request May 23, 2022
## [7.0.0](v6.11.0...v7.0.0) (2022-05-23)

### ⚠ BREAKING CHANGES

* Upgraded Terraform version to 1.0+. Added wrappers. (#249)

### Features

* Upgraded Terraform version to 1.0+. Added wrappers. ([#249](#249)) ([25d31ee](25d31ee))
@antonbabenko
Copy link
Member Author

This PR is included in version 7.0.0 🎉

@@ -3,6 +3,7 @@ repos:
rev: v1.71.0
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
Copy link
Member

Choose a reason for hiding this comment

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

@antonbabenko what does this due to users who do not use Terragrunt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Several things. It allows users to work with one module instead of individual, if they prefer, e.g.:

module "alb" {
  items = {
    one = "..."
    two = "..."
  }
  # ...
}

or use fewer duplicated files (terragrunt.hcl) if they use terragrunt or other similar tools like terragrunt where for some reasons for_each is not an option (I saw a custom/legacy wrapper recently).

I use this approach exclusively with terragrunt (S3 bucket and object modules) and it is a life-saver code-saver. Some people use it with our EC2 instance module, and I think it is ok to be used with any other module (if a user wants).

This is rather handy when managing lots of similar smaller resources - IAM users, SNS, SQS, Lambdas, etc.

Wrappers have no extra logic or conditions.

@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 15, 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.

2 participants