Created
October 5, 2021 07:28
-
-
Save jacopen/1e25de10071034f64e9eabf52b4c7027 to your computer and use it in GitHub Desktop.
Manage workspace with TFE Provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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