Skip to content

frostmoln_application_gateway (Data Source) ​

Look up an Application Gateway by ID or name. Exactly one of id or name must be specified.

This is how a configuration reaches a gateway that Terraform did not create: the offer's child resources (frostmoln_appgw_listener, frostmoln_appgw_backend_pool, frostmoln_appgw_certificate, frostmoln_appgw_waf_policy, frostmoln_appgw_config_apply, …) all take a required gateway_id, and a gateway provisioned in the portal or with fm can today be referenced only by a hardcoded UUID. Look it up by name instead and the reference survives re-provisioning elsewhere.

A name lookup that matches NOTHING fails the read, and so does one that matches MORE THAN ONE gateway: the data source refuses to pick for you (the diagnostic names the colliding ids). A deleted gateway never resolves — by id or by name — the same rule the frostmoln_application_gateway resource's read applies.

Example Usage ​

terraform
# Resolve an Application Gateway that Terraform did not create
# (provisioned in the portal or with `fm`) by NAME — no hardcoded UUID.
#
# The offer's child resources all take a required `gateway_id` with no other
# path to it, so this lookup is what lets a listener, backend pool, certificate
# or WAF policy attach to a gateway Terraform never created.
data "frostmoln_application_gateway" "edge" {
  name = "edge"
}

# The resolved id feeds the child resources.
resource "frostmoln_appgw_listener" "https" {
  gateway_id = data.frostmoln_application_gateway.edge.id
  name       = "https"
  protocol   = "https"
  port       = 443
}

# A lookup by id behaves identically for gateways whose UUID is already known
# (e.g. the gateway this configuration itself created).
resource "frostmoln_application_gateway" "self_served" {
  name      = "self-served"
  flavor_id = "agw.co1.medium"
  vpc_id    = frostmoln_vpc.main.id
  subnet_id = frostmoln_subnet.edge.id
}
data "frostmoln_application_gateway" "by_id" {
  id = frostmoln_application_gateway.self_served.id
}

# A name that matches nothing — or more than one gateway — fails the read
# loudly rather than picking a gateway for you. The config apply trail is on
# the resolution: `config_generation` is what has been authored,
# `config_revision` what the appliance acknowledged, and when they differ
# there is a change the gateway is not yet serving.
output "gateway_config_trail" {
  value = [
    data.frostmoln_application_gateway.edge.config_generation,
    data.frostmoln_application_gateway.edge.config_revision,
    data.frostmoln_application_gateway.edge.config_status,
  ]
}

# The appliance's address composes like the resource's:
locals {
  gateway_public   = data.frostmoln_application_gateway.edge.public_ip
  gateway_private  = data.frostmoln_application_gateway.edge.private_ip
}

Schema ​

Optional ​

  • id (String) The unique identifier of the Application Gateway. Exactly one of id or name must be specified.
  • name (String) The name of the Application Gateway. Exactly one of id or name must be specified.

Read-Only ​

  • applied_waf_version (Number) The WAF ruleset version the appliance currently composes with.
  • config_applied_at (String) When the appliance last acknowledged a configuration, null until a first apply has succeeded.
  • config_detail (String) The appliance's own words when it refused a configuration, null when the last apply was accepted or nothing has been applied yet.
  • config_generation (Number) The configuration generation that has been AUTHORED.
  • config_revision (Number) The configuration generation the appliance has ACKNOWLEDGED. Null until something has been applied. When it differs from config_generation there is a change the gateway is not yet serving.
  • config_status (String) What happened to the last configuration apply: pending, applying, applied, failed or unknown. Distinct from status, which is the appliance's lifecycle.
  • created_at (String) The timestamp when the gateway was created.
  • flavor_id (String) The flavor (size) of the gateway, e.g. agw.co1.medium.
  • private_ip (String) The appliance's address inside the VPC, null while provisioning has not yet reached the address.
  • public_ip (String) The gateway's public address, null while provisioning has not yet reached the address.
  • public_ip_id (String) The Public IP id for a bring-your-own (selected) gateway; the allocated address deliberately has no id here and is visible as public_ip only.
  • public_ip_mode (String) Where the gateway's public address comes from: allocated (the platform draws one from the pool and releases it with the gateway) or selected (an address you hold, named by public_ip_id, never released).
  • status (String) The gateway's lifecycle state. A deleted row never satisfies this data source.
  • subnet_id (String) The subnet the gateway's appliance attaches to.
  • tags (Map of String) Every resource tag on the application gateway — the same set as the resource's tags_all: your own key/value metadata, never applied to the service itself. An empty map when it has none.
  • tenant_id (String) The tenant ID that owns this gateway.
  • updated_at (String) The timestamp when the gateway was last updated, null when the platform has not recorded one.
  • version (String) The appliance version the gateway runs. Platform-managed and chosen by the server at create.
  • vpc_cidr (String) The gateway's VPC range. Backend addresses are validated against it.
  • vpc_id (String) The VPC the gateway lives in.
  • waf_policy_id (String) The WAF policy attached to the gateway, null when none is attached.