set network name -> dev

This commit is contained in:
Haitao Pan 2023-12-29 12:16:24 +08:00
parent f6a5d28782
commit 8420fd66de
3 changed files with 8 additions and 10 deletions

View File

@ -3,7 +3,7 @@ project_id: "cloudsvcsandbox"
bucket_name: "iac_gcp_terraform_state"
firewall_rules:
- name: allow-ingress
network: "custom"
network: "dev"
allow:
- protocol: tcp
ports: [ "22", "8022", "80", "443" ]

View File

@ -1,10 +1,10 @@
# Create a VPC network
resource "google_compute_network" "default" {
name = "custom"
name = "dev-vpc"
project = local.config.project_id
auto_create_subnetworks = false
delete_default_routes_on_create = true
description = "My custom network"
description = "My custom network for Dev"
}
# 1
@ -27,5 +27,3 @@ resource "google_compute_subnetwork" "private_subnet" {
ip_cidr_range = "10.0.3.0/24" # IP
network = google_compute_network.default.id
}

View File

@ -7,33 +7,33 @@ instances:
zone: "asia-northeast1-a"
image: "ubuntu-2004-lts"
disk_size_gb: 100
network: "custom"
network: "dev"
subnetwork: internet-subnet
- name: "monitor"
type: "e2-standard-4"
zone: "asia-northeast1-a"
image: "ubuntu-2004-lts"
disk_size_gb: 100
network: "custom"
network: "dev"
subnetwork: internet-subnet
- name: "sit"
image: "ubuntu-2004-lts"
disk_size_gb: 100
type: "e2-standard-2"
zone: "asia-northeast1-a"
network: "custom"
network: "dev"
subnetwork: internet-subnet
- name: "uat"
type: "e2-standard-4"
zone: "asia-northeast1-a"
image: "ubuntu-2004-lts"
disk_size_gb: 100
network: "custom"
network: "dev"
subnetwork: internet-subnet
- name: "prod"
type: "e2-standard-4"
zone: "asia-northeast1-a"
image: "ubuntu-2004-lts"
disk_size_gb: 100
network: "custom"
network: "dev"
subnetwork: internet-subnet