Title: feat(cli): add `--default-ttl` to `coder templates push` · Issue #32000 · coder/coder · GitHub
Open Graph Title: feat(cli): add `--default-ttl` to `coder templates push` · Issue #32000 · coder/coder
X Title: feat(cli): add `--default-ttl` to `coder templates push` · Issue #32000 · coder/coder
Description: Part of #31998. coder templates create --default-ttl sets the template's default autostop. coder templates push has no equivalent flag. The two commands give new templates different defaults. create defaults --default-ttl to 24h and alwa...
Open Graph Description: Part of #31998. coder templates create --default-ttl sets the template's default autostop. coder templates push has no equivalent flag. The two commands give new templates different defaults. creat...
X Description: Part of #31998. coder templates create --default-ttl sets the template's default autostop. coder templates push has no equivalent flag. The two commands give new templates different defaults. c...
Opengraph URL: https://github.com/coder/coder/issues/32000
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(cli): add `--default-ttl` to `coder templates push`","articleBody":"Part of #31998.\n\n`coder templates create --default-ttl` sets the template's default autostop. `coder templates push` has no equivalent flag.\n\n**The two commands give new templates different defaults.** `create` defaults `--default-ttl` to `24h` and [always sends it](https://github.com/coder/coder/blob/e6a795b4c3b00a5c1e576137f3540e9a9fdbbe76/cli/templatecreate.go#L153-L157). `push` sends nothing, and the server then [uses 0](https://github.com/coder/coder/blob/e6a795b4c3b00a5c1e576137f3540e9a9fdbbe76/coderd/templates.go#L300-L311), meaning no default autostop. So the same template directory gets different autostop behavior depending on which command created it.\n\n**What to change**\n- New template: set `CreateTemplateRequest.DefaultTTLMillis`.\n- Existing template: send `UpdateTemplateMeta.DefaultTTLMillis` only when the user sets the flag.\n- No license needed.\n- **Decision needed:** should `push` default to `24h` for new templates to match `create`, or keep the server default and only send the value when the flag is set? Matching `create` changes behavior for anyone who already creates templates with `push`.\n\n**Scope:** Small (S), about 20 lines plus a test, once the default is decided.\n\nCreated on behalf of @angrycub\n","author":{"url":"https://github.com/apps/coder","@type":"Person","name":"coder"},"datePublished":"2026-11-10T16:36:01Z","url":"https://github.com/coder/coder/issues/32000"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ccb5ab54-9717-0dbc-1040-b3e8fb27726b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E53E:3134C2:1027F4F:16A19E0:6B044A5E |
| html-safe-nonce | 698bc27fb901131069b129fb0099775544e5613aa56c8b9379a397e3e6764185 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTNFOjMxMzRDMjoxMDI3RjRGOjE2QTE5RTA6NkIwNDRBNUUiLCJ2aXNpdG9yX2lkIjoiODI5MTExMzkzMjA5ODM5MDYyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0f80ba8a0ffa2df84f1d52182d58ec54f94ce8e38e1ee1ef7202642a7994882a |
| hovercard-subject-tag | issue:6311273972 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/32000/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53851cd86e0b9980bd85cf92b1b7233e418cccaa877147df9a599c8a50de3916/coder/coder/issues/32000 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53851cd86e0b9980bd85cf92b1b7233e418cccaa877147df9a599c8a50de3916/coder/coder/issues/32000 |
| og:image:alt | Part of #31998. coder templates create --default-ttl sets the template's default autostop. coder templates push has no equivalent flag. The two commands give new templates different defaults. creat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | coder[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width