Skip to content

Commit

Permalink
bug: Bump providers, update ASM script (#640)
Browse files Browse the repository at this point in the history
* pin asm example to prevent CI breaking

de dupe api in setup

fmt

bump all provider versions in examples to latest

bump all provider versions for networks

* enable debug logs

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* unpin commit version

* Test CI

Signed-off-by: bharathkkb <bharathkrishnakb@gmail.com>

* Test CI

* Test CI

* Test CI

* Test CI

* remove debug logs
  • Loading branch information
bharathkkb authored Sep 3, 2020
1 parent 7b9e538 commit 9d32d18
Show file tree
Hide file tree
Showing 36 changed files with 44 additions and 58 deletions.
2 changes: 1 addition & 1 deletion examples/deploy_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/disable_client_cert/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
credentials = file(var.credentials_path)
region = var.region
}
Expand Down
4 changes: 2 additions & 2 deletions examples/regional_private_node_pool_oauth_scopes/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
}
4 changes: 2 additions & 2 deletions examples/safer_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
}

module "gke" {
Expand Down
4 changes: 2 additions & 2 deletions examples/safer_cluster_iap_bastion/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

provider "google" {
version = "~> 3.32.0"
version = "~> 3.35.0"
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
}
2 changes: 1 addition & 1 deletion examples/shared_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
4 changes: 2 additions & 2 deletions examples/simple_regional_private_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_with_kubeconfig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion 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.16.0"
version = "~> 3.35.0"
}

module "gcp-network" {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_zonal_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_zonal_with_acm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_zonal_with_asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/stub_domains/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/stub_domains_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/stub_domains_upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/workload_identity/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/workload_metadata_config/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.32.0"
version = "~> 3.35.0"
region = var.region
}

Expand Down
8 changes: 6 additions & 2 deletions modules/asm/scripts/install_asm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ kpt cfg set asm-patch/ gcloud.core.project "${PROJECT_ID}"
kpt cfg set asm-patch/ gcloud.container.cluster "${CLUSTER_NAME}"
kpt cfg set asm-patch/ gcloud.compute.location "${CLUSTER_LOCATION}"
kpt cfg list-setters asm-patch/
pushd ${BASE_DIR} && kustomize create --autodetect --namespace "${PROJECT_ID}" && popd
pushd asm-patch && kustomize build -o ../${BASE_DIR}/all.yaml && popd
pushd ${BASE_DIR}
kustomize create --autodetect --namespace "${PROJECT_ID}"
popd
pushd asm-patch
kustomize build -o ../${BASE_DIR}/all.yaml
popd
# # skip validate as we should investigate if we can check this without having to resort to dind
# if [[ ${SKIP_ASM_VALIDATION} ]]; then
# echo "Skipping ASM validation..."
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/deploy_service/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[0]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/disable_client_cert/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[0]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/shared_vpc/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[0]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/simple_regional/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[0]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/simple_regional_with_kubeconfig/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[0]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/simple_zonal/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[1]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/simple_zonal_with_asm/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[2]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/stub_domains/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[1]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/stub_domains_upstream_nameservers/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[1]
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/upstream_nameservers/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
version = "~> 3.16.0"
version = "~> 3.35.0"
project = var.project_ids[1]
}

Expand Down
18 changes: 0 additions & 18 deletions test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@ module "gke-project-1" {
auto_create_network = true

activate_apis = [
"bigquery.googleapis.com",
"cloudkms.googleapis.com",
"cloudresourcemanager.googleapis.com",
"compute.googleapis.com",
"container.googleapis.com",
"containerregistry.googleapis.com",
"iam.googleapis.com",
"iamcredentials.googleapis.com",
"oslogin.googleapis.com",
"pubsub.googleapis.com",
"serviceusage.googleapis.com",
"storage-api.googleapis.com",
Expand All @@ -59,15 +53,9 @@ module "gke-project-2" {
skip_gcloud_download = true

activate_apis = [
"bigquery.googleapis.com",
"cloudkms.googleapis.com",
"cloudresourcemanager.googleapis.com",
"compute.googleapis.com",
"container.googleapis.com",
"containerregistry.googleapis.com",
"iam.googleapis.com",
"iamcredentials.googleapis.com",
"oslogin.googleapis.com",
"pubsub.googleapis.com",
"serviceusage.googleapis.com",
"storage-api.googleapis.com",
Expand All @@ -87,17 +75,11 @@ module "gke-project-asm" {
skip_gcloud_download = true

activate_apis = [
"container.googleapis.com",
"compute.googleapis.com",
"monitoring.googleapis.com",
"logging.googleapis.com",
"meshca.googleapis.com",
"meshtelemetry.googleapis.com",
"meshconfig.googleapis.com",
"iamcredentials.googleapis.com",
"anthos.googleapis.com",
"gkeconnect.googleapis.com",
"gkehub.googleapis.com",
"cloudresourcemanager.googleapis.com",
]
}

0 comments on commit 9d32d18

Please sign in to comment.