Terraform-provider-aws: Invalid keys in lifecycle of aws_backup_plan

Created on 9 Apr 2019  ·  2Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.13
+ provider.aws v2.5.0

Affected Resource(s)

  • aws_backup_plan

Terraform Configuration Files

resource "aws_backup_plan" "ebs_backups" {
  name = "tf_ebs_backups_plan"

  rule {
    rule_name         = "tf_ebs_backups_plan"
    target_vault_name = "${aws_backup_vault.ebs_backups.name}"
    schedule          = "cron(1 5 * * 1-7)"
  }

  lifecycle {
    cold_storage_after = 15
    delete_after = 24
  }
}

Debug Output

Error: Error loading modules: module backups: Error loading .terraform/modules/40d083c5d7dd869bf218d59fd2352d6b/plan.tf: 2 error(s) occurred:

* aws_backup_plan[ebs_backups]: invalid key: cold_storage_after
* aws_backup_plan[ebs_backups]: invalid key: delete_after

Panic Output

https://gist.github.com/dimisjim/e8ff4d0517c44b35ac92c4f1f5d4e03e

Expected Behavior

Proceed as expected. Those keys are valid, and documented in the tf doc.

Actual Behavior

See error above

Steps to Reproduce

  1. present in at least these cli commands: plan, init, get

Important Factoids

Running with dockerized latest official hashicorp/terraform:light docker image

Most helpful comment

Ok, this is closed. :man_facepalming:

lifecycle is part of the rule argument.

All 2 comments

Ok, this is closed. :man_facepalming:

lifecycle is part of the rule argument.

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings