Skip to content

Commit

Permalink
Changes to resolve error in creating gcloud-e2e-test-cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
igooch committed Mar 23, 2023
1 parent 5ddbe60 commit 2c6f5b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build/includes/google-cloud.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ clean-gcloud-test-cluster: $(ensure-build-image)

gcloud-e2e-infra-state-bucket: GCP_PROJECT ?= $(shell $(current_project))
gcloud-e2e-infra-state-bucket:
$(MAKE) terraform-init DIRECTORY=e2e/state-bucket
docker run --rm -it $(common_mounts) $(build_tag) bash -c 'cd $(mount_path)/build/terraform/e2e/state-bucket && \
terraform apply -auto-approve -var project="$(GCP_PROJECT)"'

Expand Down Expand Up @@ -88,4 +89,4 @@ gcloud-auth-docker: $(ensure-build-image)

# Clean the gcloud configuration
clean-gcloud-config:
-sudo rm -r $(build_path)/.config
-sudo rm -r $(build_path)/.config
2 changes: 1 addition & 1 deletion build/includes/terraform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ terraform-init: TERRAFORM_BUILD_DIR ?= $(mount_path)/build/terraform/$(DIRECTORY
terraform-init: $(ensure-build-image)
terraform-init:
docker run --rm -it $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c '\
cd $(TERRAFORM_BUILD_DIR) && terraform init -backend-config="bucket=$(BUCKET)" -backend-config="prefix=$(PREFIX)" && gcloud auth application-default login'
cd $(TERRAFORM_BUILD_DIR) && terraform init -reconfigure -backend-config="bucket=$(BUCKET)" -backend-config="prefix=$(PREFIX)" && gcloud auth application-default login'

terraform-clean: TERRAFORM_BUILD_DIR ?= $(mount_path)/build/terraform/gke
terraform-clean:
Expand Down

0 comments on commit 2c6f5b7

Please sign in to comment.