From 98e1adbacb265d6fa0bb331194923e8571a66867 Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Tue, 25 Jun 2019 11:22:48 -0700 Subject: [PATCH 1/2] Remove internal fields from monitoring uptime check --- products/monitoring/api.yaml | 35 ------------ products/monitoring/terraform.yaml | 1 + ...toring_uptime_check_config_internal.go.erb | 55 +++++++++++++++++++ 3 files changed, 56 insertions(+), 35 deletions(-) create mode 100644 templates/terraform/extra_schema_entry/monitoring_uptime_check_config_internal.go.erb diff --git a/products/monitoring/api.yaml b/products/monitoring/api.yaml index e12ffd571dc0..6b5623ca70e2 100644 --- a/products/monitoring/api.yaml +++ b/products/monitoring/api.yaml @@ -941,41 +941,6 @@ objects: message is returned. Not specifying this field will result in uptime checks running from all regions. item_type: Api::Type::String - - !ruby/object:Api::Type::Boolean - name: isInternal - description: If this is true, then checks are made only from the 'internal_checkers'. - If it is false, then checks are made only from the 'selected_regions'. It is - an error to provide 'selected_regions' when is_internal is true, or to provide - 'internal_checkers' when is_internal is false. - - !ruby/object:Api::Type::Array - name: internalCheckers - description: The internal checkers that this check will egress from. If is_internal - is true and this list is empty, the check will egress from all the InternalCheckers - configured for the project that owns this CheckConfig. - item_type: !ruby/object:Api::Type::NestedObject - properties: - - !ruby/object:Api::Type::String - name: gcpZone - description: The GCP zone the uptime check should egress from. Only respected - for internal uptime checks, where internal_network is specified. - - !ruby/object:Api::Type::String - name: peerProjectId - description: The GCP project_id where the internal checker lives. Not necessary - the same as the workspace project. - - !ruby/object:Api::Type::String - name: name - description: A unique resource name for this InternalChecker. The format is projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]. - PROJECT_ID is the stackdriver workspace project for the uptime check config associated - with the internal checker. - - !ruby/object:Api::Type::String - name: network - description: 'The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) - where the internal resource lives (ex: "default").' - - !ruby/object:Api::Type::String - name: displayName - description: The checker's human-readable name. The display name should be - unique within a Stackdriver Workspace in order to make it easier to identify; - however, uniqueness is not enforced. - !ruby/object:Api::Type::NestedObject name: httpCheck description: Contains information needed to make an HTTP or HTTPS check. diff --git a/products/monitoring/terraform.yaml b/products/monitoring/terraform.yaml index c6f8615f199c..5897d59ba970 100644 --- a/products/monitoring/terraform.yaml +++ b/products/monitoring/terraform.yaml @@ -99,6 +99,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides group_display_name: "uptime-check-group" custom_code: !ruby/object:Provider::Terraform::CustomCode custom_import: templates/terraform/custom_import/self_link_as_name.erb + extra_schema_entry: 'templates/terraform/extra_schema_entry/monitoring_uptime_check_config_internal.go.erb' post_create: templates/terraform/post_create/set_computed_name.erb properties: id: !ruby/object:Overrides::Terraform::PropertyOverride diff --git a/templates/terraform/extra_schema_entry/monitoring_uptime_check_config_internal.go.erb b/templates/terraform/extra_schema_entry/monitoring_uptime_check_config_internal.go.erb new file mode 100644 index 000000000000..bf9b2f82a26d --- /dev/null +++ b/templates/terraform/extra_schema_entry/monitoring_uptime_check_config_internal.go.erb @@ -0,0 +1,55 @@ +<%# The license inside this block applies to this file. + # Copyright 2019 Google Inc. + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. +-%> +"is_internal": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", +}, +"internal_checkers": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "display_name": { + Type: schema.TypeString, + Optional: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + }, + "gcp_zone": { + Type: schema.TypeString, + Optional: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + }, + "name": { + Type: schema.TypeString, + Optional: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + }, + "network": { + Type: schema.TypeString, + Optional: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + }, + "peer_project_id": { + Type: schema.TypeString, + Optional: true, + Deprecated: "This field never worked, and will be removed in 3.0.0.", + }, + }, + }, +}, From e212e1ba38b53a4500ec23ed0ff6a7710e860a9b Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 25 Jun 2019 21:26:24 +0000 Subject: [PATCH 2/2] Update tracked submodules -> HEAD on Tue Jun 25 21:26:24 UTC 2019 Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec. --- build/terraform | 2 +- build/terraform-beta | 2 +- build/terraform-mapper | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/terraform b/build/terraform index bbd8825ea4b5..292f8ea81778 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit bbd8825ea4b59d26b9df355533cacc1e6b405a02 +Subproject commit 292f8ea817785fe533b3d739b2ee1f467e451b4c diff --git a/build/terraform-beta b/build/terraform-beta index 38058bb2b8b1..35c22575cbc7 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 38058bb2b8b1fcd9a24e640ebecbe4815b38ce3d +Subproject commit 35c22575cbc7bb96bd5a9174e7c76c5963e8dc8c diff --git a/build/terraform-mapper b/build/terraform-mapper index 1eea3d76b227..b600106a3192 160000 --- a/build/terraform-mapper +++ b/build/terraform-mapper @@ -1 +1 @@ -Subproject commit 1eea3d76b2276d3d5c9d3f590464071a84a220e2 +Subproject commit b600106a3192a5bbcde147b2700c973ad2d5c63f