Skip to content

Commit

Permalink
Rename Appregistration to radix-ar-... (#1398)
Browse files Browse the repository at this point in the history
Co-authored-by: Automatic Update <[email protected]>
  • Loading branch information
sveinpj and Automatic Update authored Jul 12, 2024
1 parent 5e738dd commit 602f2f0
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable "oidc_issuer_url" {
}

data "azuread_application" "this" {
display_name = "ar-radix-servicenow-proxy-client"
display_name = "radix-ar-servicenow-proxy-client"
}

locals {
Expand All @@ -19,7 +19,7 @@ locals {
])
}

resource "azuread_application_federated_identity_credential" "ar-radix-servicenow-proxy-client" {
resource "azuread_application_federated_identity_credential" "radix-ar-servicenow-proxy-client" {
for_each = { for item in local.oidc_issuers : "${item.cluster}-${item.env}" => item }
application_id = data.azuread_application.this.id
display_name = "k8s-radix-servicenow-proxy-client-${each.value.cluster}-${each.value.env}"
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/modules/mssqldatabase/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "azurerm_user_assigned_identity" "server" {
tags = {
IaC = "terraform"
}

}
resource "azurerm_user_assigned_identity" "admin" {
name = var.managed_identity_admin_name
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/s940/c2/post-clusters/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module "clusters" {
}

data "azuread_service_principal" "this" {
display_name = "ar-radix-resource-lock-operator-prod"
display_name = "radix-ar-resource-lock-operator-prod"
}

data "azurerm_role_definition" "this" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/s940/c2/post-clusters/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

module "grafana" {
source = "../../../modules/app_registration"
display_name = "ar-radix-grafana-c2-prod" #TODO
display_name = "radix-ar-grafana-${module.config.environment}"
notes = "Grafana Oauth, main app for user authentication to Grafana"
service_id = "110327"
web_uris = concat(["https://grafana.c2.radix.equinor.com/login/generic_oauth"], local.grafana_uris)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ locals {

data "azuread_application_published_app_ids" "well_known" {}
data "azuread_service_principal" "servicenow" {
display_name = "ar-radix-servicenow-proxy-server"
display_name = "radix-ar-servicenow-proxy-server"
}
data "azuread_service_principal" "msgraph" {
client_id = data.azuread_application_published_app_ids.well_known.result["MicrosoftGraph"]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions terraform/subscriptions/s940/extmon/post-clusters/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ resource "azuread_application_federated_identity_credential" "grafana-logreader"
application_id = data.azuread_application.grafana-logreader.id
}

resource "azuread_application_federated_identity_credential" "grafana-mi-fedcred" {
for_each = module.clusters.oidc_issuer_url
# resource "azuread_application_federated_identity_credential" "grafana-mi-fedcred" {
# for_each = module.clusters.oidc_issuer_url

# display_name = "k8s-grafana-${each.key}"
# audiences = ["api://AzureADTokenExchange"]
# issuer = each.value
# subject = "system:serviceaccount:monitor:grafana"
# application_id = data.azuread_application.grafana-logreader.id
# }

audience = ["api://AzureADTokenExchange"]
name = "k8s-grafana-${each.key}"
issuer = each.value
subject = "system:serviceaccount:monitor:grafana"
application_id = data.azuread_application.grafana-logreader.id
}
2 changes: 1 addition & 1 deletion terraform/subscriptions/s940/prod/post-clusters/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module "clusters" {
}

data "azuread_service_principal" "this" {
display_name = "ar-radix-resource-lock-operator-prod"
display_name = "radix-ar-resource-lock-operator-prod"
}

data "azurerm_role_definition" "this" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/s940/prod/post-clusters/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

module "grafana" {
source = "../../../modules/app_registration"
display_name = "ar-radix-grafana-production" #TODO
display_name = "radix-ar-grafana-${module.config.environment}"
notes = "Grafana Oauth, main app for user authentication to Grafana"
service_id = "110327"
web_uris = concat(["https://grafana.radix.equinor.com/login/generic_oauth"], local.grafana_uris)
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/s941/dev/post-clusters/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

module "grafana" {
source = "../../../modules/app_registration"
display_name = "ar-radix-grafana-development" #TODO
display_name = "radix-ar-grafana-${module.config.environment}"
notes = "Grafana Oauth, main app for user authentication to Grafana"
service_id = "110327"
web_uris = concat(["https://grafana.${module.config.environment}.radix.equinor.com/login/generic_oauth"], local.grafana_uris)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ locals {

data "azuread_application_published_app_ids" "well_known" {}
data "azuread_service_principal" "servicenow" {
display_name = "ar-radix-servicenow-proxy-server"
display_name = "radix-ar-servicenow-proxy-server"
}
data "azuread_service_principal" "msgraph" {
client_id = data.azuread_application_published_app_ids.well_known.result["MicrosoftGraph"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

module "grafana" {
source = "../../../modules/app_registration"
display_name = "ar-radix-grafana-${module.config.environment}"
display_name = "radix-ar-grafana-${module.config.environment}"
notes = "Grafana Oauth, main app for user authentication to Grafana"
service_id = "110327"
web_uris = concat(["https://grafana.${module.config.environment}.radix.equinor.com/login/generic_oauth"], local.grafana_uris)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ locals {

data "azuread_application_published_app_ids" "well_known" {}
data "azuread_service_principal" "servicenow" {
display_name = "ar-radix-servicenow-proxy-server"
display_name = "radix-ar-servicenow-proxy-server"
}
data "azuread_service_principal" "msgraph" {
client_id = data.azuread_application_published_app_ids.well_known.result["MicrosoftGraph"]
Expand Down

0 comments on commit 602f2f0

Please sign in to comment.