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 re-creates backup selection everytime. #48

Closed
mukundparmar opened this issue Jan 25, 2022 · 1 comment · Fixed by #49
Closed

Terraform re-creates backup selection everytime. #48

mukundparmar opened this issue Jan 25, 2022 · 1 comment · Fixed by #49

Comments

@mukundparmar
Copy link

Module version 12.0.0

Terraform apply re-creates the ab_section everytime you run apply.

  # module.aws_backup_vault.aws_backup_selection.ab_selection[0] has been changed
! resource "aws_backup_selection" "ab_selection" {
        id            = "264bce4b-xxxxx-xxxxxxx-xxxxx"
        name          = "default"
+       not_resources = []
        # (3 unchanged attributes hidden)

+       condition {
        }
    }
    
   <skipped> 

  # module.aws_backup_vault.aws_backup_selection.ab_selection[0] must be replaced
-/+ resource "aws_backup_selection" "ab_selection" {
!       id            = "264bce4b-xxxxx-xxxxxxx-xxxxx" -> (known after apply)
        name          = "default"
-       not_resources = [] -> null
        # (3 unchanged attributes hidden)

-       condition { # forces replacement
        }
    }

Plan: 1 to add, 4 to change, 5 to destroy.
   

TF module configuration

module "aws_backup_vault" {

  source  = "lgallard/backup/aws"
  version = "0.12.0"

I guess it's because terraform aws_backup_selection backup requires variable not_resources = [] and conditions. At this moment I can provide only the terraform plan but let me know if you need more information.

tchernomax added a commit to tchernomax/terraform-aws-backup that referenced this issue Jan 25, 2022
@lgallard
Copy link
Owner

lgallard commented Jan 25, 2022

@mukundparmar thanks for reporting the issue. It seems that was introduced in the AWS provider version 3.72.0

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 a pull request may close this issue.

2 participants