64496220

Date: 2020-10-23 09:10:29
Score: 9
Natty:
Report link

How did you added that 'depends_on' code to the main.tf ? could you please help me on the code.

I have added like below but still i am getting the same error,

resource "google_bigquery_dataset" "demo" {
  dataset_id                  = "${var.db_id}"
  friendly_name               = "${var.friendly_name}"
  location                    = "${var.region}"
  default_table_expiration_ms = "3600000"
  labels = {
    env = "default"
  }
}
resource "google_bigquery_table" "demo" {
 dataset_id = "${var.db_id}"
 table_id   = "${var.table}"
 time_partitioning {
   type = "DAY"
 } 
 labels = {
   env = "default"
 }
 schema = <<EOF
[  
 {
  "name": "br_op_inventory_a",
  "type": "STRING",
  "mode": "NULLABLE"
 },
 {
 "name": "state",
 "type": "STRING",
 "mode": "NULLABLE"
 }
]
EOF
}

resource "google_bigquery_table" "devops" {
  dataset_id = "${var.db_id}"
  table_id   = "${var.table_1}"
  time_partitioning {
   type = "DAY"
   }
   labels = {
     env = "default"
   }
   schema = <<EOF
   [
    {
     "name": "br_op_a",
     "type": "STRING",
     "mode": "NULLABLE"
    },
   {  
    "name": "state12",
    "type": "STRING",
    "mode": "NULLABLE"
   }
  ]
  EOF
  }

output "bigquery_table_status" {
   value       = google_bigquery_table.demo.table_id
   depends_on = [
      # Testing
     google_bigquery_dataset.demo,
   ]
}

output "bigquery_table_status1" {
  value       = google_bigquery_table.devops.table_id
  depends_on = [
    # Testing
    google_bigquery_dataset.demo,
  ]
}

Please advise

Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (1): getting the same error
  • RegEx Blacklisted phrase (1.5): Please advise
  • RegEx Blacklisted phrase (3): could you please help me
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2): i am getting the same error
  • Contains question mark (0.5):
  • Starts with a question (0.5): How did you add
  • Low reputation (1):
Posted by: Narendran N