forked from pierront/but3-iac
623 lines
30 KiB
Plaintext
623 lines
30 KiB
Plaintext
# module.compute.data.google_compute_image.debian_11:
|
|
data "google_compute_image" "debian_11" {
|
|
archive_size_bytes = 2307214080
|
|
creation_timestamp = "2025-11-11T16:48:31.753-08:00"
|
|
description = "Debian, Debian GNU/Linux, 11 (bullseye), amd64 built on 20251111"
|
|
disk_size_gb = 10
|
|
family = "debian-11"
|
|
id = "projects/debian-cloud/global/images/debian-11-bullseye-v20251111"
|
|
image_encryption_key_sha256 = null
|
|
image_id = "2625777767580329904"
|
|
label_fingerprint = "iNBmVNCFF9w="
|
|
labels = {
|
|
"public-image" = "true"
|
|
}
|
|
licenses = [
|
|
"https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-11-bullseye",
|
|
]
|
|
most_recent = false
|
|
name = "debian-11-bullseye-v20251111"
|
|
project = "debian-cloud"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251111"
|
|
source_disk = null
|
|
source_disk_encryption_key_sha256 = null
|
|
source_disk_id = null
|
|
source_image_id = null
|
|
status = "READY"
|
|
}
|
|
|
|
# module.compute.google_compute_instance.backend:
|
|
resource "google_compute_instance" "backend" {
|
|
can_ip_forward = false
|
|
cpu_platform = "Intel Broadwell"
|
|
current_status = "RUNNING"
|
|
deletion_protection = false
|
|
description = null
|
|
effective_labels = {}
|
|
enable_display = false
|
|
guest_accelerator = []
|
|
hostname = null
|
|
id = "projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/backend-instance"
|
|
instance_id = "5962845577067397518"
|
|
label_fingerprint = "42WmSpB8rSM="
|
|
labels = {}
|
|
machine_type = "e2-medium"
|
|
metadata = {
|
|
"enable-oslogin" = "TRUE"
|
|
}
|
|
metadata_fingerprint = "MCMqZ1HfC8w="
|
|
min_cpu_platform = null
|
|
name = "backend-instance"
|
|
project = "fluted-agency-478713-h5"
|
|
resource_policies = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/backend-instance"
|
|
tags = [
|
|
"backend",
|
|
"ssh",
|
|
]
|
|
tags_fingerprint = "N2bbCLFli_k="
|
|
terraform_labels = {}
|
|
zone = "europe-west9-b"
|
|
|
|
boot_disk {
|
|
auto_delete = true
|
|
device_name = "persistent-disk-0"
|
|
disk_encryption_key_raw = (sensitive value)
|
|
disk_encryption_key_sha256 = null
|
|
kms_key_self_link = null
|
|
mode = "READ_WRITE"
|
|
source = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/disks/backend-instance"
|
|
|
|
initialize_params {
|
|
enable_confidential_compute = false
|
|
image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251111"
|
|
labels = {}
|
|
provisioned_iops = 0
|
|
provisioned_throughput = 0
|
|
resource_manager_tags = {}
|
|
size = 10
|
|
storage_pool = null
|
|
type = "pd-standard"
|
|
}
|
|
}
|
|
|
|
network_interface {
|
|
internal_ipv6_prefix_length = 0
|
|
ipv6_access_type = null
|
|
ipv6_address = null
|
|
name = "nic0"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
network_ip = "10.0.2.2"
|
|
nic_type = null
|
|
queue_count = 0
|
|
stack_type = "IPV4_ONLY"
|
|
subnetwork = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-backend-subnet"
|
|
subnetwork_project = "fluted-agency-478713-h5"
|
|
}
|
|
|
|
scheduling {
|
|
automatic_restart = true
|
|
instance_termination_action = null
|
|
min_node_cpus = 0
|
|
on_host_maintenance = "MIGRATE"
|
|
preemptible = false
|
|
provisioning_model = "STANDARD"
|
|
}
|
|
|
|
shielded_instance_config {
|
|
enable_integrity_monitoring = true
|
|
enable_secure_boot = false
|
|
enable_vtpm = true
|
|
}
|
|
}
|
|
|
|
# module.compute.google_compute_instance.database:
|
|
resource "google_compute_instance" "database" {
|
|
can_ip_forward = false
|
|
cpu_platform = "Intel Broadwell"
|
|
current_status = "RUNNING"
|
|
deletion_protection = false
|
|
description = null
|
|
effective_labels = {}
|
|
enable_display = false
|
|
guest_accelerator = []
|
|
hostname = null
|
|
id = "projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/database-instance"
|
|
instance_id = "3381403986872271246"
|
|
label_fingerprint = "42WmSpB8rSM="
|
|
labels = {}
|
|
machine_type = "e2-medium"
|
|
metadata = {
|
|
"enable-oslogin" = "TRUE"
|
|
}
|
|
metadata_fingerprint = "MCMqZ1HfC8w="
|
|
min_cpu_platform = null
|
|
name = "database-instance"
|
|
project = "fluted-agency-478713-h5"
|
|
resource_policies = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/database-instance"
|
|
tags = [
|
|
"database",
|
|
"ssh",
|
|
]
|
|
tags_fingerprint = "22sTRfPQYj4="
|
|
terraform_labels = {}
|
|
zone = "europe-west9-b"
|
|
|
|
boot_disk {
|
|
auto_delete = true
|
|
device_name = "persistent-disk-0"
|
|
disk_encryption_key_raw = (sensitive value)
|
|
disk_encryption_key_sha256 = null
|
|
kms_key_self_link = null
|
|
mode = "READ_WRITE"
|
|
source = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/disks/database-instance"
|
|
|
|
initialize_params {
|
|
enable_confidential_compute = false
|
|
image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251111"
|
|
labels = {}
|
|
provisioned_iops = 0
|
|
provisioned_throughput = 0
|
|
resource_manager_tags = {}
|
|
size = 20
|
|
storage_pool = null
|
|
type = "pd-standard"
|
|
}
|
|
}
|
|
|
|
network_interface {
|
|
internal_ipv6_prefix_length = 0
|
|
ipv6_access_type = null
|
|
ipv6_address = null
|
|
name = "nic0"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
network_ip = "10.0.3.2"
|
|
nic_type = null
|
|
queue_count = 0
|
|
stack_type = "IPV4_ONLY"
|
|
subnetwork = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-database-subnet"
|
|
subnetwork_project = "fluted-agency-478713-h5"
|
|
}
|
|
|
|
scheduling {
|
|
automatic_restart = true
|
|
instance_termination_action = null
|
|
min_node_cpus = 0
|
|
on_host_maintenance = "MIGRATE"
|
|
preemptible = false
|
|
provisioning_model = "STANDARD"
|
|
}
|
|
|
|
shielded_instance_config {
|
|
enable_integrity_monitoring = true
|
|
enable_secure_boot = false
|
|
enable_vtpm = true
|
|
}
|
|
}
|
|
|
|
# module.compute.google_compute_instance.frontend:
|
|
resource "google_compute_instance" "frontend" {
|
|
can_ip_forward = false
|
|
cpu_platform = "Intel Broadwell"
|
|
current_status = "RUNNING"
|
|
deletion_protection = false
|
|
description = null
|
|
effective_labels = {}
|
|
enable_display = false
|
|
guest_accelerator = []
|
|
hostname = null
|
|
id = "projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/frontend-instance"
|
|
instance_id = "824861855395381646"
|
|
label_fingerprint = "42WmSpB8rSM="
|
|
labels = {}
|
|
machine_type = "e2-medium"
|
|
metadata = {
|
|
"enable-oslogin" = "TRUE"
|
|
}
|
|
metadata_fingerprint = "MCMqZ1HfC8w="
|
|
min_cpu_platform = null
|
|
name = "frontend-instance"
|
|
project = "fluted-agency-478713-h5"
|
|
resource_policies = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/instances/frontend-instance"
|
|
tags = [
|
|
"frontend",
|
|
"ssh",
|
|
]
|
|
tags_fingerprint = "sermMtqzdso="
|
|
terraform_labels = {}
|
|
zone = "europe-west9-b"
|
|
|
|
boot_disk {
|
|
auto_delete = true
|
|
device_name = "persistent-disk-0"
|
|
disk_encryption_key_raw = (sensitive value)
|
|
disk_encryption_key_sha256 = null
|
|
kms_key_self_link = null
|
|
mode = "READ_WRITE"
|
|
source = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/zones/europe-west9-b/disks/frontend-instance"
|
|
|
|
initialize_params {
|
|
enable_confidential_compute = false
|
|
image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251111"
|
|
labels = {}
|
|
provisioned_iops = 0
|
|
provisioned_throughput = 0
|
|
resource_manager_tags = {}
|
|
size = 10
|
|
storage_pool = null
|
|
type = "pd-standard"
|
|
}
|
|
}
|
|
|
|
network_interface {
|
|
internal_ipv6_prefix_length = 0
|
|
ipv6_access_type = null
|
|
ipv6_address = null
|
|
name = "nic0"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
network_ip = "10.0.1.2"
|
|
nic_type = null
|
|
queue_count = 0
|
|
stack_type = "IPV4_ONLY"
|
|
subnetwork = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-frontend-subnet"
|
|
subnetwork_project = "fluted-agency-478713-h5"
|
|
|
|
access_config {
|
|
nat_ip = "34.155.124.130"
|
|
network_tier = "PREMIUM"
|
|
public_ptr_domain_name = null
|
|
}
|
|
}
|
|
|
|
scheduling {
|
|
automatic_restart = true
|
|
instance_termination_action = null
|
|
min_node_cpus = 0
|
|
on_host_maintenance = "MIGRATE"
|
|
preemptible = false
|
|
provisioning_model = "STANDARD"
|
|
}
|
|
|
|
shielded_instance_config {
|
|
enable_integrity_monitoring = true
|
|
enable_secure_boot = false
|
|
enable_vtpm = true
|
|
}
|
|
}
|
|
# module.iam.data.google_client_openid_userinfo.me:
|
|
data "google_client_openid_userinfo" "me" {
|
|
email = "clement.jannaire@gmail.com"
|
|
id = "clement.jannaire@gmail.com"
|
|
}
|
|
|
|
# module.iam.google_os_login_ssh_public_key.me:
|
|
resource "google_os_login_ssh_public_key" "me" {
|
|
expiration_time_usec = null
|
|
fingerprint = "71eb6e62aaab9d725e150aa0fa1dcb91a2ff30909115fb7847146d2b5b25948d"
|
|
id = "users/clement.jannaire@gmail.com/sshPublicKeys/71eb6e62aaab9d725e150aa0fa1dcb91a2ff30909115fb7847146d2b5b25948d"
|
|
key = <<-EOT
|
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCvHKPTKUCVRU0a55sV7nlVuaAANya9BSoNHvyQ2NkBVxys87rkAIm8TR8JVBFOGSFEihkfJI2kz5XniUuj35G8SiECDv53YLSyJOoJ9EATs7RmZkk15ZsZ7XiOyOiX1fTpXvR4Mw5b4D/bg+mTfAXb7rbOCD3MmEcG4sGrX6iLCRnRMvzvxUBOwY/Jk3i+wg951buyzkJ+bTvOCzkSP5gX5lmcZaH7jfVOaGnFVOk1KHpTw0wNadJ/dS05AlaJJ0/kBFwt56biU09oZndVDR3ttSuYh9jiI25S57U3BEpXYj8wt8bbi+3N3b8o+ENUF8yeUkG5+UGEwVNToLL3Jk6zYuqgXDhyKw4K1n5DZbrqpHKFyVA3jbQh/PlP/oaJ7OT62lU+Oug6qAVUoz1+E7F4yf302KpvID49Q1LoFiTlDEtMuj//7mdr2L8KHEraUAWU8bxgVuP2tSJbwBmEJeT84dOShPc1u9rKPwvvzogvkWD3J9K5p3pANtC7vUCkCuc= clement_jannaire_gmail_com
|
|
EOT
|
|
project = "fluted-agency-478713-h5"
|
|
user = "clement.jannaire@gmail.com"
|
|
}
|
|
|
|
# module.iam.google_project_iam_binding.terraform_viewer:
|
|
resource "google_project_iam_binding" "terraform_viewer" {
|
|
etag = "BwZFHH+2K0U="
|
|
id = "fluted-agency-478713-h5/roles/viewer"
|
|
members = [
|
|
"serviceAccount:terraform@fluted-agency-478713-h5.iam.gserviceaccount.com",
|
|
]
|
|
project = "fluted-agency-478713-h5"
|
|
role = "roles/viewer"
|
|
}
|
|
|
|
# module.iam.google_service_account.terraform:
|
|
resource "google_service_account" "terraform" {
|
|
account_id = "terraform"
|
|
description = null
|
|
disabled = false
|
|
display_name = "Terraform Service Account"
|
|
email = "terraform@fluted-agency-478713-h5.iam.gserviceaccount.com"
|
|
id = "projects/fluted-agency-478713-h5/serviceAccounts/terraform@fluted-agency-478713-h5.iam.gserviceaccount.com"
|
|
member = "serviceAccount:terraform@fluted-agency-478713-h5.iam.gserviceaccount.com"
|
|
name = "projects/fluted-agency-478713-h5/serviceAccounts/terraform@fluted-agency-478713-h5.iam.gserviceaccount.com"
|
|
project = "fluted-agency-478713-h5"
|
|
unique_id = "113799660286299501126"
|
|
}
|
|
|
|
# module.iam.google_service_account_key.terraform:
|
|
resource "google_service_account_key" "terraform" {
|
|
id = "projects/fluted-agency-478713-h5/serviceAccounts/terraform@fluted-agency-478713-h5.iam.gserviceaccount.com/keys/3f90f00d6a96040007c614f42b0365ad3912e195"
|
|
key_algorithm = "KEY_ALG_RSA_2048"
|
|
name = "projects/fluted-agency-478713-h5/serviceAccounts/terraform@fluted-agency-478713-h5.iam.gserviceaccount.com/keys/3f90f00d6a96040007c614f42b0365ad3912e195"
|
|
private_key = (sensitive value)
|
|
private_key_type = "TYPE_GOOGLE_CREDENTIALS_FILE"
|
|
public_key = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvRENDQWVTZ0F3SUJBZ0lJY2Jrclc0WEtjYzh3RFFZSktvWklodmNOQVFFRkJRQXdJREVlTUJ3R0ExVUUKQXd3Vk1URXpOems1TmpZd01qZzJNams1TlRBeE1USTJNQ0FYRFRJMU1USXdOREE0TlRZd01Gb1lEems1T1RreApNak14TWpNMU9UVTVXakFnTVI0d0hBWURWUVFEREJVeE1UTTNPVGsyTmpBeU9EWXlPVGsxTURFeE1qWXdnZ0VpCk1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQ1lPczh4eU5tNDJ2c2NYTm1jNnpiVkYwY3gKUFhnSWs2d0RBVU5iOUY4TjhDN1JaRW1zdkl6amo4a0xZd09Qa3F6Z21Tak44cUhUeFZsVW5tckdhanUrcTVqdgpEdGc2eDNJZDZvTDhCclhMVVVabXZOUWJiaEhzZzVmUEZEa2xicDdSd0pZWEUyb0NlTnZ4T1BQVFhubEJwMTdRCmxIOXNKYU1RRUFCVVF4QkwwYTNMR2JjdXZYeUZSTmNUSXM3cHBWaDdTajdwL1pQbGR6WUt5R3p4OXRnV0ZleG0KT2YvbUUraTVBcWEvS1lzQjZxeGFqdjZvTHVHbXRhdS9aSGhZOUlxUTUwS3J6ckx4MlJmTERKdTd0VDNiTlU2OQozbWljRnlNdUlSb1ZERlFSQ1htaDMyaTFqZDh6THUwdFBrRnJXbTRBWnlTK3BNL3M1Ly9sbUJ3aGFBc1BBZ01CCkFBR2pPREEyTUF3R0ExVWRFd0VCL3dRQ01BQXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CWUdBMVVkSlFFQi93UU0KTUFvR0NDc0dBUVVGQndNQ01BMEdDU3FHU0liM0RRRUJCUVVBQTRJQkFRQ0xjaFNjOFp6dFdHWmVPVnlSTUJSKwphSjJ6dXFiaHZHSzJWRFBXODgweXNhNmhrNkttc09TVHl3UnhHSWZjMjB4UTE2Y2ZSSy9pRVhaSHhZN0IzU3hHClZvTFFIZTJUejVmZitpSzh6eHNCa2dRWDFBaVRweExBM0dUeFJLZHY3MW1GbytpQTNnQ283K2VmdlNob0ExRE8KRGpQYUZyOHA3Vk9aZW1BQ2pFMzRxc0piaU56YTM1Y2lycG9leHRNampPNjVyRm4wODVINTh2UGwrTjIrU0wxdQpEcFJPUmw5ZU1SS1hVUytqS3dXL3Y3R0l0bG13aUpmSnNiSUdDTEhTRDNhVUhLaWJtazQwSFh1SHl3eGtoUXdhCm1oU0lYQmI0M2FQOGlzQUVYMmdWdTV6TjJKWHYxQWthUWk1MDVVRStrRmNpNjNjRVF4V2xseE1vaVZieHBFWGUKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
|
|
public_key_type = "TYPE_X509_PEM_FILE"
|
|
service_account_id = "projects/fluted-agency-478713-h5/serviceAccounts/terraform@fluted-agency-478713-h5.iam.gserviceaccount.com"
|
|
valid_after = "2025-12-04T08:56:00Z"
|
|
valid_before = "9999-12-31T23:59:59Z"
|
|
}
|
|
# module.network.google_compute_firewall.backend_to_database_3306:
|
|
resource "google_compute_firewall" "backend_to_database_3306" {
|
|
creation_timestamp = "2025-12-03T07:08:41.312-08:00"
|
|
description = "Autorise le trafic TCP 3306 des instances backend vers database"
|
|
destination_ranges = []
|
|
direction = "INGRESS"
|
|
disabled = false
|
|
id = "projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-backend-database-3306"
|
|
name = "fluted-agency-478713-h5-fw-backend-database-3306"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
priority = 1000
|
|
project = "fluted-agency-478713-h5"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-backend-database-3306"
|
|
source_ranges = []
|
|
source_service_accounts = []
|
|
source_tags = [
|
|
"backend",
|
|
]
|
|
target_service_accounts = []
|
|
target_tags = [
|
|
"database",
|
|
]
|
|
|
|
allow {
|
|
ports = [
|
|
"3306",
|
|
]
|
|
protocol = "tcp"
|
|
}
|
|
}
|
|
|
|
# module.network.google_compute_firewall.frontend_http_https:
|
|
resource "google_compute_firewall" "frontend_http_https" {
|
|
creation_timestamp = "2025-12-03T07:08:41.348-08:00"
|
|
description = "Autorise HTTP/HTTPS vers les instances frontend"
|
|
destination_ranges = []
|
|
direction = "INGRESS"
|
|
disabled = false
|
|
id = "projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-frontend-http-https"
|
|
name = "fluted-agency-478713-h5-fw-frontend-http-https"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
priority = 1000
|
|
project = "fluted-agency-478713-h5"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-frontend-http-https"
|
|
source_ranges = [
|
|
"0.0.0.0/0",
|
|
]
|
|
source_service_accounts = []
|
|
source_tags = []
|
|
target_service_accounts = []
|
|
target_tags = [
|
|
"frontend",
|
|
]
|
|
|
|
allow {
|
|
ports = [
|
|
"80",
|
|
"443",
|
|
]
|
|
protocol = "tcp"
|
|
}
|
|
}
|
|
|
|
# module.network.google_compute_firewall.frontend_to_backend_8000:
|
|
resource "google_compute_firewall" "frontend_to_backend_8000" {
|
|
creation_timestamp = "2025-12-03T07:08:41.305-08:00"
|
|
description = "Autorise le trafic TCP 8000 des instances frontend vers backend"
|
|
destination_ranges = []
|
|
direction = "INGRESS"
|
|
disabled = false
|
|
id = "projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-frontend-backend-8000"
|
|
name = "fluted-agency-478713-h5-fw-frontend-backend-8000"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
priority = 1000
|
|
project = "fluted-agency-478713-h5"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-frontend-backend-8000"
|
|
source_ranges = []
|
|
source_service_accounts = []
|
|
source_tags = [
|
|
"frontend",
|
|
]
|
|
target_service_accounts = []
|
|
target_tags = [
|
|
"backend",
|
|
]
|
|
|
|
allow {
|
|
ports = [
|
|
"8000",
|
|
]
|
|
protocol = "tcp"
|
|
}
|
|
}
|
|
|
|
# module.network.google_compute_firewall.ssh_all:
|
|
resource "google_compute_firewall" "ssh_all" {
|
|
creation_timestamp = "2025-12-03T07:08:41.346-08:00"
|
|
description = "Autorise SSH vers toutes les instances du VPC"
|
|
destination_ranges = []
|
|
direction = "INGRESS"
|
|
disabled = false
|
|
id = "projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-ssh-all"
|
|
name = "fluted-agency-478713-h5-fw-ssh-all"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
priority = 1000
|
|
project = "fluted-agency-478713-h5"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/firewalls/fluted-agency-478713-h5-fw-ssh-all"
|
|
source_ranges = [
|
|
"34.155.72.245/32",
|
|
]
|
|
source_service_accounts = []
|
|
source_tags = []
|
|
target_service_accounts = []
|
|
target_tags = []
|
|
|
|
allow {
|
|
ports = [
|
|
"22",
|
|
]
|
|
protocol = "tcp"
|
|
}
|
|
}
|
|
|
|
# module.network.google_compute_network.vpc:
|
|
resource "google_compute_network" "vpc" {
|
|
auto_create_subnetworks = false
|
|
delete_default_routes_on_create = false
|
|
description = null
|
|
enable_ula_internal_ipv6 = false
|
|
gateway_ipv4 = null
|
|
id = "projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
internal_ipv6_range = null
|
|
mtu = 0
|
|
name = "fluted-agency-478713-h5-vpc"
|
|
network_firewall_policy_enforcement_order = "AFTER_CLASSIC_FIREWALL"
|
|
numeric_id = "2893955044504104076"
|
|
project = "fluted-agency-478713-h5"
|
|
routing_mode = "REGIONAL"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
}
|
|
|
|
# module.network.google_compute_router.nat_router:
|
|
resource "google_compute_router" "nat_router" {
|
|
creation_timestamp = "2025-12-04T02:29:18.660-08:00"
|
|
description = null
|
|
encrypted_interconnect_router = false
|
|
id = "projects/fluted-agency-478713-h5/regions/europe-west9/routers/fluted-agency-478713-h5-nat-router"
|
|
name = "fluted-agency-478713-h5-nat-router"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
project = "fluted-agency-478713-h5"
|
|
region = "europe-west9"
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/routers/fluted-agency-478713-h5-nat-router"
|
|
}
|
|
|
|
# module.network.google_compute_router_nat.nat:
|
|
resource "google_compute_router_nat" "nat" {
|
|
auto_network_tier = "PREMIUM"
|
|
enable_dynamic_port_allocation = false
|
|
enable_endpoint_independent_mapping = false
|
|
endpoint_types = [
|
|
"ENDPOINT_TYPE_VM",
|
|
]
|
|
icmp_idle_timeout_sec = 30
|
|
id = "fluted-agency-478713-h5/europe-west9/fluted-agency-478713-h5-nat-router/fluted-agency-478713-h5-cloud-nat"
|
|
max_ports_per_vm = 0
|
|
min_ports_per_vm = 0
|
|
name = "fluted-agency-478713-h5-cloud-nat"
|
|
nat_ip_allocate_option = "AUTO_ONLY"
|
|
project = "fluted-agency-478713-h5"
|
|
region = "europe-west9"
|
|
router = "fluted-agency-478713-h5-nat-router"
|
|
source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS"
|
|
tcp_established_idle_timeout_sec = 1200
|
|
tcp_time_wait_timeout_sec = 120
|
|
tcp_transitory_idle_timeout_sec = 30
|
|
udp_idle_timeout_sec = 30
|
|
|
|
subnetwork {
|
|
name = "fluted-agency-478713-h5-backend-subnet"
|
|
secondary_ip_range_names = []
|
|
source_ip_ranges_to_nat = [
|
|
"ALL_IP_RANGES",
|
|
]
|
|
}
|
|
subnetwork {
|
|
name = "fluted-agency-478713-h5-database-subnet"
|
|
secondary_ip_range_names = []
|
|
source_ip_ranges_to_nat = [
|
|
"ALL_IP_RANGES",
|
|
]
|
|
}
|
|
}
|
|
|
|
# module.network.google_compute_subnetwork.backend:
|
|
resource "google_compute_subnetwork" "backend" {
|
|
creation_timestamp = "2025-12-03T07:08:41.605-08:00"
|
|
description = null
|
|
external_ipv6_prefix = null
|
|
gateway_address = "10.0.2.1"
|
|
id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-backend-subnet"
|
|
internal_ipv6_prefix = null
|
|
ip_cidr_range = "10.0.2.0/24"
|
|
ipv6_access_type = null
|
|
ipv6_cidr_range = null
|
|
name = "fluted-agency-478713-h5-backend-subnet"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
private_ip_google_access = false
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
|
project = "fluted-agency-478713-h5"
|
|
purpose = "PRIVATE"
|
|
region = "europe-west9"
|
|
role = null
|
|
secondary_ip_range = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-backend-subnet"
|
|
stack_type = "IPV4_ONLY"
|
|
}
|
|
|
|
# module.network.google_compute_subnetwork.database:
|
|
resource "google_compute_subnetwork" "database" {
|
|
creation_timestamp = "2025-12-03T07:08:41.669-08:00"
|
|
description = null
|
|
external_ipv6_prefix = null
|
|
gateway_address = "10.0.3.1"
|
|
id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-database-subnet"
|
|
internal_ipv6_prefix = null
|
|
ip_cidr_range = "10.0.3.0/24"
|
|
ipv6_access_type = null
|
|
ipv6_cidr_range = null
|
|
name = "fluted-agency-478713-h5-database-subnet"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
private_ip_google_access = false
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
|
project = "fluted-agency-478713-h5"
|
|
purpose = "PRIVATE"
|
|
region = "europe-west9"
|
|
role = null
|
|
secondary_ip_range = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-database-subnet"
|
|
stack_type = "IPV4_ONLY"
|
|
}
|
|
|
|
# module.network.google_compute_subnetwork.frontend:
|
|
resource "google_compute_subnetwork" "frontend" {
|
|
creation_timestamp = "2025-12-03T07:08:41.668-08:00"
|
|
description = null
|
|
external_ipv6_prefix = null
|
|
gateway_address = "10.0.1.1"
|
|
id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-frontend-subnet"
|
|
internal_ipv6_prefix = null
|
|
ip_cidr_range = "10.0.1.0/24"
|
|
ipv6_access_type = null
|
|
ipv6_cidr_range = null
|
|
name = "fluted-agency-478713-h5-frontend-subnet"
|
|
network = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc"
|
|
private_ip_google_access = false
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
|
project = "fluted-agency-478713-h5"
|
|
purpose = "PRIVATE"
|
|
region = "europe-west9"
|
|
role = null
|
|
secondary_ip_range = []
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-frontend-subnet"
|
|
stack_type = "IPV4_ONLY"
|
|
}
|
|
|
|
|
|
Outputs:
|
|
|
|
backend_instance_name = "backend-instance"
|
|
backend_internal_ip = "10.0.2.2"
|
|
backend_subnet_id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-backend-subnet"
|
|
database_instance_name = "database-instance"
|
|
database_internal_ip = "10.0.3.2"
|
|
database_subnet_id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-database-subnet"
|
|
frontend_instance_name = "frontend-instance"
|
|
frontend_internal_ip = "10.0.1.2"
|
|
frontend_public_ip = "34.155.124.130"
|
|
frontend_subnet_id = "projects/fluted-agency-478713-h5/regions/europe-west9/subnetworks/fluted-agency-478713-h5-frontend-subnet"
|
|
vpc_id = "projects/fluted-agency-478713-h5/global/networks/fluted-agency-478713-h5-vpc" |