Skip to content

feat(examples/templates/azure-windows): add azure region and windows-rdp modules #15516

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

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(example/templates/azure-windows): use azure region module
  • Loading branch information
phorcys420 committed Jan 7, 2025
commit 396855fc74e6f8de448e7d4226b340c91b75fca3
36 changes: 10 additions & 26 deletions examples/templates/azure-windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,17 @@ provider "azurerm" {
features {}
}

provider "coder" {
}

provider "coder" {}
data "coder_workspace" "me" {}

data "coder_parameter" "location" {
description = "What location should your workspace live in?"
display_name = "Location"
name = "location"
default = "eastus"
mutable = false
option {
value = "eastus"
name = "East US"
}
option {
value = "centralus"
name = "Central US"
}
option {
value = "southcentralus"
name = "South Central US"
}
option {
value = "westus2"
name = "West US 2"
}
# See https://registry.coder.com/modules/azure-region
module "azure_region" {
source = "registry.coder.com/modules/azure-region/coder"

# This ensures that the latest version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production.
version = ">= 1.0.0"

default = "eastus"
}

data "coder_parameter" "data_disk_size" {
Expand Down Expand Up @@ -77,7 +61,7 @@ locals {

resource "azurerm_resource_group" "main" {
name = "${local.prefix}-${data.coder_workspace.me.id}"
location = data.coder_parameter.location.value
location = module.azure_region.value
tags = {
Coder_Provisioned = "true"
}
Expand Down
Loading