-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Steps to Reproduce
- Create a new GCP project
- Set the env vars on your cloud shell as per Step 2. Declare variables
PROJECT_ID=`gcloud config list --format "value(core.project)" 2>/dev/null`
PROJECT_NBR=`gcloud projects describe $PROJECT_ID | grep projectNumber | cut -d':' -f2 | tr -d "'" | xargs`
GCP_ACCOUNT_NAME=`gcloud auth list --filter=status:ACTIVE --format="value(account)"`
ORG_ID=`gcloud organizations list --format="value(name)"`
CLOUD_COMPOSER_IMG_VERSION="composer-2.6.6-airflow-2.5.3"
YOUR_GCP_REGION="us-central1"
YOUR_GCP_ZONE="us-central1-a"
YOUR_GCP_MULTI_REGION="US"
BQ_CONNECTOR_JAR_GCS_URI="gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.22.2.jar"
- Run Terraform init
- Run Terraform Plan
terraform plan \ -var="project_id=${PROJECT_ID}" \ -var="project_number=${PROJECT_NBR}" \ -var="gcp_account_name=${GCP_ACCOUNT_NAME}" \ -var="org_id=${ORG_ID}" \ -var="cloud_composer_image_version=${CLOUD_COMPOSER_IMG_VERSION}" \ -var="gcp_region=${YOUR_GCP_REGION}" \ -var="gcp_zone=${YOUR_GCP_ZONE}" \ -var="gcp_multi_region=${YOUR_GCP_MULTI_REGION}" \ -var="bq_connector_jar_gcs_uri=${BQ_CONNECTOR_JAR_GCS_URI}"
Expected : Plan is successful without errors
Actual : Error below
Plan: 112 to add, 0 to change, 0 to destroy.
╷
│ Error: Failed to retrieve project, pid: , err: project: required field is not set
│
│ with google_composer_environment.create_cloud_composer_env,
│ on main.tf line 735, in resource "google_composer_environment" "create_cloud_composer_env":
│ 735: resource "google_composer_environment" "create_cloud_composer_env" {
Metadata
Metadata
Assignees
Labels
No labels