-
Notifications
You must be signed in to change notification settings - Fork 886
chore(examples/templates/azure-windows): remove dependency on az
CLI
#16039
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
Conversation
@@ -31,5 +31,34 @@ This template provisions the following resources: | |||
|
|||
This means, when the workspace restarts, any tools or files outside of the data directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script). | |||
|
|||
> **Note** | |||
> [!NOTE] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we render these within Coder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking, will check!
```hcl | ||
# Stop the VM | ||
resource "null_resource" "stop_vm" { | ||
count = data.coder_workspace.me.transition == "stop" ? 1 : 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count = data.coder_workspave.me.start_count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matifali I'm not sure though, the issue is that if we use it for stopping, then it will look something like count = data.coder_workspave.me.start_count == 1 ? 0 : 1
, we should have data.coder_workspave.me.stop_count
i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"stop" ? 1 : 0
is fine. Adding a stop_count
is too niche.
The PR title gives the impression that we are merging the templates into one which we aren't. |
azure-linux
and azure-windows
templatesaz
CLI
This PR makes it so that the
az
CLI is not necessary anymore to run theazure-windows
template, and also unifies the README between the two Azure templates while we're at it.