( workspace: TypesGen.Workspace, canChangeVersions: boolean, )
| 267 | }; |
| 268 | |
| 269 | const workspaceUpdatePolicy = ( |
| 270 | workspace: TypesGen.Workspace, |
| 271 | canChangeVersions: boolean, |
| 272 | ): TypesGen.AutomaticUpdates => { |
| 273 | // If a template requires the active version and you cannot change versions |
| 274 | // (restricted to template admins), then your policy must be "Always". |
| 275 | if (workspace.template_require_active_version && !canChangeVersions) { |
| 276 | return "always"; |
| 277 | } |
| 278 | return workspace.automatic_updates; |
| 279 | }; |
| 280 | |
| 281 | // These resources (i.e. docker_image, kubernetes_deployment) map to Terraform |
| 282 | // resource types. These are the most used ones and are based on user usage. |
no outgoing calls
no test coverage detected