Skip to content

Commit

Permalink
Merge branch 'master' into feat/add-resource-manager-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
g-awmalik authored Sep 20, 2023
2 parents f9add1c + 04fa8f6 commit db6c039
Show file tree
Hide file tree
Showing 19 changed files with 182 additions and 159 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.15
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.16
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
6 changes: 3 additions & 3 deletions autogen/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

locals {
healthchecks = concat(
google_compute_health_check.https.*.self_link,
google_compute_health_check.http.*.self_link,
google_compute_health_check.tcp.*.self_link,
google_compute_health_check.https[*].self_link,
google_compute_health_check.http[*].self_link,
google_compute_health_check.tcp[*].self_link,
)
distribution_policy_zones = coalescelist(var.distribution_policy_zones, data.google_compute_zones.available.names)
autoscaling_scale_in_enabled = var.autoscaling_scale_in_control.fixed_replicas != null || var.autoscaling_scale_in_control.percent_replicas != null
Expand Down
10 changes: 8 additions & 2 deletions autogen/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.48, < 5.0"
google-beta = ">= 4.48, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.48, < 5.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:{% if mig %}mig{% else %}mig_with_percent{% endif %}/v9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.15'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.15'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
2 changes: 1 addition & 1 deletion modules/compute_disk_snapshot/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ output "policy" {

output "attachments" {
description = "Disk attachments to the resource policy"
value = google_compute_disk_resource_policy_attachment.attachment.*
value = google_compute_disk_resource_policy_attachment.attachment[*]
}
10 changes: 8 additions & 2 deletions modules/compute_disk_snapshot/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.71, < 5.0"
null = ">= 2.1"
google = {
source = "hashicorp/google"
version = ">= 3.71, < 5.0"
}
null = {
source = "hashicorp/null"
version = ">= 2.1"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:compute_instance/v9.0.0"
Expand Down
5 changes: 2 additions & 3 deletions modules/compute_instance/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@

output "instances_self_links" {
description = "List of self-links for compute instances"
value = google_compute_instance_from_template.compute_instance.*.self_link
value = google_compute_instance_from_template.compute_instance[*].self_link
}

output "instances_details" {
description = "List of all details for compute instances"
sensitive = true
value = google_compute_instance_from_template.compute_instance.*
value = google_compute_instance_from_template.compute_instance[*]
}

output "available_zones" {
description = "List of available zones in region"
value = data.google_compute_zones.available.names
}

5 changes: 4 additions & 1 deletion modules/compute_instance/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.88, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 3.88, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:compute_instance/v9.0.0"
Expand Down
5 changes: 4 additions & 1 deletion modules/instance_template/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.67, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.67, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:instance_template/v9.0.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/mig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

locals {
healthchecks = concat(
google_compute_health_check.https.*.self_link,
google_compute_health_check.http.*.self_link,
google_compute_health_check.tcp.*.self_link,
google_compute_health_check.https[*].self_link,
google_compute_health_check.http[*].self_link,
google_compute_health_check.tcp[*].self_link,
)
distribution_policy_zones = coalescelist(var.distribution_policy_zones, data.google_compute_zones.available.names)
autoscaling_scale_in_enabled = var.autoscaling_scale_in_control.fixed_replicas != null || var.autoscaling_scale_in_control.percent_replicas != null
Expand Down
10 changes: 8 additions & 2 deletions modules/mig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.48, < 5.0"
google-beta = ">= 4.48, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.48, < 5.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:mig/v9.0.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/mig_with_percent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

locals {
healthchecks = concat(
google_compute_health_check.https.*.self_link,
google_compute_health_check.http.*.self_link,
google_compute_health_check.tcp.*.self_link,
google_compute_health_check.https[*].self_link,
google_compute_health_check.http[*].self_link,
google_compute_health_check.tcp[*].self_link,
)
distribution_policy_zones = coalescelist(var.distribution_policy_zones, data.google_compute_zones.available.names)
autoscaling_scale_in_enabled = var.autoscaling_scale_in_control.fixed_replicas != null || var.autoscaling_scale_in_control.percent_replicas != null
Expand Down
10 changes: 8 additions & 2 deletions modules/mig_with_percent/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.48, < 5.0"
google-beta = ">= 4.48, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.48, < 5.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:mig_with_percent/v9.0.0"
Expand Down
4 changes: 2 additions & 2 deletions modules/umig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ resource "google_compute_instance_group" "instance_group" {
project = var.project_id
zone = element(local.zones, count.index)
instances = matchkeys(
google_compute_instance_from_template.compute_instance.*.self_link,
google_compute_instance_from_template.compute_instance.*.zone,
google_compute_instance_from_template.compute_instance[*].self_link,
google_compute_instance_from_template.compute_instance[*].zone,
[local.zones[count.index]],
)

Expand Down
9 changes: 4 additions & 5 deletions modules/umig/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@

output "self_links" {
description = "List of self-links for unmanaged instance groups"
value = google_compute_instance_group.instance_group.*.self_link
value = google_compute_instance_group.instance_group[*].self_link
}

output "umig_details" {
description = "List of all details for unmanaged instance groups"
value = google_compute_instance_group.instance_group.*
value = google_compute_instance_group.instance_group[*]
}

output "instances_self_links" {
description = "List of self-links for compute instances"
value = google_compute_instance_from_template.compute_instance.*.self_link
value = google_compute_instance_from_template.compute_instance[*].self_link
}

output "instances_details" {
description = "List of all details for compute instances"
value = google_compute_instance_from_template.compute_instance.*
value = google_compute_instance_from_template.compute_instance[*]
}

output "available_zones" {
description = "List of available zones in region"
value = data.google_compute_zones.available.names
}

5 changes: 4 additions & 1 deletion modules/umig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.88, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 3.88, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:umig/v9.0.0"
Expand Down
75 changes: 38 additions & 37 deletions test/integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,78 @@ module github.com/terraform-google-modules/terraform-google-sql-db/test/integrat
go 1.20

require (
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.8.0
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.8.1
github.com/stretchr/testify v1.8.4
)

require (
cloud.google.com/go v0.110.2 // indirect
cloud.google.com/go/compute v1.19.3 // indirect
cloud.google.com/go v0.110.7 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.0.1 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/storage v1.33.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aws/aws-sdk-go v1.44.271 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aws/aws-sdk-go v1.45.5 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-errors/errors v1.5.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.9.1 // indirect
github.com/gruntwork-io/terratest v0.43.11 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gruntwork-io/terratest v0.43.13 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.1 // indirect
github.com/hashicorp/go-getter v1.7.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
github.com/hashicorp/terraform-json v0.16.0 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-zglob v0.0.4 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.2-0.20210821155943-2d9075ca8770 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tidwall/gjson v1.15.0 // indirect
github.com/tidwall/gjson v1.16.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tmccombs/hcl2json v0.5.0 // indirect
github.com/tmccombs/hcl2json v0.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.124.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/api v0.138.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.58.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.2 // indirect
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3 // indirect
)
Loading

0 comments on commit db6c039

Please sign in to comment.