forked from pierront/but3-iac
616 lines
29 KiB
Plaintext
616 lines
29 KiB
Plaintext
|
|
clemenceducreux459@small-20251203-133523:~/but3-iac/terraform/environments/dev$ terraform show
|
||
|
|
# module.compute.google_compute_instance.backend:
|
||
|
|
resource "google_compute_instance" "backend" {
|
||
|
|
can_ip_forward = false
|
||
|
|
cpu_platform = "Intel Broadwell"
|
||
|
|
creation_timestamp = "2025-12-04T02:31:10.299-08:00"
|
||
|
|
current_status = "RUNNING"
|
||
|
|
deletion_protection = false
|
||
|
|
description = null
|
||
|
|
effective_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
enable_display = false
|
||
|
|
hostname = null
|
||
|
|
id = "projects/western-diorama-374821/zones/us-central1-a/instances/backend-instance"
|
||
|
|
instance_id = "1518400761897999361"
|
||
|
|
key_revocation_action_type = null
|
||
|
|
label_fingerprint = "vezUS-42LLM="
|
||
|
|
machine_type = "e2-small"
|
||
|
|
metadata = {
|
||
|
|
"enable-oslogin" = "TRUE"
|
||
|
|
}
|
||
|
|
metadata_fingerprint = "VIFIa5rN4V4="
|
||
|
|
min_cpu_platform = null
|
||
|
|
name = "backend-instance"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/instances/backend-instance"
|
||
|
|
tags = [
|
||
|
|
"backend",
|
||
|
|
"ssh",
|
||
|
|
]
|
||
|
|
tags_fingerprint = "N2bbCLFli_k="
|
||
|
|
terraform_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
zone = "us-central1-a"
|
||
|
|
|
||
|
|
boot_disk {
|
||
|
|
auto_delete = true
|
||
|
|
device_name = "persistent-disk-0"
|
||
|
|
disk_encryption_key_raw = (sensitive value)
|
||
|
|
disk_encryption_key_sha256 = null
|
||
|
|
interface = null
|
||
|
|
kms_key_self_link = null
|
||
|
|
mode = "READ_WRITE"
|
||
|
|
source = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/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_policies = []
|
||
|
|
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/western-diorama-374821/global/networks/western-diorama-374821-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/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-backend-subnet"
|
||
|
|
subnetwork_project = "western-diorama-374821"
|
||
|
|
}
|
||
|
|
|
||
|
|
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"
|
||
|
|
creation_timestamp = "2025-12-04T02:31:10.501-08:00"
|
||
|
|
current_status = "RUNNING"
|
||
|
|
deletion_protection = false
|
||
|
|
description = null
|
||
|
|
effective_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
enable_display = false
|
||
|
|
hostname = null
|
||
|
|
id = "projects/western-diorama-374821/zones/us-central1-a/instances/database-instance"
|
||
|
|
instance_id = "8513036091863653377"
|
||
|
|
key_revocation_action_type = null
|
||
|
|
label_fingerprint = "vezUS-42LLM="
|
||
|
|
machine_type = "e2-small"
|
||
|
|
metadata = {
|
||
|
|
"enable-oslogin" = "TRUE"
|
||
|
|
"environment" = "dev"
|
||
|
|
"owner" = "clemence"
|
||
|
|
}
|
||
|
|
metadata_fingerprint = "o5AWSB3O6Qs="
|
||
|
|
min_cpu_platform = null
|
||
|
|
name = "database-instance"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/instances/database-instance"
|
||
|
|
tags = [
|
||
|
|
"database",
|
||
|
|
"ssh",
|
||
|
|
]
|
||
|
|
tags_fingerprint = "22sTRfPQYj4="
|
||
|
|
terraform_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
zone = "us-central1-a"
|
||
|
|
|
||
|
|
boot_disk {
|
||
|
|
auto_delete = true
|
||
|
|
device_name = "persistent-disk-0"
|
||
|
|
disk_encryption_key_raw = (sensitive value)
|
||
|
|
disk_encryption_key_sha256 = null
|
||
|
|
interface = null
|
||
|
|
kms_key_self_link = null
|
||
|
|
mode = "READ_WRITE"
|
||
|
|
source = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/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_policies = []
|
||
|
|
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/western-diorama-374821/global/networks/western-diorama-374821-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/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-database-subnet"
|
||
|
|
subnetwork_project = "western-diorama-374821"
|
||
|
|
}
|
||
|
|
|
||
|
|
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"
|
||
|
|
creation_timestamp = "2025-12-04T02:31:10.526-08:00"
|
||
|
|
current_status = "RUNNING"
|
||
|
|
deletion_protection = false
|
||
|
|
description = null
|
||
|
|
effective_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
enable_display = false
|
||
|
|
hostname = null
|
||
|
|
id = "projects/western-diorama-374821/zones/us-central1-a/instances/frontend-instance"
|
||
|
|
instance_id = "1170061609769163777"
|
||
|
|
key_revocation_action_type = null
|
||
|
|
label_fingerprint = "vezUS-42LLM="
|
||
|
|
machine_type = "e2-small"
|
||
|
|
metadata = {
|
||
|
|
"enable-oslogin" = "TRUE"
|
||
|
|
}
|
||
|
|
metadata_fingerprint = "VIFIa5rN4V4="
|
||
|
|
min_cpu_platform = null
|
||
|
|
name = "frontend-instance"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/instances/frontend-instance"
|
||
|
|
tags = [
|
||
|
|
"frontend",
|
||
|
|
"ssh",
|
||
|
|
]
|
||
|
|
tags_fingerprint = "sermMtqzdso="
|
||
|
|
terraform_labels = {
|
||
|
|
"goog-terraform-provisioned" = "true"
|
||
|
|
}
|
||
|
|
zone = "us-central1-a"
|
||
|
|
|
||
|
|
boot_disk {
|
||
|
|
auto_delete = true
|
||
|
|
device_name = "persistent-disk-0"
|
||
|
|
disk_encryption_key_raw = (sensitive value)
|
||
|
|
disk_encryption_key_sha256 = null
|
||
|
|
interface = null
|
||
|
|
kms_key_self_link = null
|
||
|
|
mode = "READ_WRITE"
|
||
|
|
source = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/zones/us-central1-a/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_policies = []
|
||
|
|
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/western-diorama-374821/global/networks/western-diorama-374821-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/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-frontend-subnet"
|
||
|
|
subnetwork_project = "western-diorama-374821"
|
||
|
|
|
||
|
|
access_config {
|
||
|
|
nat_ip = "34.132.205.47"
|
||
|
|
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 = "clemenceducreux459@gmail.com"
|
||
|
|
id = "clemenceducreux459@gmail.com"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.iam.google_os_login_ssh_public_key.ssh_key:
|
||
|
|
resource "google_os_login_ssh_public_key" "ssh_key" {
|
||
|
|
expiration_time_usec = null
|
||
|
|
fingerprint = "bae4ee52e570411c8a41d0d46f05dc7f23b515da1276de0abadb928dbc8fade9"
|
||
|
|
id = "users/clemenceducreux459@gmail.com/sshPublicKeys/bae4ee52e570411c8a41d0d46f05dc7f23b515da1276de0abadb928dbc8fade9"
|
||
|
|
key = <<-EOT
|
||
|
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDqZZpZmHK1MZMQMHfJIbbHtX13eNmUBkjtuP2aoazze6OTRYIUcMPdWhSyuQvgBoell4OiG7qSklbi49rzuTXoB2LsN2e39YHh7/aGisaot5ef0XNePD6/q0Rkpwz4arCrmpuGEX+ukABmp889hYReSHN3jafad0/loHFCbnoL3X+2jkbVjsDvkL78hkvF/SbeEc/C+BCDwSip5ylwmmRG+7eFvG6gwpQOlvcI3zpCXStAe8Tqk8ssE7RhjiVOvS7Wwc3xZ3QcS9dQgPIzcX87JjBE4FJalL3NDUtwV/ikmnvG9aejbpYA2cqckK4sXyrpSWh1C6sF7Ozosf0lhdnaeVRkl3cWcDX1UFTtrVV4oxPykFIj88lNRJEiu2N1UrD2SlWTdo6NYaDKxto9l5nQ3CwaSua3miwx+Nt74ujp2TxWKh4AV+A9qx6jZPjTiZcRtQdsrN50RxTGWjmfZZOuS1+mqYaTpcT5OZhetYtBDtB2BRznNrjMBg9/y21fCI0= clemenceducreux459_gmail_com
|
||
|
|
EOT
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
user = "clemenceducreux459@gmail.com"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.iam.google_project_iam_binding.viewer_binding:
|
||
|
|
resource "google_project_iam_binding" "viewer_binding" {
|
||
|
|
etag = "BwZFHdGW5o4="
|
||
|
|
id = "western-diorama-374821/roles/viewer"
|
||
|
|
members = [
|
||
|
|
"serviceAccount:terraform@western-diorama-374821.iam.gserviceaccount.com",
|
||
|
|
]
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
role = "roles/viewer"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
# module.iam.google_project_iam_custom_role.custom_viewer:
|
||
|
|
resource "google_project_iam_custom_role" "custom_viewer" {
|
||
|
|
deleted = false
|
||
|
|
description = "Role custom pour TP"
|
||
|
|
id = "projects/western-diorama-374821/roles/customBasicViewer"
|
||
|
|
name = "projects/western-diorama-374821/roles/customBasicViewer"
|
||
|
|
permissions = [
|
||
|
|
"compute.instances.get",
|
||
|
|
"compute.instances.list",
|
||
|
|
]
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
role_id = "customBasicViewer"
|
||
|
|
stage = "GA"
|
||
|
|
title = "Custom Basic Viewer"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.iam.google_service_account.terraform_sa:
|
||
|
|
resource "google_service_account" "terraform_sa" {
|
||
|
|
account_id = "terraform"
|
||
|
|
description = null
|
||
|
|
disabled = false
|
||
|
|
display_name = "Terraform Service Account"
|
||
|
|
email = "terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
id = "projects/western-diorama-374821/serviceAccounts/terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
member = "serviceAccount:terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
name = "projects/western-diorama-374821/serviceAccounts/terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
unique_id = "112105192413778847625"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.iam.google_service_account_key.terraform_sa_key:
|
||
|
|
resource "google_service_account_key" "terraform_sa_key" {
|
||
|
|
id = "projects/western-diorama-374821/serviceAccounts/terraform@western-diorama-374821.iam.gserviceaccount.com/keys/3b8070e4fb7b070c717a2708afd9d699ec80d606"
|
||
|
|
key_algorithm = "KEY_ALG_RSA_2048"
|
||
|
|
name = "projects/western-diorama-374821/serviceAccounts/terraform@western-diorama-374821.iam.gserviceaccount.com/keys/3b8070e4fb7b070c717a2708afd9d699ec80d606"
|
||
|
|
private_key = (sensitive value)
|
||
|
|
private_key_type = "TYPE_GOOGLE_CREDENTIALS_FILE"
|
||
|
|
public_key = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvRENDQWVTZ0F3SUJBZ0lJVnRRc1Y4OHU2UUF3RFFZSktvWklodmNOQVFFRkJRQXdJREVlTUJ3R0ExVUUKQXd3Vk1URXlNVEExTVRreU5ERXpOemM0T0RRM05qSTFNQ0FYRFRJMU1USXdOREV3TXpBeU9Wb1lEems1T1RreApNak14TWpNMU9UVTVXakFnTVI0d0hBWURWUVFEREJVeE1USXhNRFV4T1RJME1UTTNOemc0TkRjMk1qVXdnZ0VpCk1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQ3pPZEw5SWZWMWMySTNRRzg4K21nbjZmR3AKTVIwRUZRNHZvWmY5L21FNkhaQ1JyMGVmbUI3UFVnbDBxRUZJZU91RHNZdjMvWGo0WW1nVWFlWVZKYVJSZXZxNQpmWlZyZFoyYW9xSmFwa2t5aEtmSEtQeG1Bb0ZrVE1qUmlXUFIrMXpmbGtOcE1oQ3ZpNTRUMmltSFErYzVveEIxCmswYWxCR0ErcVRzRW1CamxtWGt0Mkp6NHI3WGhETmhMaWpzcE1uTTFsN0ZxR1VtdjcxVmkybzhhTndmZko3MUYKVGJHUmpuMFJSTE1pTjYvWUwyUmJ6VmlIYWNkMjJjRmVmSStITldSUzJDMzE1Q25kRzBaNzc4dldHMkdGc3hyeAp2OWJ2SlZYamRMVGJodEZUZXRxR1QrNUlxU1U0cWZheFBaeVgxOS9pWmZvQ242MHVCN2FoSlRoZGUvVlhBZ01CCkFBR2pPREEyTUF3R0ExVWRFd0VCL3dRQ01BQXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CWUdBMVVkSlFFQi93UU0KTUFvR0NDc0dBUVVGQndNQ01BMEdDU3FHU0liM0RRRUJCUVVBQTRJQkFRQkJlY3VCR0FEbkRhWVNLWUF2WWhLNQo1REhqeXdGWGVabG8wa0FyTUJIL0FzMGtyMHpvd2UzcUFqZ0xQcWFTendCNXpzT1NPdHU0bkp3aDBwTmRMVnBTClA3RzFib2ovSmdwQ25yS2YyeFlLclhFRjUxTWFsdGJ3WHgwdGxQdnFEYUlDSC9GT0lNdGk2bHpDc3JZTWxhZisKOFgxaWlVOS9JQ3o2aDlaVmpWQXNXMmxqeHcrNzQxMGs2QUpqWEY3Z3R2OTZUM1lQejh5U1RSRGNFK2JpNkl0awpvOW1JT29JbVRDb0E3bXhSbHZkZTZBeit3aVBlenlyL2xwakQyS0t3TGlCQVd1eXI0aXNTTFc2N0wzdmY1QXYyClUwa3doOUk0MG9FZ1lMU1JPcGFOSEgrUzE0NXY0eGxMRFVyQ0dpZUV3NUxJYzFrQm1IMDlKWk5rVGdUWXVhb2cKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
|
||
|
|
public_key_type = "TYPE_X509_PEM_FILE"
|
||
|
|
service_account_id = "projects/western-diorama-374821/serviceAccounts/terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
valid_after = "2025-12-04T10:30:29Z"
|
||
|
|
valid_before = "9999-12-31T23:59:59Z"
|
||
|
|
}
|
||
|
|
# module.network.google_compute_firewall.fw_backend_to_database_3306:
|
||
|
|
resource "google_compute_firewall" "fw_backend_to_database_3306" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.273-08:00"
|
||
|
|
description = null
|
||
|
|
destination_ranges = []
|
||
|
|
direction = "INGRESS"
|
||
|
|
disabled = false
|
||
|
|
id = "projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-backend-database-3306"
|
||
|
|
name = "western-diorama-374821-fw-backend-database-3306"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
priority = 1000
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-backend-database-3306"
|
||
|
|
source_ranges = [
|
||
|
|
"10.0.2.0/24",
|
||
|
|
]
|
||
|
|
target_tags = [
|
||
|
|
"database",
|
||
|
|
]
|
||
|
|
|
||
|
|
allow {
|
||
|
|
ports = [
|
||
|
|
"3306",
|
||
|
|
]
|
||
|
|
protocol = "tcp"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_firewall.fw_frontend_to_backend_8000:
|
||
|
|
resource "google_compute_firewall" "fw_frontend_to_backend_8000" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.236-08:00"
|
||
|
|
description = null
|
||
|
|
destination_ranges = []
|
||
|
|
direction = "INGRESS"
|
||
|
|
disabled = false
|
||
|
|
id = "projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-frontend-backend-8000"
|
||
|
|
name = "western-diorama-374821-fw-frontend-backend-8000"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
priority = 1000
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-frontend-backend-8000"
|
||
|
|
source_ranges = [
|
||
|
|
"10.0.1.0/24",
|
||
|
|
]
|
||
|
|
target_tags = [
|
||
|
|
"backend",
|
||
|
|
]
|
||
|
|
|
||
|
|
allow {
|
||
|
|
ports = [
|
||
|
|
"8000",
|
||
|
|
]
|
||
|
|
protocol = "tcp"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_firewall.fw_http_https_frontend:
|
||
|
|
resource "google_compute_firewall" "fw_http_https_frontend" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.190-08:00"
|
||
|
|
description = null
|
||
|
|
destination_ranges = []
|
||
|
|
direction = "INGRESS"
|
||
|
|
disabled = false
|
||
|
|
id = "projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-http-https-frontend"
|
||
|
|
name = "western-diorama-374821-fw-http-https-frontend"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
priority = 1000
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-http-https-frontend"
|
||
|
|
source_ranges = [
|
||
|
|
"0.0.0.0/0",
|
||
|
|
]
|
||
|
|
target_tags = [
|
||
|
|
"frontend",
|
||
|
|
]
|
||
|
|
|
||
|
|
allow {
|
||
|
|
ports = [
|
||
|
|
"80",
|
||
|
|
"443",
|
||
|
|
]
|
||
|
|
protocol = "tcp"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_firewall.fw_ssh:
|
||
|
|
resource "google_compute_firewall" "fw_ssh" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.303-08:00"
|
||
|
|
description = null
|
||
|
|
destination_ranges = []
|
||
|
|
direction = "INGRESS"
|
||
|
|
disabled = false
|
||
|
|
id = "projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-ssh"
|
||
|
|
name = "western-diorama-374821-fw-ssh"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
priority = 1000
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/firewalls/western-diorama-374821-fw-ssh"
|
||
|
|
source_ranges = [
|
||
|
|
"35.239.249.161/32",
|
||
|
|
]
|
||
|
|
|
||
|
|
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/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
internal_ipv6_range = null
|
||
|
|
mtu = 0
|
||
|
|
name = "western-diorama-374821-vpc"
|
||
|
|
network_firewall_policy_enforcement_order = "AFTER_CLASSIC_FIREWALL"
|
||
|
|
numeric_id = "2131843227024415831"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
routing_mode = "REGIONAL"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_router.nat_router:
|
||
|
|
resource "google_compute_router" "nat_router" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.171-08:00"
|
||
|
|
description = null
|
||
|
|
encrypted_interconnect_router = false
|
||
|
|
id = "projects/western-diorama-374821/regions/us-central1/routers/western-diorama-374821-nat-router"
|
||
|
|
name = "western-diorama-374821-nat-router"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
region = "us-central1"
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/regions/us-central1/routers/western-diorama-374821-nat-router"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_router_nat.nat_config:
|
||
|
|
resource "google_compute_router_nat" "nat_config" {
|
||
|
|
auto_network_tier = "PREMIUM"
|
||
|
|
drain_nat_ips = []
|
||
|
|
enable_dynamic_port_allocation = false
|
||
|
|
enable_endpoint_independent_mapping = false
|
||
|
|
endpoint_types = [
|
||
|
|
"ENDPOINT_TYPE_VM",
|
||
|
|
]
|
||
|
|
icmp_idle_timeout_sec = 30
|
||
|
|
id = "western-diorama-374821/us-central1/western-diorama-374821-nat-router/western-diorama-374821-nat-config"
|
||
|
|
max_ports_per_vm = 0
|
||
|
|
min_ports_per_vm = 0
|
||
|
|
name = "western-diorama-374821-nat-config"
|
||
|
|
nat_ip_allocate_option = "AUTO_ONLY"
|
||
|
|
nat_ips = []
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
region = "us-central1"
|
||
|
|
router = "western-diorama-374821-nat-router"
|
||
|
|
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"
|
||
|
|
tcp_established_idle_timeout_sec = 1200
|
||
|
|
tcp_time_wait_timeout_sec = 120
|
||
|
|
tcp_transitory_idle_timeout_sec = 30
|
||
|
|
udp_idle_timeout_sec = 30
|
||
|
|
|
||
|
|
log_config {
|
||
|
|
enable = false
|
||
|
|
filter = "ALL"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_subnetwork.backend:
|
||
|
|
resource "google_compute_subnetwork" "backend" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.253-08:00"
|
||
|
|
description = null
|
||
|
|
external_ipv6_prefix = null
|
||
|
|
gateway_address = "10.0.2.1"
|
||
|
|
id = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-backend-subnet"
|
||
|
|
internal_ipv6_prefix = null
|
||
|
|
ip_cidr_range = "10.0.2.0/24"
|
||
|
|
ipv6_access_type = null
|
||
|
|
ipv6_cidr_range = null
|
||
|
|
name = "western-diorama-374821-backend-subnet"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
private_ip_google_access = false
|
||
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
purpose = "PRIVATE"
|
||
|
|
region = "us-central1"
|
||
|
|
reserved_internal_range = null
|
||
|
|
role = null
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-backend-subnet"
|
||
|
|
stack_type = "IPV4_ONLY"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
# module.network.google_compute_subnetwork.database:
|
||
|
|
resource "google_compute_subnetwork" "database" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.683-08:00"
|
||
|
|
description = null
|
||
|
|
external_ipv6_prefix = null
|
||
|
|
gateway_address = "10.0.3.1"
|
||
|
|
id = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-database-subnet"
|
||
|
|
internal_ipv6_prefix = null
|
||
|
|
ip_cidr_range = "10.0.3.0/24"
|
||
|
|
ipv6_access_type = null
|
||
|
|
ipv6_cidr_range = null
|
||
|
|
name = "western-diorama-374821-database-subnet"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
private_ip_google_access = false
|
||
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
purpose = "PRIVATE"
|
||
|
|
region = "us-central1"
|
||
|
|
reserved_internal_range = null
|
||
|
|
role = null
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-database-subnet"
|
||
|
|
stack_type = "IPV4_ONLY"
|
||
|
|
}
|
||
|
|
|
||
|
|
# module.network.google_compute_subnetwork.frontend:
|
||
|
|
resource "google_compute_subnetwork" "frontend" {
|
||
|
|
creation_timestamp = "2025-12-04T02:30:38.682-08:00"
|
||
|
|
description = null
|
||
|
|
external_ipv6_prefix = null
|
||
|
|
gateway_address = "10.0.1.1"
|
||
|
|
id = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-frontend-subnet"
|
||
|
|
internal_ipv6_prefix = null
|
||
|
|
ip_cidr_range = "10.0.1.0/24"
|
||
|
|
ipv6_access_type = null
|
||
|
|
ipv6_cidr_range = null
|
||
|
|
name = "western-diorama-374821-frontend-subnet"
|
||
|
|
network = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|
||
|
|
private_ip_google_access = false
|
||
|
|
private_ipv6_google_access = "DISABLE_GOOGLE_ACCESS"
|
||
|
|
project = "western-diorama-374821"
|
||
|
|
purpose = "PRIVATE"
|
||
|
|
region = "us-central1"
|
||
|
|
reserved_internal_range = null
|
||
|
|
role = null
|
||
|
|
self_link = "https://www.googleapis.com/compute/v1/projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-frontend-subnet"
|
||
|
|
stack_type = "IPV4_ONLY"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
Outputs:
|
||
|
|
|
||
|
|
frontend_public_ip = "34.132.205.47"
|
||
|
|
instance_names = {
|
||
|
|
backend = "backend-instance"
|
||
|
|
database = "database-instance"
|
||
|
|
frontend = "frontend-instance"
|
||
|
|
}
|
||
|
|
internal_ips = {
|
||
|
|
backend = "10.0.2.2"
|
||
|
|
database = "10.0.3.2"
|
||
|
|
frontend = "10.0.1.2"
|
||
|
|
}
|
||
|
|
service_account_email = "terraform@western-diorama-374821.iam.gserviceaccount.com"
|
||
|
|
service_account_key = (sensitive value)
|
||
|
|
subnet_ids = {
|
||
|
|
backend = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-backend-subnet"
|
||
|
|
database = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-database-subnet"
|
||
|
|
frontend = "projects/western-diorama-374821/regions/us-central1/subnetworks/western-diorama-374821-frontend-subnet"
|
||
|
|
}
|
||
|
|
vpc_id = "projects/western-diorama-374821/global/networks/western-diorama-374821-vpc"
|