-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move azurerm federated identity credential (#1553)
* Move azurerm_federated_identity_credential to pre-cluster section * Remove module.aks from depenendcy * Update azapi in active clusters * Remove config from playground --------- Co-authored-by: Automatic Update <radix@statoilsrm.onmicrosoft.com>
- Loading branch information
Showing
15 changed files
with
127 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
107 changes: 54 additions & 53 deletions
107
terraform/subscriptions/s941/dev/post-clusters/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
data "azurerm_user_assigned_identity" "grafana" { | ||
resource_group_name = "monitoring" | ||
name = "radix-id-grafana-admin-${module.config.environment}" | ||
} | ||
|
||
resource "azurerm_federated_identity_credential" "grafana-mi-fedcred" { | ||
for_each = module.clusters.oidc_issuer_url | ||
|
||
audience = ["api://AzureADTokenExchange"] | ||
name = "k8s-grafana-${each.key}" | ||
issuer = each.value | ||
subject = "system:serviceaccount:monitor:grafana" | ||
parent_id = data.azurerm_user_assigned_identity.grafana.id | ||
resource_group_name = data.azurerm_user_assigned_identity.grafana.resource_group_name | ||
depends_on = [module.aks] | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
data "azurerm_user_assigned_identity" "velero" { | ||
resource_group_name = module.config.common_resource_group | ||
name = "radix-id-velero-${module.config.environment}" | ||
} | ||
|
||
resource "azurerm_federated_identity_credential" "velero-mi-fedcred" { | ||
for_each = module.clusters.oidc_issuer_url | ||
|
||
audience = ["api://AzureADTokenExchange"] | ||
name = "k8s-velero-${each.key}-${module.config.environment}" | ||
issuer = each.value | ||
subject = "system:serviceaccount:velero:velero" | ||
parent_id = data.azurerm_user_assigned_identity.velero.id | ||
resource_group_name = module.config.common_resource_group | ||
depends_on = [module.aks] | ||
} |
This file contains 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
16 changes: 16 additions & 0 deletions
16
terraform/subscriptions/s941/playground/pre-clusters/cert-manager.tf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
data "azurerm_user_assigned_identity" "cert-manager-mi" { | ||
resource_group_name = module.config.common_resource_group | ||
name = "radix-id-certmanager-${module.config.environment}" | ||
} | ||
|
||
resource "azurerm_federated_identity_credential" "cert-manager-mi-fedcred" { | ||
for_each = module.clusters.oidc_issuer_url | ||
|
||
audience = ["api://AzureADTokenExchange"] | ||
name = "k8s-cert-manager-dns01-${each.key}-${module.config.environment}" | ||
issuer = each.value | ||
subject = "system:serviceaccount:cert-manager:cert-manager" | ||
parent_id = data.azurerm_user_assigned_identity.cert-manager-mi.id | ||
resource_group_name = data.azurerm_user_assigned_identity.cert-manager-mi.resource_group_name | ||
depends_on = [module.aks] | ||
} |