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

Add possibility to deselect resources with tags #93

Open
travenin opened this issue Oct 30, 2024 · 0 comments · May be fixed by #94
Open

Add possibility to deselect resources with tags #93

travenin opened this issue Oct 30, 2024 · 0 comments · May be fixed by #94

Comments

@travenin
Copy link

Describe the Feature

I want to select all features as default, but unselect some resources with tags. I though I could use selection_tags for this:

  backup_resources = ["*"]
  selection_tags = [
    {
      type  = "STRINGNOTEQUALS"
      key   = "disable_backup"
      value = "true"
    }
  ]

Expected Behavior

The backup plan should have conditions to select all resources except those with a tag disable_backup = true.

Currently (v1.0.2) I get an error that only string equals is supported as selection condition:

Error: expected type to be one of ["STRINGEQUALS"], got STRINGNOTEQUALS

with module.backup.module.backup.aws_backup_selection.default[0],
on .terraform/modules/backup.backup/main.tf line 134, in resource "aws_backup_selection" "default":
134: resource "aws_backup_selection" "default" {

Use Case

It would be handy to select all resources and then opt out some resources from backups.

Describe Ideal Solution

Support string_not_equals type of condition.

Alternatives Considered

No response

Additional Context

No response

@leonardobiffi leonardobiffi linked a pull request Nov 11, 2024 that will close this issue
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.

1 participant