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

terraform apply w/ v3.0 of the module results in a loop with removal of options and then subsequent re-adding of options such as server side encryption, logging etc. #144

Closed
jaybocc2 opened this issue Apr 2, 2022 · 1 comment · Fixed by #145

Comments

@jaybocc2
Copy link
Contributor

jaybocc2 commented Apr 2, 2022

Description

terraform apply w/ v3.0 of the module results in a loop with removal of options and then subsequent re-adding of options such as server side encryption, logging etc.

This is caused by missing the lifecycle rules that are required to use the 4.x style bucket calls in 3.75.1
https://registry.terraform.io/providers/hashicorp/aws/3.75.1/docs/resources/s3_bucket_replication_configuration#usage-notes

Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the examples/* directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running terraform init && terraform apply without any further changes.

If your request is for a new feature, please use the Feature request template.

  • [❌ ] ✋ I have searched the open/closed issues and my issue is not listed.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Module version [Required]:

  • Terraform version:
    1.1.7

  • Provider version(s):
    aws 3.75.1

Reproduction Code [Required]

module "mybucket" {
  source = "registry.terraform.io/terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.0"

  bucket = "mybucket"
  logging = {
    target_bucket = "my-access-log-bucket"
    target_prefix = "mybucket/"
  }
}

Steps to reproduce the behavior:
do multiple applies. the plan/apply will always differ either adding the logging rule via s3_bucket_logging or removing it via s3_bucket.

yes

yes

upgraded to aws 3.75.1 due to oopsie upgrade to 3.0 of module

Expected behavior

buckets to consistently configure

Actual behavior

enters loop with bucket configures, reconfigures

Terminal Output Screenshot(s)

Additional context

@github-actions
Copy link

I'm going to lock this issue 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 similar to this, 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 Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant