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

[Feature] Allow Bucket Destruction via Code #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hikerspath
Copy link

Description

User will end up with the following error message when attempting to destroy presently...

│ Error: Instance cannot be destroyed
│
│   on .terraform/modules/coralogix_s3/modules/provisioning/s3-archive/main.tf line 16:
│   16: resource "aws_s3_bucket" "logs_bucket_name" {
│
│ Resource module.coralogix_s3.aws_s3_bucket.logs_bucket_name[0] has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed. To avoid this error and continue with the plan, either
│ disable lifecycle.prevent_destroy or reduce the scope of the plan using the -target flag.

How Has This Been Tested?

Setting lifecycle to false and running code manually after downloading the module w/ terraform init and then running a terraform destroy.

Checklist:

  • I have updated the relevant example in the examples directory for the module.
  • I have updated the relevant test file for the module.
  • This change does not affect module (e.g. it's readme file change)

@hikerspath hikerspath requested a review from a team as a code owner November 14, 2023 21:43
Copy link
Contributor

@guyrenny guyrenny left a comment

Choose a reason for hiding this comment

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

Hi @hikerspath, thank you for your suggestion,
Just need to add small changes:

  1. When we add a new variable to module we also need to add him in the readme file of the module and to the variable.tf under the example folder examples/s3-archive/varibales.tf
  2. We want to keep track on the changes that we make, so if you could also add an entry in the changelog file of the module.

Other then this changes everything looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants