File tree 1 file changed +31
-2
lines changed 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
data "google_project" "default" {}
2
2
resource "google_storage_bucket" "default" {
3
- name = " dsb-devsecops-lab"
3
+ name = " dsb-devsecops-lab-bucket "
4
4
location = var. region
5
5
force_destroy = true
6
6
@@ -9,4 +9,33 @@ resource "google_storage_bucket" "default" {
9
9
}
10
10
11
11
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