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

provider/docker: Add destroy_grace_seconds option to stop container before delete #7513

Merged
merged 1 commit into from
Jul 11, 2016

Conversation

magnumopus
Copy link
Contributor

This PR adds an option for stopping containers before delete on destroy actions. This is useful for causing containers to execute graceful shutdown processes e.g. deregistration from Consul or alerting solutions, draining db nodes, etc. Takes an integer which defines the timeout of the docker stop command.

@stack72
Copy link
Contributor

stack72 commented Jul 11, 2016

Hi @magnumopus

This looks good to me - the test results are as follows:

% make testacc TEST=./builtin/providers/docker TESTARGS='-run=TestAccDockerContainer_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/docker -v -run=TestAccDockerContainer_ -timeout 120m
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (25.87s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (23.82s)
=== RUN   TestAccDockerContainer_customized
--- PASS: TestAccDockerContainer_customized (34.24s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/docker 83.943s

@stack72 stack72 merged commit fc838be into hashicorp:master Jul 11, 2016
@ghost
Copy link

ghost commented Apr 24, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants