Skip to content

Hello world #32

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
20 changes: 20 additions & 0 deletions examples/sample_01/Terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
72 changes: 72 additions & 0 deletions examples/sample_01/Terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
provider "google" {
region = "europe-west1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not define region and zone here

zone = "europe-west1-c"
}

resource "google_bigquery_dataset" "dataset" {
project = var.project
dataset_id = "jarvis_sample_01"
location = "EU"


}

resource "google_bigquery_table" "car" {
project = var.project
dataset_id = google_bigquery_dataset.dataset.dataset_id
table_id = "car"

schema = <<EOF
[
{
"name": "id",
"type": "INTEGER",
"mode": "REQUIRED",
"description": "The license plate of the car "
},
{
"name": "brand",
"type": "STRING",
"mode": "NULLABLE",
"description": "The brand of the car "
},
{
"name": "price",
"type": "INTEGER",
"mode": "NULLABLE",
"description": "The price of the car "
}
]
EOF

}
resource "google_bigquery_table" "promoted_car" {
project = var.project
dataset_id = google_bigquery_dataset.dataset.dataset_id
table_id = "promoted_car"

schema = <<EOF
[
{
"name": "id",
"type": "INTEGER",
"mode": "REQUIRED",
"description": "The license plate of the car "
},
{
"name": "brand",
"type": "STRING",
"mode": "NULLABLE",
"description": "The brand of the car "
},
{
"name": "new_price",
"type": "INTEGER",
"mode": "NULLABLE",
"description": "The new price of the car "
}
]
EOF

}

8 changes: 8 additions & 0 deletions examples/sample_01/Terraform/terraform.tfstate
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 4,
"terraform_version": "1.0.9",
"serial": 17,
"lineage": "dec7945f-5d63-9aae-2549-893f09dacd89",
"outputs": {},
"resources": []
}
162 changes: 162 additions & 0 deletions examples/sample_01/Terraform/terraform.tfstate.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"version": 4,
"terraform_version": "1.0.9",
"serial": 16,
"lineage": "dec7945f-5d63-9aae-2549-893f09dacd89",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "google_bigquery_dataset",
"name": "dataset",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access": [
{
"domain": "",
"group_by_email": "",
"role": "OWNER",
"special_group": "",
"user_by_email": "[email protected]",
"view": []
},
{
"domain": "",
"group_by_email": "",
"role": "OWNER",
"special_group": "projectOwners",
"user_by_email": "",
"view": []
},
{
"domain": "",
"group_by_email": "",
"role": "READER",
"special_group": "projectReaders",
"user_by_email": "",
"view": []
},
{
"domain": "",
"group_by_email": "",
"role": "WRITER",
"special_group": "projectWriters",
"user_by_email": "",
"view": []
}
],
"creation_time": 1637315934978,
"dataset_id": "jarvis_sample_01",
"default_encryption_configuration": [],
"default_partition_expiration_ms": 0,
"default_table_expiration_ms": 0,
"delete_contents_on_destroy": false,
"description": "",
"etag": "Q3Wyblp5bl8CToPlPo33UQ==",
"friendly_name": "",
"id": "projects/koller-dani-sandbox/datasets/jarvis_sample_01",
"labels": null,
"last_modified_time": 1637315934978,
"location": "EU",
"project": "koller-dani-sandbox",
"self_link": "https://bigquery.googleapis.com/bigquery/v2/projects/koller-dani-sandbox/datasets/jarvis_sample_01",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoyNDAwMDAwMDAwMDAsImRlbGV0ZSI6MjQwMDAwMDAwMDAwLCJ1cGRhdGUiOjI0MDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "google_bigquery_table",
"name": "car",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"clustering": null,
"creation_time": 1637315935940,
"dataset_id": "jarvis_sample_01",
"deletion_protection": true,
"description": "",
"encryption_configuration": [],
"etag": "aEPC83Rxzm9GKDKQ9vBcWw==",
"expiration_time": 0,
"external_data_configuration": [],
"friendly_name": "",
"id": "projects/koller-dani-sandbox/datasets/jarvis_sample_01/tables/car",
"labels": null,
"last_modified_time": 1637315936124,
"location": "EU",
"materialized_view": [],
"num_bytes": 0,
"num_long_term_bytes": 0,
"num_rows": 0,
"project": "koller-dani-sandbox",
"range_partitioning": [],
"schema": "[{\"description\":\"The license plate of the car \",\"mode\":\"REQUIRED\",\"name\":\"id\",\"type\":\"INTEGER\"},{\"description\":\"The brand of the car \",\"mode\":\"NULLABLE\",\"name\":\"brand\",\"type\":\"STRING\"},{\"description\":\"The price of the car \",\"mode\":\"NULLABLE\",\"name\":\"price\",\"type\":\"INTEGER\"}]",
"self_link": "https://bigquery.googleapis.com/bigquery/v2/projects/koller-dani-sandbox/datasets/jarvis_sample_01/tables/car",
"table_id": "car",
"time_partitioning": [],
"type": "TABLE",
"view": []
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"google_bigquery_dataset.dataset"
]
}
]
},
{
"mode": "managed",
"type": "google_bigquery_table",
"name": "promoted_car",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"clustering": null,
"creation_time": 1637315935851,
"dataset_id": "jarvis_sample_01",
"deletion_protection": true,
"description": "",
"encryption_configuration": [],
"etag": "0QrcCbm/Tyw+xbDWXjWe8w==",
"expiration_time": 0,
"external_data_configuration": [],
"friendly_name": "",
"id": "projects/koller-dani-sandbox/datasets/jarvis_sample_01/tables/promoted_car",
"labels": null,
"last_modified_time": 1637315936047,
"location": "EU",
"materialized_view": [],
"num_bytes": 0,
"num_long_term_bytes": 0,
"num_rows": 0,
"project": "koller-dani-sandbox",
"range_partitioning": [],
"schema": "[{\"description\":\"The license plate of the car \",\"mode\":\"REQUIRED\",\"name\":\"id\",\"type\":\"INTEGER\"},{\"description\":\"The brand of the car \",\"mode\":\"NULLABLE\",\"name\":\"brand\",\"type\":\"STRING\"},{\"description\":\"The new price of the car \",\"mode\":\"NULLABLE\",\"name\":\"new_price\",\"type\":\"INTEGER\"}]",
"self_link": "https://bigquery.googleapis.com/bigquery/v2/projects/koller-dani-sandbox/datasets/jarvis_sample_01/tables/promoted_car",
"table_id": "promoted_car",
"time_partitioning": [],
"type": "TABLE",
"view": []
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"google_bigquery_dataset.dataset"
]
}
]
}
]
}
1 change: 1 addition & 0 deletions examples/sample_01/Terraform/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
project = "koller-dani-sandbox"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not add this to the repo, just keep it locally

1 change: 1 addition & 0 deletions examples/sample_01/Terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable "project" {}