Skip to content

Commit

Permalink
update cluster integration
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeAjayi committed Jun 13, 2024
1 parent 74c41c6 commit 4e2a20c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cluster_integration.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
resource "azuread_application" "truefoundry_platform_features_application" {
count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0
count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0
display_name = local.azuread_application
sign_in_audience = var.cloud_integration_sign_in_audience
sign_in_audience = var.cluster_integration_sign_in_audience
}

resource "azuread_service_principal" "truefoundry_platform_features_service_principal" {
count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0
count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0
client_id = azuread_application.truefoundry_platform_features_application[0].client_id
}

resource "azuread_service_principal_password" "truefoundry_platform_features_service_principal_password" {
count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0
count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0
service_principal_id = azuread_service_principal.truefoundry_platform_features_service_principal[0].object_id
display_name = local.service_principal_password
end_date = var.cloud_integration_service_principal_password_expiry_end_date
end_date = var.cluster_integration_service_principal_password_expiry_end_date
}

resource "azurerm_role_assignment" "truefoundry_reader_role_assignment" {
count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0
count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0
scope = var.cluster_id
role_definition_name = var.cloud_integration_service_principal_role
role_definition_name = var.cluster_integration_service_principal_role
principal_id = azuread_service_principal.truefoundry_platform_features_service_principal[0].object_id
}
}

0 comments on commit 4e2a20c

Please sign in to comment.