Skip to content

Commit

Permalink
fix(bootstrap): Deprecations in TF code (#114)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Kim Iversen <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent db756d7 commit 11c109d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
24 changes: 12 additions & 12 deletions bootstrap/federated_identity_credential.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
resource "azuread_application_federated_identity_credential" "tfc-plan" {
application_object_id = azuread_application.workload.object_id
display_name = "plan"
description = "Authenticate Station from Terraform Cloud to Azure"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://app.terraform.io"
subject = "organization:${var.tfc_organization_name}:project:${var.tfc_project_name}:workspace:${var.deployments_tfc_workspace_name}:run_phase:plan"
application_id = azuread_application.workload.id
display_name = "plan"
description = "Authenticate Station from Terraform Cloud to Azure"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://app.terraform.io"
subject = "organization:${var.tfc_organization_name}:project:${var.tfc_project_name}:workspace:${var.deployments_tfc_workspace_name}:run_phase:plan"
}

resource "azuread_application_federated_identity_credential" "tfc-apply" {
application_object_id = azuread_application.workload.object_id
display_name = "apply"
description = "Authenticate Station from Terraform Cloud to Azure"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://app.terraform.io"
subject = "organization:${var.tfc_organization_name}:project:${var.tfc_project_name}:workspace:${var.deployments_tfc_workspace_name}:run_phase:apply"
application_id = azuread_application.workload.id
display_name = "apply"
description = "Authenticate Station from Terraform Cloud to Azure"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://app.terraform.io"
subject = "organization:${var.tfc_organization_name}:project:${var.tfc_project_name}:workspace:${var.deployments_tfc_workspace_name}:run_phase:apply"
}
14 changes: 9 additions & 5 deletions bootstrap/tfe_workspace.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
resource "tfe_workspace" "bootstrap" {
name = var.bootstrap_tfc_workspace_name
organization = data.tfe_organization.this.name
project_id = tfe_project.station.id
description = "This workspace contains state for the bootstrap procedure for Station. Repo URL: ${var.bootstrap_repo_url}"
name = var.bootstrap_tfc_workspace_name
organization = data.tfe_organization.this.name
project_id = tfe_project.station.id
description = "This workspace contains state for the bootstrap procedure for Station. Repo URL: ${var.bootstrap_repo_url}"
force_delete = true
}

resource "tfe_workspace_settings" "bootstrap-settings" {
workspace_id = tfe_workspace.bootstrap.id
execution_mode = "local"
force_delete = true
}

locals {
Expand Down

0 comments on commit 11c109d

Please sign in to comment.