Skip to content

Commit

Permalink
Updating copyright to 2019, adding hardcoded values in example, test …
Browse files Browse the repository at this point in the history
…is referencing example module
  • Loading branch information
adigangi committed Apr 2, 2019
1 parent 672c735 commit 719a8be
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GEM
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
domain_name (0.5.20180417)
domain_name (0.5.20190417)
unf (>= 0.0.5, < 1.0.0)
dry-configurable (0.7.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -132,7 +132,7 @@ GEM
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mime-types-data (3.2019.0812)
mixlib-install (3.11.5)
mixlib-shellout
mixlib-versioning
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,7 @@ This module provisions a dataset and a table with an associated JSON schema.
| dataset_labels | Key value pairs in a map for dataset labels |
| table_labels | Key value pairs in a map for table labels |

[^]: (autogen_docs_end)

## File structure
The project has the following folders and files:
```bash
.
├── docs # folder is the landing location for troubleshooting docs
├── examples # example deployments of the module
├── helpers # optional scripts to setup required packages, gcp services, etc
├── test # kitchen fixtures, boilerplate & integration tests
├── .kitchen.yml # establishing the kitchen root
├── config.tf # terraform providers & Requirements
├── Gemfile # Gemfile containing reqired Gems for running kitchen-terraform
├── Gemfile.lock # Locked gem versions
├── main.tf # terraform module
├── Makefile # enables make to setup local environment
├── outputs.tf # module outputs
├── variables.tf # variables that can be consumed by the module
├── LICENSE
└── README.md
```
## Requirements
### Terraform plugins
- [Terraform](https://www.terraform.io/downloads.html) 0.11.x
Expand Down
14 changes: 7 additions & 7 deletions examples/basic_bq/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,15 +23,15 @@ provider "google" {

module "bigquery" {
source = "../.."
dataset_id = "${var.dataset_id}"
dataset_name = "${var.dataset_name}"
description = "${var.description}"
dataset_id = "foo"
dataset_name = "foo"
description = "some description"
expiration = "${var.expiration}"
project_id = "${var.project_id}"
location = "${var.location}"
table_id = "${var.table_id}"
location = "US"
table_id = "bar"
time_partitioning = "${var.time_partitioning}"
schema_file = "${var.schema_file}"
schema_file = "sample_bq_schema.json"
dataset_labels = "${var.dataset_labels }"
table_labels = "${var.table_labels}"
}
2 changes: 1 addition & 1 deletion examples/basic_bq/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
dataset_id = "foo"
dataset_name = "foo"
location = "US"
description = "some description"
expiration = 3600000
project_id = "example-project"
table_id = "foo"
time_partitioning = "DAY"
schema_file = "sample_bq_schema.json"
dataset_labels = {
env = "dev"
billable = "true"
Expand Down
26 changes: 1 addition & 25 deletions examples/basic_bq/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,18 +14,6 @@
* limitations under the License.
*/

variable "dataset_id" {
description = "Unique ID for the dataset being provisioned"
}

variable "dataset_name" {
description = "Friendly name for the dataset being provisioned"
}

variable "description" {
description = "Dataset description"
}

variable "expiration" {
description = "TTL of tables using the dataset in MS"
}
Expand All @@ -34,22 +22,10 @@ variable "project_id" {
description = "Project wheree the dataset and table are created"
}

variable "table_id" {
description = "Unique ID for the table being provisioned"
}

variable "location" {
description = "The regional location for the dataset only US and EU are allowed in module"
}

variable "time_partitioning" {
description = "Configures time-based partitioning for this table"
}

variable "schema_file" {
description = "A JSON schema for the table"
}

variable "dataset_labels" {
description = "A mapping of labels to assign to the table"
type = "map"
Expand Down
2 changes: 1 addition & 1 deletion helpers/combine_docfiles.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion helpers/setup-sa.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion helpers/version-repo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.Makefile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018 Google LLC
Copyright 2019 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.py.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.sh.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.tf.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.xml.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2018 Google LLC
Copyright 2019 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/boilerplate/boilerplate.yaml.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
12 changes: 3 additions & 9 deletions test/fixtures/full/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,17 +21,11 @@ provider "google" {
version = "~> 1.20.0"
}

module "bigquery" {
source = "../../.."
dataset_id = "${var.dataset_id}"
dataset_name = "${var.dataset_name}"
description = "${var.description}"
module "example" {
source = "../../../examples/basic_bq"
expiration = "${var.expiration}"
project_id = "${var.project_id}"
location = "${var.location}"
table_id = "${var.table_id}"
time_partitioning = "${var.time_partitioning}"
schema_file = "${var.schema_file}"
dataset_labels = "${var.dataset_labels }"
table_labels = "${var.table_labels}"
}
14 changes: 7 additions & 7 deletions test/fixtures/full/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,31 +15,31 @@
*/

output "dataset_id" {
value = "${module.bigquery.dataset_id}"
value = "${module.example.dataset_id}"
description = "Unique id for the dataset being provisioned"
}

output "dataset_name" {
value = "${module.bigquery.dataset_name}"
value = "${module.example.dataset_name}"
description = "Friendly name for the dataset being provisioned"
}

output "dataset_project" {
value = "${module.bigquery.dataset_project}"
value = "${module.example.dataset_project}"
description = "Project wheree the dataset and table are created"
}

output "table_id" {
value = "${module.bigquery.table_id}"
value = "${module.example.table_id}"
description = "Unique id for the table being provisioned"
}

output "dataset_labels" {
value = "${module.bigquery.dataset_labels}"
value = "${module.example.dataset_labels}"
description = "Key value pairs in a map for dataset labels"
}

output "table_labels" {
value = "${module.bigquery.table_labels}"
value = "${module.example.table_labels}"
description = "Key value pairs in a map for table labels"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
dataset_id = "bar"
dataset_name = "foo"
location = "US"
description = "some description"
expiration = 3600000
project_id = "example-project"
table_id = "bar"
project_id = "scrum-team-coolkids-shared"
time_partitioning = "DAY"
schema_file = "sample_bq_schema.json"
dataset_labels = {
env = "dev"
billable = "true"
Expand Down
26 changes: 1 addition & 25 deletions test/fixtures/full/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,18 +14,6 @@
* limitations under the License.
*/

variable "dataset_id" {
description = "Unique ID for the dataset being provisioned"
}

variable "dataset_name" {
description = "Friendly name for the dataset being provisioned"
}

variable "description" {
description = "Dataset description"
}

variable "expiration" {
description = "TTL of tables using the dataset in MS"
}
Expand All @@ -34,22 +22,10 @@ variable "project_id" {
description = "Project wheree the dataset and table are created"
}

variable "table_id" {
description = "Unique ID for the table being provisioned"
}

variable "location" {
description = "The regional location for the dataset only US and EU are allowed in module"
}

variable "time_partitioning" {
description = "Configures time-based partitioning for this table"
}

variable "schema_file" {
description = "A JSON schema for the table"
}

variable "dataset_labels" {
description = "Key value pairs in a map for dataset labels"
type = "map"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/controls/big_query.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/make.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 719a8be

Please sign in to comment.