Files
coder/provisioner/terraform/testdata/mapped-apps/mapped-apps.tf
T
Kyle CarberryandColin Adler 3364abecdd chore: generate terraform testdata with matching terraform version (#13343)
Terraform changed the default output of the `terraform graph` command. You must put `-type=plan` to keep the prior behavior.


Co-authored-by: Colin Adler <colin1adler@gmail.com>
2024-05-22 12:45:47 -05:00

39 lines
531 B
Terraform

terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.22.0"
}
}
}
resource "coder_agent" "dev" {
os = "linux"
arch = "amd64"
}
locals {
apps_map = {
"app1" = {
name = "app1"
}
"app2" = {
name = "app2"
}
}
}
resource "coder_app" "apps" {
for_each = local.apps_map
agent_id = coder_agent.dev.id
slug = each.key
display_name = each.value.name
}
resource "null_resource" "dev" {
depends_on = [
coder_agent.dev
]
}