File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed
Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 11data "google_project" "default" {}
22resource "google_storage_bucket" "default" {
3- name = " dsb-devsecops-lab"
3+ name = " dsb-devsecops-lab-bucket "
44 location = var. region
55 force_destroy = true
66
@@ -9,4 +9,33 @@ resource "google_storage_bucket" "default" {
99 }
1010
1111 uniform_bucket_level_access = true
12- }
12+ }
13+
14+ resource "google_container_cluster" "primary" {
15+ name = " dsb-devsecops-cluster"
16+ location = var. region
17+
18+ # Only one node pool with one node
19+ initial_node_count = 1
20+
21+ # Enable GKE features
22+ remove_default_node_pool = true
23+ deletion_protection = false
24+
25+ # Specify network and subnetwork
26+ network = " default"
27+ subnetwork = " default"
28+ }
29+
30+ resource "google_container_node_pool" "primary_nodes" {
31+ cluster = google_container_cluster. primary . name
32+ location = google_container_cluster. primary . location
33+ node_count = 1 # Single node in the pool - super cheap :)
34+
35+ node_config {
36+ machine_type = " e2-standard-8"
37+ oauth_scopes = [
38+ " https://www.googleapis.com/auth/cloud-platform" ,
39+ ]
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments