GoogleComputeGlobalAddress class final
Factory wrapper for google_compute_global_address (provider
hashicorp/google ~> 7.0).
Reserves a global (regionless) IP range. Two complementary use cases:
- HTTP(S) load balancer VIP —
addressType: external,purposeunset, nonetwork. The provider allocates a single anycast IPv4 (or IPv6 whenipVersionis set) routed across Google's edge. - Private services peering range —
addressType: internal,purpose: vpcPeering,networkpointing at a GoogleComputeNetwork. Reserves an internal CIDR block on the user's VPC that GoogleServiceNetworkingConnection then peers with Google's service producer VPC (for Cloud SQL private IP, Memorystore, etc).
Required identity:
localName: Terraform local name (the address segment aftergoogle_compute_global_address.).name: GCP-internal address resource name. Forces replacement when changed.
Example (Cloud SQL private-IP peering range, the canonical Wave 5 chain): see also GoogleServiceNetworkingConnection.
final psaRange = GoogleComputeGlobalAddress(
localName: 'psa_range',
name: TfArg.literal('cloudsql-psa-range'),
addressType: TfArg.literal(GlobalAddressType.internal),
purpose: TfArg.literal(GlobalAddressPurpose.vpcPeering),
prefixLength: TfArg.literal(16),
network: TfArg.ref(vpc.selfLink),
);
Example (external LB VIP):
final lbVip = GoogleComputeGlobalAddress(
localName: 'lb_vip',
name: TfArg.literal('global-lb-vip'),
addressType: TfArg.literal(GlobalAddressType.external),
ipVersion: TfArg.literal(GlobalAddressIpVersion.ipv4),
);
Composition pattern: extends Resource<$GoogleComputeGlobalAddress> for
runtime behavior.
Constructors
-
GoogleComputeGlobalAddress({required String localName, required TfArg<
String> name, TfArg<GlobalAddressType> ? addressType, TfArg<GlobalAddressPurpose> ? purpose, TfArg<GlobalAddressIpVersion> ? ipVersion, TfArg<String> ? address, TfArg<num> ? prefixLength, TfArg<String> ? network, TfArg<Map< ? labels, TfArg<String, String> >String> ? description, TfArg<String> ? project, LifecycleOptions? lifecycle, List<DependencyTarget> ? dependsOn})
Properties
-
$sensitiveFields
→ Set<
String> -
Field names that are
@Sensitiveper the IR-derived per-resource constant. Curated factories override with a baked-instatic const Set<String>(file-private in v0.5+).no setter -
addressRef
→ TfRef<
String> -
Reference to the allocated
addressattribute (the actual IP or CIDR base GCP picks whenaddressis omitted). Available after apply. Use this to pass the IP to downstream resources like load balancer forwarding rules.no setter -
argMap
→ Map<
String, TfArg?> -
Argument-name → TfArg map. Keys are snake_case (Terraform JSON name).
Synth emits these keys directly; the factory is responsible for the
camelCase → snake_case translation at construction time.
finalinherited
-
dependsOn
→ List<
DependencyTarget> ? -
Optional
depends_on = [...]. Each entry is aDependencyTarget— either a wholesale resource (rendered as bare address) or an explicitTfRef(rendered viabareAddress).finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
→ TfRef<
String> -
Reference to
idattribute (full pathprojects/{project}/global/addresses/{name}).no setter - kind → ResourceKind
-
Always
ResourceKind.resource. Overridden byData.no setterinherited - lifecycle → LifecycleOptions?
-
Optional
lifecycle { ... }block.finalinherited - localName → String
-
User-supplied local name within a Stack.
finalinherited
-
nameRef
→ TfRef<
String> -
Reference to
nameattribute. Use this when downstream consumers (notablyGoogleServiceNetworkingConnection.reservedPeeringRanges) require the address by name, not full self_link.no setter - provider → ProviderBinding?
-
Optional explicit provider binding. Only the type is referenced here;
the concrete
Providerclass lives interradart_google(provider classes are defined per-provider, outside the core runtime).finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfLink
→ TfRef<
String> -
Reference to
self_linkattribute.no setter - terraformType → String
-
Terraform resource type, e.g.
google_pubsub_topic.finalinherited - tfAddress → String
-
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited