Apply Terraform
Step 2 — Apply Terraform (base infrastructure)
Section titled “Step 2 — Apply Terraform (base infrastructure)”terraform initterraform planterraform applyExpect roughly 20 resources ( AWS
Amazon Web Services — the cloud platform used throughout this walkthrough. VPC/network/compute/endpoints + GCP
Google Cloud Platform — the cloud provider connected to AWS via Interconnect multicloud in this walkthrough. network/compute + DX Gateway
Direct Connect Gateway — an AWS resource that connects a Virtual Private Gateway (or Transit Gateway) to a Direct Connect or Interconnect link. Created by Terraform in this demo. ).
Save the outputs — you will reference them in later steps:
terraform outputKey outputs
Section titled “Key outputs”| Output | Used in |
|---|---|
aws_dx_gateway_id | AWS console Step 3 — select Direct Connect Gateway |
aws_allowed_prefix_for_gcp | Informational — AWS CIDR advertised to GCP |
gcp_advertised_routes_for_transport | gcloud Step 4 — |
gcp_vpc_network_name | gcloud Steps 4–5 — |
gcp_transport_name | gcloud Steps 4–5 — transport name |
| Step 7 — ping targets |
Output reference
Section titled “Output reference”| Output | Description |
|---|---|
aws_dx_gateway_id | DX Gateway for Interconnect creation |
aws_allowed_prefix_for_gcp | AWS CIDR sent toward GCP |
gcp_advertised_routes_for_transport | GCP CIDR for |
gcp_vpc_network_name | GCP network name for gcloud |
gcp_transport_name | Transport resource name |
aws_instance_id | EC2 ID for SSM |
aws_instance_private_ip | EC2 private IP (ping target from GCP) |
| GCE SSH via IAP |
gce_instance_private_ip | GCE private IP (ping target from AWS) |
gce_ssh_private_key | Generated SSH private key for GCE (sensitive) |
gce_ssh_public_key | Matching public key on the VM |