Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/provision/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,6 @@ resource "azapi_resource_action" "enable_encryption_at_host" {
}

output "client_id" {
value = azurerm_user_assigned_identity.athenz.client_id
description = "Azure AD application (client) id of the user-assigned managed identity used by Athenz."
value = azurerm_user_assigned_identity.athenz.client_id
}
11 changes: 7 additions & 4 deletions modules/provision/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ variable "tenant_name" {
type = string
}

// Version string of this template in MAJOR.MINOR.PATCH format.
variable "template_version" {
type = string
description = "Internal, do not override."
type = string
validation {
condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.template_version))
error_message = "Enclave template version expected to be in MAJOR.MINOR.PATCH format."
}
}

// This variable is used by Vespa.ai internally for testing and development purposes.
// See variables.tf in root module
variable "all_zones" {
description = "All Azure Vespa Cloud zones"
description = "Internal, do not override."
type = list(object({
environment = string
physical_zone = string
Expand All @@ -23,8 +25,9 @@ variable "all_zones" {
]
}

// See variables.tf in root module
variable "issuer_url" {
description = "Issuer URL for federated identity credentials (Athenz ZTS)."
description = "Internal, do not override."
type = string
default = "https://zts.athenz.vespa-cloud.com:4443/zts/v1"
}
5 changes: 3 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ locals {
}

output "zones" {
description = "Available zones are listed at https://cloud.vespa.ai/en/reference/zones.html . You reference a zone with `[environment].[region with - replaced by _]` (e.g `prod.azure_eastus_az1`)."
description = "Map of available Vespa Cloud zones grouped by environment. Available zones are listed at https://cloud.vespa.ai/en/reference/zones.html. Reference a zone with `[environment].[region with - replaced by _]` (e.g. `prod.azure_eastus_az1`)."
value = {
for environment, zones in local.zones_by_env :
environment => { for zone in zones : replace(zone.region, "-", "_") => zone }
environment => { for z in zones : replace(z.region, "-", "_") => z }
}
}

data "azurerm_subscription" "current" {}

output "enclave_config" {
description = "Configuration values that must be shared with the Vespa team to finalize the enclave setup: Azure AD application (client) id for Athenz, subscription id and tenant id."
value = {
"client_id" : module.provision.client_id,
"subscription_id" : data.azurerm_subscription.current.subscription_id,
Expand Down
9 changes: 5 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
variable "tenant_name" {
description = "The tenant owner running enclave account"
description = "The Vespa Cloud tenant name that will operate in this subscription."
type = string
}

// This variable is used by Vespa.ai internally for testing and development purposes.
// Default list of Azure Vespa Cloud zones, used for testing and development.
variable "__all_zones" {
description = "All Azure Vespa Cloud zones"
description = "Internal, do not override."
type = list(object({
environment = string
physical_zone = string
Expand All @@ -15,8 +15,9 @@ variable "__all_zones" {
]
}

// Issuer (Athenz ZTS) URL for federated identity credentials (either 'prod' or 'cd').
variable "__athenz_env" {
description = "Athenz environment selector for ZTS issuer URL. One of: 'prod', 'cd'."
description = "Internal, do not override."
type = string
default = "prod"
validation {
Expand Down
Loading