Skip to content

Commit

Permalink
feat: add moved to metering module, add provider block to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ishabakeh committed Oct 9, 2023
1 parent 0ed50d9 commit 5e18caa
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ terraform {
}
}

provider "azurerm" {
# Configuration options
features {}
}

provider "azuread" {
# Configuration options
}

module "meshplatform" {
source = "meshcloud/meshplatform/azure"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
output "replicator_service_principal" {
output "replicator_credentials" {
description = "Replicator Service Principal."
value = module.meshplatform.replicator_service_principal
}

output "replicator_service_principal_password" {
output "replicator_client_secret" {
description = "Password for Replicator Service Principal."
value = module.meshplatform.replicator_service_principal_password
sensitive = true
}

output "metering_service_principal" {
output "metering_credentials" {
description = "Metering Service Principal."
value = module.meshplatform.metering_service_principal
}

output "metering_service_principal_password" {
output "metering_client_secret" {
description = "Password for Metering Service Principal."
value = module.meshplatform.metering_service_principal_password
sensitive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ terraform {
}
}

provider "azurerm" {
# Configuration options
features {}
}

provider "azuread" {
# Configuration options
}

module "meshplatform" {
source = "meshcloud/meshplatform/azure"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

output "replicator_service_principal" {
output "replicator_credentials" {
description = "Replicator Service Principal."
value = module.meshplatform.replicator_service_principal
}

output "replicator_service_principal_password" {
output "replicator_client_secret" {
description = "Password for Replicator Service Principal."
value = module.meshplatform.replicator_service_principal_password
sensitive = true
}

output "metering_service_principal" {
output "metering_credentials" {
description = "Metering Service Principal."
value = module.meshplatform.metering_service_principal
}

output "metering_service_principal_password" {
output "metering_client_secret" {
description = "Password for Metering Service Principal."
value = module.meshplatform.metering_service_principal_password
sensitive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ terraform {
}
}

provider "azurerm" {
# Configuration options
features {}
}

provider "azuread" {
# Configuration options
}

module "meshplatform" {
source = "meshcloud/meshplatform/azure"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
output "replicator_service_principal" {
output "replicator_credentials" {
description = "Replicator Service Principal."
value = module.meshplatform.replicator_service_principal
}

output "replicator_service_principal_password" {
output "replicator_client_secret" {
description = "Password for Replicator Service Principal."
value = module.meshplatform.replicator_service_principal_password
sensitive = true
}

output "metering_service_principal" {
output "metering_credentials" {
description = "Metering Service Principal."
value = module.meshplatform.metering_service_principal
}

output "metering_service_principal_password" {
output "metering_client_secret" {
description = "Password for Metering Service Principal."
value = module.meshplatform.metering_service_principal_password
sensitive = true
Expand Down
25 changes: 25 additions & 0 deletions modules/meshcloud-metering-service-principal/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,28 @@ resource "azuread_application_password" "application_pw" {
# from = azuread_application_password.spp_pw
# to = azuread_application_password.service_principal_pw
# }

moved {
from = azurerm_role_assignment.meshcloud_kraken
to = azurerm_role_assignment.meshcloud_metering
}

moved {
from = azurerm_role_definition.meshcloud_kraken_cloud_inventory_role
to = azurerm_role_definition.meshcloud_metering_cloud_inventory_role
}

moved {
from = azurerm_role_assignment.meshcloud_kraken_cloud_inventory
to = azurerm_role_assignment.meshcloud_metering_cloud_inventory
}

moved {
from = azuread_application.meshcloud_kraken
to = azuread_application.meshcloud_metering
}

moved {
from = azuread_service_principal.meshcloud_kraken
to = azuread_service_principal.meshcloud_metering
}
2 changes: 1 addition & 1 deletion modules/meshcloud-metering-service-principal/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output "credentials" {
value = {
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_metering.id
Application_Client_ID = azuread_application.meshcloud_metering.application_id
Client_Secret = "Execute `terraform output service_principal_password` to see the password"
Client_Secret = "Execute `terraform output metering_service_principal_password` to see the password"
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/meshcloud-replicator-service-principal/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output "credentials" {
value = {
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_replicator.id
Application_Client_ID = azuread_application.meshcloud_replicator.application_id
Client_Secret = "Execute `terraform output service_principal_password` to see the password"
Client_Secret = "Execute `terraform output replicator_service_principal_password` to see the password"
}
}

Expand Down

0 comments on commit 5e18caa

Please sign in to comment.