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

Feature request: Lifecycle Management for Amazon EBS Snapshots #5176

Closed
drmaciej opened this issue Jul 13, 2018 · 7 comments · Fixed by #5558
Closed

Feature request: Lifecycle Management for Amazon EBS Snapshots #5176

drmaciej opened this issue Jul 13, 2018 · 7 comments · Fixed by #5558
Labels
new-resource Introduces a new resource. service/dlm Issues and PRs that pertain to the dlm service.
Milestone

Comments

@drmaciej
Copy link

As per https://aws.amazon.com/blogs/aws/new-lifecycle-management-for-amazon-ebs-snapshots/.

@bflad bflad added new-resource Introduces a new resource. service/dlm Issues and PRs that pertain to the dlm service. labels Jul 13, 2018
@bflad
Copy link
Contributor

bflad commented Jul 17, 2018

Dependency pull request submitted: #5211

SDK Reference: https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/

It looks like this can be a single new resource, something like:

# Implementation may change during development
resource "aws_dlm_lifecycle_policy" "example" {
  description = ""
  executution_role_arn = ""
  state = ""

  policy_details {
    resource_types = []
    target_tag = {}

    schedule {
      name = ""

      create_rule {
        interval = #
        interval_unit = ""
      }

      retain_rule {
        count = #
      }
    }
  }
}

@tomelliff
Copy link
Contributor

If I get some spare time in the next couple of days I'm going to start on this so I can replace my slightly janky Lambda functions that snapshot EBS volumes across our accounts.

@sagyp
Copy link

sagyp commented Aug 7, 2018

Is there any update on this feature?

@tomelliff
Copy link
Contributor

Sorry for the delay, company moved office so I've had a busy couple of weeks recently. I started hacking on the resource this morning but I'm seeing a date parsing error from the SDK that is confusing me right now.

Once I work out what's wrong with that then I'll sort updates, fix a bunch of TODO's, generally clear things up then add tests and documentation. Very early WIP is viewable at master...tomelliff:dlm-lifecycle-policy-resource if anyone wants to track progress before I raise a pull request.

If anyone happens to know if there's a way I can handle the SDK attempting to parse the created/modified timestamps wrong (see aws/aws-sdk-go#2100) then it would be good if they could point me in the right direction. Right now it seems like the SDK is wrong but that surprises me and I suspect I must be doing something wrong instead although I'm not sure what.

tomelliff added a commit to tomelliff/terraform-provider-aws that referenced this issue Nov 5, 2018
@bflad bflad added this to the v1.43.0 milestone Nov 6, 2018
@bflad
Copy link
Contributor

bflad commented Nov 6, 2018

Support for managing DLM Lifecycle Policies via a new aws_dlm_lifecycle_policy resource has been merged and will release with version 1.43.0 of the AWS provider, likely later today or tomorrow.

Special shout out to @tomelliff for going above and beyond to work with AWS to get the blocking issue resolved! 🚀

@bflad
Copy link
Contributor

bflad commented Nov 7, 2018

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

@ghost
Copy link

ghost commented Apr 2, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/dlm Issues and PRs that pertain to the dlm service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants