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: Replace deprecated is_enabled with state in EventBridge rules #119

Merged
merged 4 commits into from
Apr 23, 2024

Conversation

hammy414
Copy link
Contributor

Description

Updated the aws_cloudwatch_event_rule resource definition in the Terraform configuration to replace the deprecated is_enabled attribute with the state attribute. This change ensures compatibility with the latest versions of the AWS provider.

Motivation and Context

This change is required to address deprecation warnings from the AWS provider for Terraform. The use of is_enabled has been deprecated and replaced by state, which is now required to define the enabled or disabled status of CloudWatch Event Rules.
Resolving this prevents potential issues with future versions of the AWS provider that may no longer support the is_enabled attribute, ensuring the stability and maintainability of the infrastructure code.

Breaking Changes

This change does not break backwards compatibility with the current major version of the module, as it merely replaces a deprecated attribute with its recommended alternative.
Users who rely on older versions of the AWS provider (before the introduction of the state attribute) should consider upgrading their provider to continue using this module.

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
  • ❯ pre-commit run -a
    [INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
    [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
    [INFO] Once installed this environment will be reused.
    [INFO] This may take a few minutes...
    Terraform fmt............................................................Passed
    Terraform docs...........................................................Passed
    Terraform validate with tflint...........................................Passed
    Terraform validate.......................................................Passed
    check for merge conflicts................................................Passed
    fix end of files.........................................................Passed
    trim trailing whitespace.................................................Passed

@hammy414 hammy414 marked this pull request as ready for review April 18, 2024 19:58
@T0tt1
Copy link

T0tt1 commented Apr 23, 2024

+1 for moving fw with this PR.

@T0tt1
Copy link

T0tt1 commented Apr 23, 2024

@antonbabenko this looks like quick fix and easy to adopt in the module. It will allow all of us to stop be annoyed by the constant warnings during TF plan/apply.

main.tf Outdated Show resolved Hide resolved
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
main.tf Outdated Show resolved Hide resolved
@antonbabenko antonbabenko changed the title feat(eventbridge): Replace deprecated is_enabled with state in CloudWatch event rules feat: Replace deprecated is_enabled with state in EventBridge rules Apr 23, 2024
@antonbabenko antonbabenko merged commit 920138a into terraform-aws-modules:master Apr 23, 2024
16 checks passed
antonbabenko pushed a commit that referenced this pull request Apr 23, 2024
## [3.3.0](v3.2.4...v3.3.0) (2024-04-23)

### Features

* Replace deprecated is_enabled with state in EventBridge rules ([#119](#119)) ([920138a](920138a))
@antonbabenko
Copy link
Member

This PR is included in version 3.3.0 🎉

@T0tt1
Copy link

T0tt1 commented Apr 23, 2024

Great news! Thank you for prompt response.

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 May 24, 2024
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.

3 participants