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

aws_dlm_lifecycle_policy does not have an option to exclude root volume snapshots #23677

Closed
nazeemmohammed opened this issue Mar 14, 2022 · 4 comments · Fixed by #23880
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service.
Milestone

Comments

@nazeemmohammed
Copy link

While creating dlm policies using AWS UI, there is an option to exclude root volumes from snapshot. There doesn't seem to be similar option available while creating using terraform aws_dlm_lifecycle_policy module.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 14, 2022
@justinretzolk
Copy link
Member

Hey @nazeemmohammed 👋 Thank you for taking the time to raise this! So that we have all of the necessary information in order to look into this, can you update the issue description to include the information requested in the feature request template?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 15, 2022
@nazeemmohammed
Copy link
Author

Hi @justinretzolk below is my

variable "tags" {
    default = ["instance1", "instance2", "instance3"]
}
resource "aws_dlm_lifecycle_policy" "DLMCredcas_prd" {
    for_each = toset(var.tags)
    description = "DLM_${each.value}"
    execution_role_arn = "arn:aws:iam::xxxx:role/service-role/AWSDataLifecycleManagerDefaultRole"
    policy_details {
      resource_types = ["INSTANCE"]
      schedule {
        name = "${each.value}-snapshot-12hours"
        create_rule {
          interval      = 12
          interval_unit = "HOURS"
          times         = ["23:00"]
        }         
      retain_rule { count = 28 }
      copy_tags = false
    }
    target_tags = {
      Name = "${each.value}"
    }
   }
}

AWS provides below option to exclude root volumes which I do not find in terraform documentation.

Parameters:
ExcludeBootVolume: True

Also as per terraform documentation resource_types only allows VOLUME type which is not correct - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dlm_lifecycle_policy#resource_types

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 22, 2022
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service. labels Mar 24, 2022
@github-actions github-actions bot added this to the v4.9.0 milestone Mar 28, 2022
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

This functionality has been released in v4.9.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 8, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants