frostmoln_gateway (Data Source)
Look up a VPC's gateway — its outbound internet path — without managing it. Useful for reading the source address of a gateway created elsewhere (chosen at VPC create, or attached by the platform when a public IP was associated) so it can be fed to a partner allow-list.
Example Usage
terraform
# Read a VPC's gateway without managing it — for example one that came
# with the VPC, or that the platform attached when a public IP was associated.
#
# vpc_id is required and must never be empty: an empty value would widen the
# lookup to every gateway in the tenant and return an unrelated VPC's, so the
# provider refuses it before any request is made.
data "frostmoln_gateway" "production" {
vpc_id = frostmoln_vpc.production.id
}
# The address to hand a partner for their allow-list. It is dedicated to this
# VPC. Only an address named via `public_ip_id` is PINNED, though — a
# platform-drawn one can change if the gateway is rebuilt, so it is not one to
# publish.
output "production_egress_address" {
value = data.frostmoln_gateway.production.source_address
}
# "legacy" means no stored record exists, so the provenance is UNKNOWN — read it
# as "unknown", never as "old".
output "production_egress_origin" {
value = data.frostmoln_gateway.production.origin
}Schema
Required
vpc_id(String) The VPC whose gateway to look up. Required, and never empty: the lookup is only ever asked for one specific VPC.
Read-Only
id(String) The gateway's identifier.mode(String) How outbound traffic is addressed. "public_ip" — the VPC has its own gateway, carrying both its outbound traffic and the inbound traffic of any public IP attached to an instance in the VPC.origin(String) Who asked for the gateway: "explicit", "implicit_public_ip", "vpc_create", or "legacy" — which means no stored record exists, so the provenance is UNKNOWN (read it as "unknown", never as "old").source_address(String) The public IPv4 address outbound traffic appears to come from. Null while the gateway is detached or the address is not yet known.status(String) Observed state, read from the cloud rather than from stored desired state: "active" or "detached". What the platform observes depends on how the mode is realised, so "detached" is a prompt to check the VPC's outbound path rather than proof that anything is wrong.