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

Configure required versions and providers #52

Merged
merged 5 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions examples/compute_instance/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ provider "google" {
version = "~> 2.7.0"
}

provider "google-beta" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
subnetwork = var.subnetwork
Expand All @@ -41,4 +34,3 @@ module "compute_instance" {
hostname = "instance-simple"
instance_template = module.instance_template.self_link
}

2 changes: 1 addition & 1 deletion examples/compute_instance/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
3 changes: 1 addition & 2 deletions examples/instance_template/additional_disks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ provider "google" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7"
version = "~> 2.7.0"
}

module "instance_template" {
Expand Down Expand Up @@ -49,4 +49,3 @@ module "instance_template" {
},
]
}

2 changes: 1 addition & 1 deletion examples/instance_template/additional_disks/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
14 changes: 6 additions & 8 deletions examples/instance_template/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* limitations under the License.
*/

provider "google" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

resource "google_compute_address" "ip_address" {
name = "external-ip"
Expand All @@ -26,13 +32,6 @@ locals {
}
}

provider "google" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
project_id = var.project_id
Expand All @@ -43,4 +42,3 @@ module "instance_template" {
labels = var.labels
access_config = [local.access_config]
}

2 changes: 1 addition & 1 deletion examples/instance_template/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion examples/mig/autoscaler/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion examples/mig/full/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion examples/mig/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion examples/mig_with_percent/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
8 changes: 0 additions & 8 deletions examples/umig/full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ provider "google" {
version = "~> 2.7.0"
}

provider "google-beta" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
name_prefix = "${var.hostname}-instance-template"
Expand Down Expand Up @@ -69,4 +62,3 @@ module "umig" {
instance_template = module.instance_template.self_link
named_ports = var.named_ports
}

2 changes: 1 addition & 1 deletion examples/umig/full/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
8 changes: 0 additions & 8 deletions examples/umig/named_ports/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ provider "google" {
version = "~> 2.7.0"
}

provider "google-beta" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
subnetwork = var.subnetwork
Expand All @@ -43,4 +36,3 @@ module "umig" {
instance_template = module.instance_template.self_link
named_ports = var.named_ports
}

2 changes: 1 addition & 1 deletion examples/umig/named_ports/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
8 changes: 0 additions & 8 deletions examples/umig/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ provider "google" {
version = "~> 2.7.0"
}

provider "google-beta" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
subnetwork = var.subnetwork
Expand All @@ -42,4 +35,3 @@ module "umig" {
hostname = "umig-simple"
instance_template = module.instance_template.self_link
}

2 changes: 1 addition & 1 deletion examples/umig/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
8 changes: 0 additions & 8 deletions examples/umig/static_ips/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ provider "google" {
version = "~> 2.7.0"
}

provider "google-beta" {
credentials = file(var.credentials_path)
project = var.project_id
region = var.region
version = "~> 2.7.0"
}

module "instance_template" {
source = "../../../modules/instance_template"
subnetwork = var.subnetwork
Expand All @@ -43,4 +36,3 @@ module "umig" {
instance_template = module.instance_template.self_link
static_ips = var.static_ips
}

2 changes: 1 addition & 1 deletion examples/umig/static_ips/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
5 changes: 4 additions & 1 deletion modules/compute_instance/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
required_providers {
google = "~> 2.7"
}
}
5 changes: 4 additions & 1 deletion modules/instance_template/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
required_providers {
google = "~> 2.7"
}
}
6 changes: 5 additions & 1 deletion modules/mig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
required_providers {
google = "~> 2.7"
google-beta = "~> 2.7"
}
}
6 changes: 5 additions & 1 deletion modules/mig_with_percent/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
required_providers {
google = "~> 2.7"
google-beta = "~> 2.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
5 changes: 4 additions & 1 deletion modules/umig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
required_providers {
google = "~> 2.7"
}
}
1 change: 0 additions & 1 deletion test/fixtures/compute_instance/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ module "instance_simple" {
num_instances = 4
service_account = var.service_account
}

2 changes: 1 addition & 1 deletion test/fixtures/compute_instance/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/instance_template/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/mig/autoscaler/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/mig/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/mig_with_percent/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
5 changes: 4 additions & 1 deletion test/fixtures/shared/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

provider "random" {
version = "~> 2.2"
}

resource "random_string" "suffix" {
length = 4
special = "false"
Expand All @@ -33,4 +37,3 @@ resource "google_compute_subnetwork" "main" {
ip_cidr_range = "10.128.0.0/20"
network = google_compute_network.main.self_link
}

2 changes: 1 addition & 1 deletion test/fixtures/umig/named_ports/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/umig/simple/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
2 changes: 1 addition & 1 deletion test/fixtures/umig/static_ips/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

terraform {
required_version = ">= 0.12"
required_version = "~> 0.12.6"
}
Loading