diff --git a/terraform/subscriptions/s940/c2/post-clusters/backend.tf b/terraform/subscriptions/s940/c2/post-clusters/backend.tf index 4bf5b562..33de7962 100644 --- a/terraform/subscriptions/s940/c2/post-clusters/backend.tf +++ b/terraform/subscriptions/s940/c2/post-clusters/backend.tf @@ -40,14 +40,6 @@ module "clusters" { subscription = module.config.subscription } -data "azuread_service_principal" "this" { - display_name = "ar-radix-resource-lock-operator-prod" -} - -data "azurerm_role_definition" "this" { - name = "Omnia Authorization Locks Operator" -} - data "azurerm_key_vault_secret" "radixowners" { name = "radixowners" key_vault_id = module.config.backend.ip_key_vault_id diff --git a/terraform/subscriptions/s940/c2/post-clusters/rbac.tf b/terraform/subscriptions/s940/c2/post-clusters/rbac.tf deleted file mode 100644 index 07799a35..00000000 --- a/terraform/subscriptions/s940/c2/post-clusters/rbac.tf +++ /dev/null @@ -1,12 +0,0 @@ -data "azurerm_kubernetes_cluster" "this" { - for_each = module.clusters.oidc_issuer_url - name = each.key - resource_group_name = module.config.cluster_resource_group -} - -resource "azurerm_role_assignment" "cluster" { - for_each = module.clusters.oidc_issuer_url - scope = data.azurerm_kubernetes_cluster.this[each.key].id - role_definition_id = "/subscriptions/${module.config.subscription}${data.azurerm_role_definition.this.role_definition_id}" - principal_id = data.azuread_service_principal.this.object_id -} diff --git a/terraform/subscriptions/s940/prod/post-clusters/backend.tf b/terraform/subscriptions/s940/prod/post-clusters/backend.tf index 13f98906..3e6d17f6 100644 --- a/terraform/subscriptions/s940/prod/post-clusters/backend.tf +++ b/terraform/subscriptions/s940/prod/post-clusters/backend.tf @@ -36,14 +36,6 @@ module "clusters" { subscription = module.config.subscription } -data "azuread_service_principal" "this" { - display_name = "ar-radix-resource-lock-operator-prod" -} - -data "azurerm_role_definition" "this" { - name = "Omnia Authorization Locks Operator" -} - data "azurerm_key_vault_secret" "radixowners" { name = "radixowners" key_vault_id = module.config.backend.ip_key_vault_id diff --git a/terraform/subscriptions/s940/prod/post-clusters/rbac.tf b/terraform/subscriptions/s940/prod/post-clusters/rbac.tf deleted file mode 100644 index f9da8524..00000000 --- a/terraform/subscriptions/s940/prod/post-clusters/rbac.tf +++ /dev/null @@ -1,12 +0,0 @@ -data "azurerm_kubernetes_cluster" "this" { - for_each = module.clusters.oidc_issuer_url - name = each.key - resource_group_name = "clusters" #TODO with code below after cluster in new RG module.config.cluster_resource_group -} - -resource "azurerm_role_assignment" "cluster" { - for_each = module.clusters.oidc_issuer_url - scope = data.azurerm_kubernetes_cluster.this[each.key].id - role_definition_id = "/subscriptions/${module.config.subscription}${data.azurerm_role_definition.this.role_definition_id}" - principal_id = data.azuread_service_principal.this.object_id -}