-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresource_group.tf
24 lines (22 loc) · 967 Bytes
/
resource_group.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
###########################################################
# PLATFORM RESOURCE GROUP
###########################################################
# Resource group to store cluster-related resource.
###########################################################
resource "azurerm_resource_group" "platform" {
name = "${var.prefix}-rg-platform"
location = var.azure_region
tags = local.tags
}
# CI SP be the owner of the platform resource group
resource "azurerm_role_assignment" "platform_rg_owner_ci" {
scope = azurerm_resource_group.platform.id
role_definition_name = "Owner"
principal_id = data.azurerm_client_config.current.object_id
}
# Hosting-K8s be the owner of the platform resource group
resource "azurerm_role_assignment" "platform_rg_owner_hosting_k8s" {
scope = azurerm_resource_group.platform.id
role_definition_name = "Owner"
principal_id = "2e1abffc-60c6-4bbe-9e3c-e051fde82af5"
}