René's URL Explorer Experiment


Title: Research and document how to gracefully shut down agents using different terraform providers (update templates) · Issue #6174 · coder/coder · GitHub

Open Graph Title: Research and document how to gracefully shut down agents using different terraform providers (update templates) · Issue #6174 · coder/coder

X Title: Research and document how to gracefully shut down agents using different terraform providers (update templates) · Issue #6174 · coder/coder

Description: Also see #6175 To ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown procedure. What does graceful shutdown mean?...

Open Graph Description: Also see #6175 To ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown proc...

X Description: Also see #6175 To ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown proc...

Opengraph URL: https://github.com/coder/coder/issues/6174

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Research and document how to gracefully shut down agents using different terraform providers (update templates)","articleBody":"Also see https://github.com/coder/coder/issues/6175\n\nTo ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown procedure.\n\nWhat does graceful shutdown mean? It means the provider issues a `kill -INT [coder_agent_pid]` (one of `HUP`, `INT`, `TERM`) when the resource is stopped. After a specified timeout, it may issue `kill -KILL [coder_agent_pid]` to ensure de-provision progresses.\n\n**Note:** This will not be the primary form of ensuring an agent is stopped gracefully. In the ideal scenario, this happens in a pre-provision step and this acts as a safety net (https://github.com/coder/coder/issues/6175).\n\nWe need to figure out how to perform graceful shutdown with (or verify that it works):\n\n- [x] [kreuzwerker/terraform-provider-docker](https://github.com/kreuzwerker/terraform-provider-docker) (see below)\n- [ ] [hashicorp/terraform-provider-aws](https://github.com/hashicorp/terraform-provider-aws)\n\t- Is there a better option than trying to gracefully interrupt in user_data script?\n\t- Container [should work out-of-the-box](https://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/), timeout can be controlled via `stopTimeout`/ `ECS_CONTAINER_STOP_TIMEOUT`\n\t- Related: #5901\n- [ ] [hashicorp/terraform-provider-azurerm](https://github.com/hashicorp/terraform-provider-azurerm)\n- [ ] [digitalocean/terraform-provider-digitalocean](https://github.com/digitalocean/terraform-provider-digitalocean)\n\t- Droplets\n\t- K8S\n- [ ] [hashicorp/terraform-provider-google](https://github.com/hashicorp/terraform-provider-google)\n- [x] [hashicorp/terraform-provider-kubernetes](https://github.com/hashicorp/terraform-provider-kubernetes)\n\nEventually:\n- [ ] Update documentation and example templates\n\nRelated: #4677, #5914, #6139\n\n---\n\n**Docker:**\n```tf\nresource \"docker_container\" \"workspace\" {\n  destroy_grace_seconds = 30\n  stop_timeout          = 30\n  stop_signal           = \"SIGINT\"\n}\n```\n\n**EDIT:** It looks like `destroy_grace_seconds` is required to trigger a graceful stop, `stop_{timeout,signal}` is insufficient alone. It may be that `stop_{timeout,signal}` can be omitted in normal use-cases though (needs verification).\n\n- [`destroy_grace_seconds`](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#destroy_grace_seconds)\n- [`stop_signal`](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#stop_signal)\n- [`stop_timeout`](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#stop_timeout)","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2023-02-13T11:36:14Z","url":"https://github.com/coder/coder/issues/6174"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:478e0421-e22c-c62c-61ac-357a8658b9f4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDDC6:669A1:4B2BF0:6377D9:6B019B5B
html-safe-nonce44e54f18bef93a104b68b633d1fd35a114194e325751187d4e246d48de4440e3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREM2OjY2OUExOjRCMkJGMDo2Mzc3RDk6NkIwMTlCNUIiLCJ2aXNpdG9yX2lkIjoiODAwMzU4OTE5NzU5ODM5OTMyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1d34b6ace5e31efba344d39e53289ede0463df4520e3734d9729e4fdc3dcac14
hovercard-subject-tagissue:1582185481
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/6174/issue_layout
twitter:imagehttps://opengraph.githubassets.com/89c96f9157314e79fc0d8c15bcd014535d5e5c779f233737972e8689d6c957a0/coder/coder/issues/6174
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/89c96f9157314e79fc0d8c15bcd014535d5e5c779f233737972e8689d6c957a0/coder/coder/issues/6174
og:image:altAlso see #6175 To ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown proc...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemafredri
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/6174#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F6174
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F6174
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/6174
Reloadhttps://github.com/coder/coder/issues/6174
Reloadhttps://github.com/coder/coder/issues/6174
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/6174
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/6174
Chorehttps://github.com/coder/coder/issues?q=type:"Chore"
Research and document how to gracefully shut down agents using different terraform providers (update templates)https://github.com/coder/coder/issues/6174#top
docsArea: coder.com/docshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22docs%22
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Feb 13, 2023https://github.com/coder/coder/issues/6174#issue-1582185481
#6175https://github.com/coder/coder/issues/6175
#6175https://github.com/coder/coder/issues/6175
kreuzwerker/terraform-provider-dockerhttps://github.com/kreuzwerker/terraform-provider-docker
hashicorp/terraform-provider-awshttps://github.com/hashicorp/terraform-provider-aws
should work out-of-the-boxhttps://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/
Can the Coder agent immediately realize it's disconnected? #5901https://github.com/coder/coder/issues/5901
hashicorp/terraform-provider-azurermhttps://github.com/hashicorp/terraform-provider-azurerm
digitalocean/terraform-provider-digitaloceanhttps://github.com/digitalocean/terraform-provider-digitalocean
hashicorp/terraform-provider-googlehttps://github.com/hashicorp/terraform-provider-google
hashicorp/terraform-provider-kuberneteshttps://github.com/hashicorp/terraform-provider-kubernetes
#4677https://github.com/coder/coder/issues/4677
#5914https://github.com/coder/coder/pull/5914
#6139https://github.com/coder/coder/pull/6139
destroy_grace_secondshttps://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#destroy_grace_seconds
stop_signalhttps://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#stop_signal
stop_timeouthttps://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#stop_timeout
mafredrihttps://github.com/mafredri
docsArea: coder.com/docshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22docs%22
on Feb 13, 2023https://github.com/coder/coder/issues/6174#event-8503399973
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Mar 6, 2023https://github.com/coder/coder/issues/6174#issuecomment-1456354032
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Jun 9, 2023https://github.com/coder/coder/issues/6174#event-9478375248
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jun 17, 2023https://github.com/coder/coder/issues/6174#event-9557036780
mafredrihttps://github.com/mafredri
on Jul 4, 2023https://github.com/coder/coder/issues/6174#event-9719004512
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 5, 2023https://github.com/coder/coder/issues/6174#event-9725581414
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Sep 11, 2023https://github.com/coder/coder/issues/6174#issuecomment-1713792557
terraform-provider-kuberneteshttps://github.com/hashicorp/terraform-provider-kubernetes
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Mar 11, 2024https://github.com/coder/coder/issues/6174#event-12066753763
matifalihttps://github.com/matifali
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Mar 11, 2024https://github.com/coder/coder/issues/6174#event-12070623079
bpmcthttps://github.com/bpmct
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Apr 26, 2024https://github.com/coder/coder/issues/6174#event-12624383397
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Sep 26, 2024https://github.com/coder/coder/issues/6174#issuecomment-2377717055
#6175https://github.com/coder/coder/issues/6175
mafredrihttps://github.com/mafredri
on Sep 26, 2024https://github.com/coder/coder/issues/6174#event-14421302615
bpmcthttps://github.com/bpmct
on Sep 26, 2025https://github.com/coder/coder/issues/6174#event-19942857511
bpmcthttps://github.com/bpmct
on Sep 26, 2025https://github.com/coder/coder/issues/6174#event-19942866128
https://github.com/nickvigilante
nickvigilantehttps://github.com/nickvigilante
on May 29, 2026https://github.com/coder/coder/issues/6174#issuecomment-4580270385
DOCS-307https://linear.app/codercom/issue/DOCS-307/research-and-document-how-to-gracefully-shut-down-agents-using
nickvigilantehttps://github.com/nickvigilante
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 29, 2026https://github.com/coder/coder/issues/6174#event-26129829086
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/6174
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/6174
docsArea: coder.com/docshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22docs%22
Chorehttps://github.com/coder/coder/issues?q=type:"Chore"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.