René's URL Explorer Experiment


Title: feat: Declarative script execution ordering in the Terraform provider · Issue #22365 · coder/coder · GitHub

Open Graph Title: feat: Declarative script execution ordering in the Terraform provider · Issue #22365 · coder/coder

X Title: feat: Declarative script execution ordering in the Terraform provider · Issue #22365 · coder/coder

Description: Originally posted by @ewengillies in #10352 Problem coder_script resources run concurrently. There is no Terraform-level way to declare execution ordering between scripts or modules. The current workaround (coder exp sync) requires manua...

Open Graph Description: Originally posted by @ewengillies in #10352 Problem coder_script resources run concurrently. There is no Terraform-level way to declare execution ordering between scripts or modules. The current wo...

X Description: Originally posted by @ewengillies in #10352 Problem coder_script resources run concurrently. There is no Terraform-level way to declare execution ordering between scripts or modules. The current wo...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: Declarative script execution ordering in the Terraform provider","articleBody":" _Originally posted by @ewengillies in [#10352](https://github.com/coder/coder/issues/10352#issuecomment-3970887647)_\n\n## Problem\n\n`coder_script` resources run concurrently. There is no Terraform-level way to declare execution ordering between scripts or modules. The current workaround (`coder exp sync`) requires manually instrumenting every bash script with signaling boilerplate and is experimental.\n\nThis causes race conditions, failed startups, and makes composable modules unreliable.\n\n## Use cases\n\n### UC1 — Sequential scripts within a template\n\nA template has scripts that must run in order: configure SSH keys → clone repo → install dependencies. Today these race.\n\n### UC2 — Script depends on a module completing\n\nA template-level script (e.g. \"run AI agent on repo\") needs all scripts from the `git-clone` module to finish first. The template author should not need to know the module's internal script names.\n\n### UC3 — Module depends on another module\n\nThe `claude-code` module depends on the `git-clone` module. All scripts in `claude-code` should wait for all scripts in `git-clone` to complete. This must work without either module author hardcoding the other's internals.\n\n### UC4 — \"Run before everything\" (inverse dependency)\n\nA script that configures apt mirrors must run before any other script installs packages — including scripts inside third-party modules. Today there is no way to express \"run me first\" without modifying every downstream script.\n\n### UC5 — Resource contention (dpkg/apt lock)\n\nMultiple scripts that use `apt-get` fail with lock conflicts when run concurrently. Ordering or mutual exclusion must be expressible to prevent this.\n\n### UC6 — AI agent multi-step workflow\n\nA user needs this exact sequence, reliably:\n1. Bootstrap user config (SSH keys, git config)\n2. Clone repo (requires 1)\n3. Run coding agent on cloned repo (requires 2)\n4. Push changes (requires 1-3)\n\nAll of these currently run in parallel, regularly failing. (Ref: [comment](https://github.com/coder/coder/issues/10352#issuecomment-3005930975))\n\n### UC7 — Preserve parallelism for independent scripts\n\nScripts with no ordering relationship must continue to run concurrently. Ordering is opt-in and should not regress startup times.\n\n### UC8 — Clear failure propagation\n\nIf a script fails, dependent scripts should be skipped with a clear error indicating which upstream dependency failed.\n\n## Constraints\n\n- The solution must work across modules from the Coder registry without requiring module consumers to know internal script names.\n- Module authors must be able to expose ordering interfaces for their scripts.\n- The mechanism should be declarative in Terraform, not require bash-level instrumentation.\n- An RFC is likely warranted given the public API surface and complexity. See prior discussion on trade-offs between `order`, `run_after`, `depends_on`, and CLI-based signaling in [#10352](https://github.com/coder/coder/issues/10352).\n\n## References\n\n- https://github.com/coder/coder/issues/10352 — original issue and extensive design discussion\n- https://github.com/coder/registry/issues/82 — module-level ordering\n- https://coder.com/docs/admin/templates/startup-coordination/ — current `coder exp sync` docs\n- [Agent as init system](https://github.com/coder/coder/issues/10352#issuecomment-2456460809) — @spikecurtis on learning from prior art\n- [Inverse dependency gap](https://github.com/coder/coder/issues/10352#issuecomment-2449977975) — @mafredri on the need to run *before* other scripts","author":{"url":"https://github.com/matifali","@type":"Person","name":"matifali"},"datePublished":"2026-02-27T10:43:57Z","url":"https://github.com/coder/coder/issues/22365"}

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:4d1923db-6141-e1eb-e72f-b34cddeaa026
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCDF4:36A3E:1F66E67:29D7BAD:6B017CB8
html-safe-noncee1b1b750c60aac3604ff1c38f0896c515488806a088055d37126de8c8567e93a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREY0OjM2QTNFOjFGNjZFNjc6MjlEN0JBRDo2QjAxN0NCOCIsInZpc2l0b3JfaWQiOiIyMTMxMTc4NTYyMzcwMjM5NjcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac35843cab5d32aee2688a8eccc3b453ba02ab055054cbd7358caaa866f9c85266
hovercard-subject-tagissue:4000377212
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/22365/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e623c2b87a2ca6bf525d7170751217226ae0f95df577095b7b4d62aeb56d4f5e/coder/coder/issues/22365
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e623c2b87a2ca6bf525d7170751217226ae0f95df577095b7b4d62aeb56d4f5e/coder/coder/issues/22365
og:image:altOriginally posted by @ewengillies in #10352 Problem coder_script resources run concurrently. There is no Terraform-level way to declare execution ordering between scripts or modules. The current wo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamematifali
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/22365#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F22365
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%2F22365
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/22365
Reloadhttps://github.com/coder/coder/issues/22365
Reloadhttps://github.com/coder/coder/issues/22365
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/22365
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/22365
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
feat: Declarative script execution ordering in the Terraform providerhttps://github.com/coder/coder/issues/22365#top
https://github.com/matifali
https://github.com/matifali
matifalihttps://github.com/matifali
on Feb 27, 2026https://github.com/coder/coder/issues/22365#issue-4000377212
@ewengillieshttps://github.com/ewengillies
#10352https://github.com/coder/coder/issues/10352#issuecomment-3970887647
commenthttps://github.com/coder/coder/issues/10352#issuecomment-3005930975
#10352https://github.com/coder/coder/issues/10352
feat: allow execution ordering for coder_script #10352https://github.com/coder/coder/issues/10352
feat: allow execution ordering of coder modules registry#82https://github.com/coder/registry/issues/82
https://coder.com/docs/admin/templates/startup-coordination/https://coder.com/docs/admin/templates/startup-coordination/
Agent as init systemhttps://github.com/coder/coder/issues/10352#issuecomment-2456460809
@spikecurtishttps://github.com/spikecurtis
Inverse dependency gaphttps://github.com/coder/coder/issues/10352#issuecomment-2449977975
@mafredrihttps://github.com/mafredri
matifalihttps://github.com/matifali
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
on Feb 27, 2026https://github.com/coder/coder/issues/22365#event-23132428314
matifalihttps://github.com/matifali
on Apr 17, 2026https://github.com/coder/coder/issues/22365#event-24595062256
https://github.com/matifali
matifalihttps://github.com/matifali
on Nov 5, 2026https://github.com/coder/coder/issues/22365#issuecomment-6652013584
https://coder.com/docs/admin/templates/extending-templates/script-orderinghttps://coder.com/docs/admin/templates/extending-templates/script-ordering
https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/script_orderhttps://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/script_order
matifalihttps://github.com/matifali
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 5, 2026https://github.com/coder/coder/issues/22365#event-35213543898
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/22365
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/22365
matifalihttps://github.com/matifali
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
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.