constellation/hack/terraform/azure/iam
renovate[bot] 86b03bf08e
Update Terraform azurerm to v3.32.0 (#588)
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2022-11-18 14:57:34 +01:00
..
.terraform.lock.hcl Update Terraform azurerm to v3.32.0 (#588) 2022-11-18 14:57:34 +01:00
main.tf Update Terraform azurerm to v3.32.0 (#588) 2022-11-18 14:57:34 +01:00
output.tf AB#2578 Implement Azure IAM in terraform (#562) 2022-11-16 20:19:10 +01:00
readme.md AB#2578 Implement Azure IAM in terraform (#562) 2022-11-16 20:19:10 +01:00
README.md AB#2578 Implement Azure IAM in terraform (#562) 2022-11-16 20:19:10 +01:00
variables.tf AB#2578 Implement Azure IAM in terraform (#562) 2022-11-16 20:19:10 +01:00

Terraform Azure IAM creation

This terraform configuration creates the necessary Azure resources that need to be available to host a Constellation cluster.

You can create the resources with the following commands:

mkdir constellation_azure_iam
cd constellation_azure_iam
curl --remote-name-all https://raw.githubusercontent.com/edgelesssys/constellation/main/hack/terraform/azure/iam/{main.tf,output.tf,variables.tf,.terraform.lock.hcl}
terraform init
terraform apply

The following terraform output values are available (with their corresponding keys in the Constellation configuration file):

  • subscription_id (subscription)
  • tenant_id (tenant)
  • region (location)
  • base_resource_group_name (resourceGroup)
  • application_id (appClientID)
  • uami_id (userAssignedIdentity)
  • application_client_secret_value (clientSecretValue) - Sensitive Value

You can either get the profile names from the Terraform output and manually add them to your Constellation configuration file according to our Documentation. Or you can do this with a yq command:

yq -i "
  .provider.azure.subscription = $(terraform output subscription_id) |
  .provider.azure.tenant = $(terraform output tenant_id) |
  .provider.azure.location = $(terraform output region) |
  .provider.azure.resourceGroup = $(terraform output base_resource_group_name) |
  .provider.azure.appClientID = $(terraform output application_id) |
  .provider.azure.userAssignedIdentity = $(terraform output uami_id) |
  .provider.azure.clientSecretValue = $(terraform output application_client_secret_value)
  " path/to/constellation-conf.yaml

Where path/to/constellation-conf.yaml is the path to your Constellation configuration file.