constellation/terraform-provider-constellation/examples/resources/constellation_cluster/resource.tf
Moritz Sanft af791bd221
terraform-provider: add usage examples (#2713)
* terraform-provider: add usage example for Azure

* terraform-provider: add usage example for AWS

* terraform-provider: add usage example for GCP

* terraform-provider: update usage example for Azure

* terraform-provider: update generated documentation

* docs: adjust creation on Azure and link to examples

* terraform-provider: unify image in-/output (#2725)

* terraform-provider: check for returned error when converting microservices

* terraform-provider: use state values for outputs after creation

* terraform-provider: ignore invalid upgrades (#2728)

---------

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
Co-authored-by: Thomas Tendyck <51411342+thomasten@users.noreply.github.com>
2023-12-18 10:15:54 +01:00

44 lines
1.5 KiB
HCL

data "constellation_attestation" "foo" {} # Fill accordingly for the CSP and attestation variant
data "constellation_image" "bar" {} # Fill accordingly for the CSP
resource "random_bytes" "master_secret" {
length = 32
}
resource "random_bytes" "master_secret_salt" {
length = 32
}
resource "random_bytes" "measurement_salt" {
length = 32
}
resource "constellation_cluster" "azure_example" {
csp = "azure"
constellation_microservice_version = "vX.Y.Z"
name = "constell"
uid = "..."
image = data.constellation_image.bar.image
attestation = data.constellation_attestation.foo.attestation
init_secret = "..."
master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
measurement_salt = random_bytes.measurement_salt.hex
out_of_cluster_endpoint = "123.123.123.123"
azure = {
tenant_id = "..."
subscription_id = "..."
uami_client_id = "..."
uami_resource_id = "..."
location = "..."
resource_group = "..."
load_balancer_name = "..."
network_security_group_name = "..."
}
network_config = {
ip_cidr_node = "192.168.176.0/20"
ip_cidr_service = "10.96.0.0/12"
}
}