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

Change advanced_backup_setting.backup_options map(string) #96

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cwallace-omg
Copy link

what

  • Change the variable advanced_backup_setting.backup_options from type string to type map(string).

why

If the advanced_backup_setting.backup_options variable is a string, this results in an error when planning or applying:

16:21:12.722 ERROR  terraform invocation failed in /tmp/terragrunt-cache/-FDnhxSQgd3gy3AJn3jI-TkIT9c/DzZH2oKvEUO4zTXgeTgdoazRmVw
16:21:12.722 ERROR  error occurred:

* Failed to execute "terraform plan" in /tmp/terragrunt-cache/-FDnhxSQgd3gy3AJn3jI-TkIT9c/DzZH2oKvEUO4zTXgeTgdoazRmVw
  ╷
  │ Error: Incorrect attribute value type
  │ 
  │   on main.tf line 93, in resource "aws_backup_plan" "default":
  │   93:       backup_options = var.advanced_backup_setting.backup_options
  │     ├────────────────
  │     │ var.advanced_backup_setting.backup_options is "{ WindowsVSS = \"enabled\" }"
  │ 
  │ Inappropriate value for attribute "backup_options": map of string required.
  ╵
  
  exit status 1

The provider helpfully suggests: Inappropriate value for attribute "backup_options": map of string required.. Making this change results in a successful plan.

references

The Example Usage demonstrates the use of a map for this parameter:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/backup_plan#example-usage

@cwallace-omg cwallace-omg requested review from a team as code owners February 19, 2025 22:43
@mergify mergify bot added the triage Needs triage label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant