Skip to content

Commit ed66609

Browse files
committed
feat: rename replicator and metering in output
1 parent 17a9051 commit ed66609

File tree

10 files changed

+37
-37
lines changed

10 files changed

+37
-37
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.terraform
2-
.terraform.lock.hcl
2+
.terraform.lock.hcl
3+
terraform.tfstate*

examples/basic-azure-integration/main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
#
55
# Remove/comment the backend block below if you are only testing the module.
66
# Please be aware that you cannot destroy the created resources via terraform if you lose the state file.
7-
terraform {
8-
backend "azurerm" {
9-
tenant_id = "aadTenantId"
10-
subscription_id = "subscriptionId"
11-
resource_group_name = "rg-cloud-foundation"
12-
storage_account_name = "tfstatesiqw0x"
13-
container_name = "tfstates"
14-
key = "meshplatform-setup"
15-
}
16-
}
7+
# terraform {
8+
# backend "azurerm" {
9+
# tenant_id = "aadTenantId"
10+
# subscription_id = "subscriptionId"
11+
# resource_group_name = "rg-cloud-foundation"
12+
# storage_account_name = "tfstatesiqw0x"
13+
# container_name = "tfstates"
14+
# key = "meshplatform-setup"
15+
# }
16+
# }
1717

1818
provider "azurerm" {
1919
# Configuration options
@@ -29,4 +29,4 @@ module "meshplatform" {
2929

3030
service_principal_name_suffix = "<UNIQUE_NAME>"
3131
mgmt_group_name = "<MANAGEMENT_GROUP_NAME>|<MANAGEMENT_GROUP_ID>" # Either the Management group Name or ID
32-
}
32+
}

examples/basic-azure-integration/outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
output "replicator_service_principal" {
1+
output "replicator_credentials" {
22
description = "Replicator Service Principal."
33
value = module.meshplatform.replicator_service_principal
44
}
55

6-
output "replicator_service_principal_password" {
6+
output "replicator_client_secret" {
77
description = "Password for Replicator Service Principal."
88
value = module.meshplatform.replicator_service_principal_password
99
sensitive = true
1010
}
1111

12-
output "metering_service_principal" {
12+
output "metering_credentials" {
1313
description = "Metering Service Principal."
1414
value = module.meshplatform.metering_service_principal
1515
}
1616

17-
output "metering_service_principal_password" {
17+
output "metering_client_secret" {
1818
description = "Password for Metering Service Principal."
1919
value = module.meshplatform.metering_service_principal_password
2020
sensitive = true

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ moved {
6666
moved {
6767
from = module.idp_lookup_spp
6868
to = module.idp_lookup_service_principal
69-
}
69+
}

modules/meshcloud-idp-lookup-service-principal/module.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ resource "azuread_service_principal_password" "service_principal_pw" {
6565
}
6666

6767

68-
# facilitate migration from v0.1.0 of the module
69-
moved {
70-
from = azuread_service_principal_password.spp_pw
71-
to = azuread_service_principal_password.service_principal_pw
72-
}
68+
# # facilitate migration from v0.1.0 of the module
69+
# moved {
70+
# from = azuread_service_principal_password.spp_pw
71+
# to = azuread_service_principal_password.service_principal_pw
72+
# }

modules/meshcloud-metering-service-principal/module.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ resource "time_rotating" "replicator_secret_rotation" {
118118
rotation_days = 365
119119
}
120120

121-
resource "azuread_application_password" "service_principal_pw" {
121+
resource "azuread_application_password" "application_pw" {
122122
application_object_id = azuread_application.meshcloud_metering.object_id
123123
rotate_when_changed = {
124124
rotation = time_rotating.replicator_secret_rotation.id
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
output "service_principal" {
1+
output "credentials" {
22
description = "Service Principal application id and object id"
33
value = {
44
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_metering.id
@@ -7,8 +7,8 @@ output "service_principal" {
77
}
88
}
99

10-
output "service_principal_password" {
11-
description = "Password for the Service Principal."
12-
value = azuread_application_password.service_principal_pw.value
10+
output "application_client_secret" {
11+
description = "Client Secret Of the Application."
12+
value = azuread_application_password.application_pw.value
1313
sensitive = true
1414
}

modules/meshcloud-replicator-service-principal/module.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ resource "azurerm_role_definition" "meshcloud_replicator" {
4343
# Assigning Subscriptions to Management Groups
4444
"Microsoft.Management/managementGroups/subscriptions/write",
4545
"Microsoft.Management/managementGroups/write",
46-
4746
# Permissions for reading and writing tags
4847
"Microsoft.Resources/tags/*",
4948

@@ -141,7 +140,7 @@ resource "azuread_application" "meshcloud_replicator" {
141140
resource "time_rotating" "replicator_secret_rotation" {
142141
rotation_days = 365
143142
}
144-
resource "azuread_application_password" "service_principal_pw" {
143+
resource "azuread_application_password" "application_pw" {
145144
application_object_id = azuread_application.meshcloud_replicator.object_id
146145
rotate_when_changed = {
147146
rotation = time_rotating.replicator_secret_rotation.id

modules/meshcloud-replicator-service-principal/outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
output "service_principal" {
1+
output "credentials" {
22
description = "Service Principal application id and object id"
33
value = {
44
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_replicator.id
@@ -7,9 +7,9 @@ output "service_principal" {
77
}
88
}
99

10-
output "service_principal_password" {
11-
description = "Password for the Service Principal."
12-
value = azuread_application_password.service_principal_pw.value
10+
output "application_client_secret" {
11+
description = "Client Secret Of the Application."
12+
value = azuread_application_password.application_pw.value
1313
sensitive = true
1414
}
1515

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
output "replicator_service_principal" {
33
description = "Replicator Service Principal."
4-
value = length(module.replicator_service_principal) > 0 ? module.replicator_service_principal[0].service_principal : null
4+
value = length(module.replicator_service_principal) > 0 ? module.replicator_service_principal[0].credentials : null
55
}
66

77
output "replicator_service_principal_password" {
88
description = "Password for Replicator Service Principal."
9-
value = length(module.replicator_service_principal) > 0 ? module.replicator_service_principal[0].service_principal_password : null
9+
value = length(module.replicator_service_principal) > 0 ? module.replicator_service_principal[0].application_client_secret : null
1010
sensitive = true
1111
}
1212

@@ -17,12 +17,12 @@ output "replicator_service_principal_password" {
1717

1818
output "metering_service_principal" {
1919
description = "Metering Service Principal."
20-
value = length(module.metering_service_principal) > 0 ? module.metering_service_principal[0].service_principal : null
20+
value = length(module.metering_service_principal) > 0 ? module.metering_service_principal[0].credentials : null
2121
}
2222

2323
output "metering_service_principal_password" {
2424
description = "Password for Metering Service Principal."
25-
value = length(module.metering_service_principal) > 0 ? module.metering_service_principal[0].service_principal_password : null
25+
value = length(module.metering_service_principal) > 0 ? module.metering_service_principal[0].application_client_secret : null
2626
sensitive = true
2727
}
2828

0 commit comments

Comments
 (0)