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:

  1. HTTP(S) load balancer VIPaddressType: external, purpose unset, no network. The provider allocates a single anycast IPv4 (or IPv6 when ipVersion is set) routed across Google's edge.
  2. Private services peering rangeaddressType: internal, purpose: vpcPeering, network pointing 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 after google_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<String, String>>? labels, TfArg<String>? description, TfArg<String>? project, LifecycleOptions? lifecycle, List<DependencyTarget>? dependsOn})

Properties

$sensitiveFields Set<String>
Field names that are @Sensitive per the IR-derived per-resource constant. Curated factories override with a baked-in static const Set<String> (file-private in v0.5+).
no setter
addressRef → TfRef<String>
Reference to the allocated address attribute (the actual IP or CIDR base GCP picks when address is 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 a DependencyTarget — either a wholesale resource (rendered as bare address) or an explicit TfRef (rendered via bareAddress).
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id → TfRef<String>
Reference to id attribute (full path projects/{project}/global/addresses/{name}).
no setter
kind → ResourceKind
Always ResourceKind.resource. Overridden by Data.
no setterinherited
lifecycle → LifecycleOptions?
Optional lifecycle { ... } block.
finalinherited
localName String
User-supplied local name within a Stack.
finalinherited
nameRef → TfRef<String>
Reference to name attribute. Use this when downstream consumers (notably GoogleServiceNetworkingConnection.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 Provider class lives in terradart_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
Reference to self_link attribute.
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

Constants

$tfType → const String