Skip to content

Commit

Permalink
Remove working directory as it can't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
MennaTullahTaha committed Mar 11, 2024
1 parent 28e5b35 commit 89b6f9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89b6f9b

Please sign in to comment.