Skip to content

Instantly share code, notes, and snippets.

@jacopen
Created October 5, 2021 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacopen/1e25de10071034f64e9eabf52b4c7027 to your computer and use it in GitHub Desktop.
Save jacopen/1e25de10071034f64e9eabf52b4c7027 to your computer and use it in GitHub Desktop.
Manage workspace with TFE Provider
data "tfe_organization" "sso_org" {
name = "kusama-sso-demo"
}
locals {
workspaces = toset(["child_ws01", "child_ws02"])
}
resource "tfe_workspace" "child_ws" {
for_each = local.workspaces
name = each.key
organization = data.tfe_organization.sso_org.name
}
resource "tfe_variable" "test" {
for_each = local.workspaces
key = "my_key_name"
value = "my_value_name"
category = "terraform"
workspace_id = tfe_workspace.child_ws[each.key].id
description = "a useful description"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment