Skip to content

Commit

Permalink
fix: Revert attribution fix (#845)
Browse files Browse the repository at this point in the history
* revert: Fix attribution for safer cluster modules (#830)

* update to 14.0

* temporarily test with 0.14x tf image in ci

* bump setup pf versions

* bump setup provider

* fix setup pf

* kitchen fix for 0.14

* bump networking

* bump iap example

* switch back to 0.13 tests

* fmt
  • Loading branch information
bharathkkb committed Mar 12, 2021
1 parent 25cf367 commit c398144
Show file tree
Hide file tree
Showing 39 changed files with 36 additions and 164 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |
Expand Down
6 changes: 0 additions & 6 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,3 @@ variable "enable_tpu" {
default = false
}
{% endif %}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
8 changes: 2 additions & 6 deletions autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
{% set module_path_str = module_path|string %}
{% set module_registry_name = module_path_str.split('/')[-1] %}

locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -36,7 +32,7 @@ terraform {
}
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
}
{% else %}
required_providers {
Expand All @@ -50,7 +46,7 @@ terraform {
}
}
provider_meta "google" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
}
{% endif %}
}
2 changes: 0 additions & 2 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,4 @@ module "gke" {
gce_pd_csi_driver = var.gce_pd_csi_driver

notification_config_topic = var.notification_config_topic

_parent_module = local.blueprint_name
}
6 changes: 0 additions & 6 deletions autogen/safer-cluster/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,3 @@ variable "notification_config_topic" {
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
default = ""
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions autogen/safer-cluster/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
{% set module_path_str = module_path|string %}
{% set module_registry_name = module_path_str.split('/')[-1] %}

locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/private_zonal_with_networking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ provider "kubernetes" {

module "gcp-network" {
source = "terraform-google-modules/network/google"
version = "~> 2.5"
version = "~> 3.1"
project_id = var.project_id
network_name = var.network

Expand Down
2 changes: 1 addition & 1 deletion examples/safer_cluster_iap_bastion/bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "template_file" "startup_script" {

module "bastion" {
source = "terraform-google-modules/bastion-host/google"
version = "~> 2.0"
version = "~> 3.0"
network = module.vpc.network_self_link
subnet = module.vpc.subnets_self_links[0]
project = module.enabled_google_apis.project_id
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_regional_with_networking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 3.42.0"
version = "~> 3.45.0"
}

data "google_client_config" "default" {}
Expand All @@ -29,7 +29,7 @@ provider "kubernetes" {

module "gcp-network" {
source = "terraform-google-modules/network/google"
version = "~> 2.5"
version = "~> 3.1"
project_id = var.project_id
network_name = var.network

Expand Down
1 change: 0 additions & 1 deletion modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,3 @@ variable "enable_tpu" {
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
default = false
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-private-cluster-update-variant/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-private-cluster-update-variant/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,3 @@ variable "enable_tpu" {
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
default = false
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/beta-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-private-cluster/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-private-cluster/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,3 @@ variable "enable_tpu" {
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
default = false
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/beta-public-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-public-cluster-update-variant/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-public-cluster-update-variant/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,3 @@ variable "enable_tpu" {
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
default = false
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/beta-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-public-cluster/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-public-cluster/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,3 @@ variable "impersonate_service_account" {
default = ""
}


variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:private-cluster-update-variant/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:private-cluster-update-variant/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |
Expand Down
6 changes: 0 additions & 6 deletions modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,3 @@ variable "impersonate_service_account" {
default = ""
}


variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:private-cluster/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

Expand All @@ -33,6 +29,6 @@ terraform {
}
}
provider_meta "google" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:private-cluster/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/safer-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ For simplicity, we suggest using `roles/container.admin` and

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
| cloudrun | (Beta) Enable CloudRun addon | `bool` | `false` | no |
Expand Down
2 changes: 0 additions & 2 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,4 @@ module "gke" {
gce_pd_csi_driver = var.gce_pd_csi_driver

notification_config_topic = var.notification_config_topic

_parent_module = local.blueprint_name
}
6 changes: 0 additions & 6 deletions modules/safer-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,3 @@ variable "notification_config_topic" {
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
default = ""
}

variable "_parent_module" {
type = string
description = "(Internal) Parent module which should be referenced in API calls."
default = ""
}
6 changes: 1 addition & 5 deletions modules/safer-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
// This file was automatically generated from a template in ./autogen/safer-cluster


locals {
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:safer-cluster-update-variant/v14.0.0"]))
}

terraform {
required_version = ">=0.13"

provider_meta "google-beta" {
module_name = "blueprints/terraform/${local.blueprint_name}"
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:safer-cluster-update-variant/v14.0.0"
}
}
1 change: 0 additions & 1 deletion modules/safer-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ For simplicity, we suggest using `roles/container.admin` and

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | `string` | `null` | no |
| cloudrun | (Beta) Enable CloudRun addon | `bool` | `false` | no |
Expand Down
2 changes: 0 additions & 2 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,4 @@ module "gke" {
gce_pd_csi_driver = var.gce_pd_csi_driver

notification_config_topic = var.notification_config_topic

_parent_module = local.blueprint_name
}
Loading

0 comments on commit c398144

Please sign in to comment.