set network name -> dev
This commit is contained in:
parent
f6a5d28782
commit
8420fd66de
@ -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" ]
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user