@@ -80,37 +80,46 @@ resource "azurerm_storage_account" "k8sprowstorage" {
80
80
min_tls_version = " TLS1_0"
81
81
account_replication_type = " RAGRS"
82
82
cross_tenant_replication_enabled = true
83
- depends_on = [azurerm_resource_group . capz_ci ]
83
+ depends_on = [
84
+ azurerm_resource_group . capz_ci
85
+ ]
84
86
}
85
87
86
- # Import identities module
87
- module "identities " {
88
- source = " ./identities "
88
+ # Import container registry module
89
+ module "container_registry " {
90
+ source = " ./container-registry "
89
91
resource_group_name = var. resource_group_name
90
92
location = var. location
91
- depends_on = [azurerm_resource_group . capz_ci ]
93
+ depends_on = [
94
+ azurerm_resource_group . capz_ci
95
+ ]
96
+ }
97
+
98
+ # Import identities module
99
+ module "identities" {
100
+ source = " ./identities"
101
+ resource_group_name = var. resource_group_name
102
+ location = var. location
103
+ subscription_id = data. azurerm_client_config . current . subscription_id
104
+ container_registry_scope = module. container_registry . container_registry_id
105
+ depends_on = [
106
+ azurerm_resource_group . capz_ci
107
+ ]
92
108
}
93
109
94
110
# Import key vault module
95
111
module "key_vault" {
96
- source = " ./key-vault"
97
- resource_group_name = var. resource_group_name
98
- location = var. location
99
- tenant_id = data. azurerm_client_config . current . tenant_id
112
+ source = " ./key-vault"
113
+ resource_group_name = var. resource_group_name
114
+ location = var. location
115
+ tenant_id = data. azurerm_client_config . current . tenant_id
100
116
identities = {
101
- cloud_provider_user_identity_id = module.identities.cloud_provider_user_identity_id
102
117
domain_vm_identity_id = module.identities.domain_vm_identity_id
103
118
gmsa_user_identity_id = module.identities.gmsa_user_identity_id
104
119
}
105
- depends_on = [azurerm_resource_group . capz_ci ]
106
- }
107
-
108
- # Import container registry module
109
- module "container_registry" {
110
- source = " ./container-registry"
111
- resource_group_name = var. resource_group_name
112
- location = var. location
113
- depends_on = [azurerm_resource_group . capz_ci ]
120
+ depends_on = [
121
+ azurerm_resource_group . capz_ci
122
+ ]
114
123
}
115
124
116
125
# Import role assignments module
@@ -120,6 +129,7 @@ module "role_assignments" {
120
129
container_registry_scope = module. container_registry . container_registry_id
121
130
storage_account_scope = azurerm_storage_account. k8sprowstorage . id
122
131
subscription_id = data. azurerm_client_config . current . subscription_id
132
+ key_vault_id = module. key_vault . key_vault_id
123
133
depends_on = [
124
134
azurerm_resource_group . capz_ci ,
125
135
azurerm_storage_account . k8sprowstorage ,
0 commit comments