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

r/aws_ebs_volume: Termination Snapshot #2715

Closed

Conversation

johananl
Copy link

@johananl johananl commented Dec 20, 2017

This PR addresses issue #2109 by @catsby (termination snapshot for EBS volumes).

@johananl johananl changed the title [WIP] [WIP] - EBS Volume Termination Snapshot Dec 20, 2017
@johananl johananl changed the title [WIP] - EBS Volume Termination Snapshot [WIP] - aws_ebs_volume Termination Snapshot Dec 20, 2017
@johananl johananl changed the title [WIP] - aws_ebs_volume Termination Snapshot [WIP] - r/aws_ebs_volume Termination Snapshot Dec 20, 2017
@jen20
Copy link
Contributor

jen20 commented Dec 20, 2017

Hi @johananl! I can't speak for the Terraform team with regards to the first question (I'm not aware of much additional functionality outside of the AWS API implemented like this), but I can provide some guidance on the second:

Testing in this case consists of a bunch of steps - create an instance with a volume, destroy it, and ensure that the termination snapshot is created. Also ensure that no snapshot is created if the option is not enabled (an existing test can likely be modified for this). You'll then want to tidy up the created snapshot so it doesn't sit around indefinitely. A good example might be the tests that attach a volume to an instance - you'll likely need multiple test steps.

@jen20 jen20 added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 20, 2017
@catsby
Copy link
Contributor

catsby commented Jan 4, 2018

Thanks for answering those, @jen20 !

An example pattern you could follow is with aws_db_instance and how it handles checking for the snapshot:

For now, I would suggest this PR/effort to focus on only ebs_volume. Nested volumes on aws_instance have their own peculiarities to work out that may just hinder getting this released

@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from a2f74c1 to 873645f Compare January 26, 2018 14:48
@bflad bflad added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from 873645f to 24a21fc Compare March 2, 2018 21:21
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Mar 2, 2018
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from 8048f8e to f851f90 Compare March 24, 2018 20:45
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Mar 24, 2018
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from d549d08 to f2ece81 Compare April 2, 2018 19:12
@ghost ghost added size/M Managed by automation to categorize the size of a PR. size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Apr 2, 2018
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from 9124b92 to 6698621 Compare April 7, 2018 23:26
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Apr 7, 2018
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from 6698621 to 1ac5e84 Compare April 7, 2018 23:28
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Apr 7, 2018
@johananl johananl changed the title [WIP] - r/aws_ebs_volume Termination Snapshot r/aws_ebs_volume Termination Snapshot Apr 7, 2018
@johananl johananl changed the title r/aws_ebs_volume Termination Snapshot r/aws_ebs_volume: Termination Snapshot Apr 7, 2018
@johananl
Copy link
Author

Hey @catsby. Just wanted to make sure you guys have noticed I removed the [WIP] from this PR :-)
I'm sorry it took me a while to implement - this is my first Terraform feature contribution and I wanted to do this right.

Any feedback is welcome!

@DanielMarquard
Copy link

Can this PR still be merged? I have a use case for this that will cut my costs substantially.

Thank you for your contribution, @johananl. 😃

@jen20
Copy link
Contributor

jen20 commented Jun 20, 2018

Hi @DanielMarquard and @johananl! I've had a look through the code here and it looks good to me. However, it needs further input from someone at HashiCorp about whether they wish to implement things which don't map 1:1 to an available API function, and I don't want to merge this until that happens. Thanks for contributing!

@DanielMarquard
Copy link

It may not be a 1:1 API function, but I'm pretty sure it's supported in CloudFormation, so to me it would make sense to be included as part of Terraform.

Hope it gets approved. 😃

@johananl
Copy link
Author

johananl commented Jun 26, 2018

Thanks for the feedback @jen20 @DanielMarquard.

However, it needs further input from someone at HashiCorp about whether they wish to implement things which don't map 1:1 to an available API function, and I don't want to merge this until that happens.

Please see #2109 which was opened by @catsby from HashiCorp. I actually raised the same question before implementing this and the answer was - yes, we should implement it.

However, I agree it's better if someone from HashiCorp takes a look before merging.

@DanielMarquard
Copy link

Any input from Hashicorp on this merge request? We really need this at the Department of Justice, among other departments my company contracts to.

@johananl
Copy link
Author

@catsby @bill-rich ?

@tareks
Copy link

tareks commented Jan 15, 2019

Any updates on this? Looking at following this approach (similar to RDS) for certain EBS volumes. If it's not happening, then may need to consider another option.

@johananl
Copy link
Author

@catsby @bill-rich - would love to get your feedback on this.

There is also a similar issue which can probably be resolved in a similar way. I'll go ahead and implement it as soon as this one is done.

If there are changes required I'd love to quickly push fixes. Waiting eagerly for your feedback :-)

@aeschright aeschright requested a review from a team June 25, 2019 18:51
@johananl johananl force-pushed the f-ebs-volume-termination-snapshot branch from 1ac5e84 to d74ab5a Compare August 3, 2019 13:38
@ghost ghost added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Aug 3, 2019
@johananl
Copy link
Author

johananl commented Aug 3, 2019

Rebased over current master as things broke in the meantime.

CI is green. make testacc passes on my testing.

@catsby @bill-rich @aeschright I'm not losing hope! ;-)

Base automatically changed from master to main January 23, 2021 00:55
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:55
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@ewbankkit
Copy link
Contributor

Superseded by #11118.

@ewbankkit ewbankkit closed this Dec 31, 2021
@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants