From 89b6f9b972d4a9360e7bec5ec0d20177540fcb0b Mon Sep 17 00:00:00 2001 From: Menna Tullah Magdy Taha Date: Fri, 8 Mar 2024 12:53:07 +0100 Subject: [PATCH] Remove working directory as it can't be found --- .github/workflows/terraform.yml | 13 +++---------- main.tf | 8 ++++---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index be401bf..cdb4bac 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -42,22 +42,18 @@ jobs: # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc. - name: Terraform Init run: terraform init - working-directory: Terraform # formats the file - name: Terraform Format run: terraform fmt - working-directory: Terraform # Generates an execution plan for Terraform - name: Terraform Plan - run: terraform plan -var 'gcp_credentials=${{ secrets.GCP_SA_KEY }}' -var 'gke_cluster_name=${{ github.event.inputs.clusterName }}" -var 'gcp_region=${{ github.event.inputs.gkeRegion }}' - working-directory: Terraform + run: terraform plan -var 'gcp_credentials=${{ secrets.GCP_SA_KEY }}' -var 'gke_cluster_name=${{ github.event.inputs.clusterName }}' -var 'gcp_region=${{ github.event.inputs.gkeRegion }}' # Apply terraform - name: Terraform Apply - run: terraform apply -auto-approve - working-directory: Terraform + run: terraform apply -var 'gcp_credentials=${{ secrets.GCP_SA_KEY }}' -var 'gke_cluster_name=${{ github.event.inputs.clusterName }}' -var 'gcp_region=${{ github.event.inputs.gkeRegion }}' -auto-approve destroy_cluster: runs-on: ubuntu-latest @@ -90,14 +86,11 @@ jobs: # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc. - name: Terraform Init run: terraform init - working-directory: Terraform # formats the file - name: Terraform Format run: terraform fmt - working-directory: Terraform # Destroy cluster - name: Terraform Destroy - run: terraform destroy -var 'gcp_credentials=${{ secrets.GCP_SA_KEY }}' -var 'gke_cluster_name=${{ github.event.inputs.clusterName }}" -var 'gcp_region=${{ github.event.inputs.gkeRegion }}' -auto-approve - working-directory: Terraform + run: terraform destroy -var 'gcp_credentials=${{ secrets.GCP_SA_KEY }}' -var 'gke_cluster_name=${{ github.event.inputs.clusterName }}' -var 'gcp_region=${{ github.event.inputs.gkeRegion }}' -auto-approve diff --git a/main.tf b/main.tf index 7f11e04..eb6b9ad 100644 --- a/main.tf +++ b/main.tf @@ -11,17 +11,17 @@ module "gke" { network_policy = false horizontal_pod_autoscaling = true filestore_csi_driver = false - ip_range_services = "europe-west1-01-gke-01-services" - ip_range_pods = "europe-west1-01-gke-01-pods" + ip_range_services = "default" + ip_range_pods = "default" node_pools = [ { name = var.gke_default_nodepools_name - machine_type = "e2-medium" + machine_type = "e2-micro" min_count = 1 max_count = 3 local_ssd_count = 0 spot = false - disk_size_gb = 100 + disk_size_gb = 30 disk_type = "pd-standard" image_type = "COS_CONTAINERD" enable_gcfs = false