Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform Plan error in dataplex-quickstart-labs #60

Open
sam-nash opened this issue Nov 26, 2024 · 0 comments · May be fixed by #61
Open

Terraform Plan error in dataplex-quickstart-labs #60

sam-nash opened this issue Nov 26, 2024 · 0 comments · May be fixed by #61

Comments

@sam-nash
Copy link

Steps to Reproduce

  1. Create a new GCP project
  2. 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"
  1. Run Terraform init
  2. 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" {

@sam-nash sam-nash linked a pull request Nov 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant