Skip to content

Commit

Permalink
Add Dataplex Zone resource (#6075)
Browse files Browse the repository at this point in the history
* Add Dataplex Zone resource

* Fix zone name

* Update DCL to 1.10.2

* run make upgrade-dcl

* Update DCL to v1.15.1

* run make upgrade
  • Loading branch information
saurabh-net authored Jul 20, 2022
1 parent 645bb6a commit bf437c4
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-google<%= "-" + version unless ve

require (
cloud.google.com/go/bigtable v1.13.0
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1
github.com/apparentlymart/go-cidr v1.1.0
github.com/client9/misspell v0.3.4
github.com/davecgh/go-spew v1.1.1
Expand Down
6 changes: 4 additions & 2 deletions mmv1/third_party/terraform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1516,5 +1516,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4 h1:CxVWVPoWru9OCIUYJRUgH7jNWaZZlKBy8RdG8qbn1vU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1 h1:ex2UFZoVSbfsHK0zDsilMpXXs1vBDwi2wk1Fxd5N3D0=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1 h1:ex2UFZoVSbfsHK0zDsilMpXXs1vBDwi2wk1Fxd5N3D0=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
1 change: 1 addition & 0 deletions mmv1/third_party/terraform/utils/provider.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ end # products.each do
"google_container_azure_cluster": resourceContainerAzureCluster(),
"google_container_azure_node_pool": resourceContainerAzureNodePool(),
"google_dataplex_lake": resourceDataplexLake(),
"google_dataplex_zone": resourceDataplexZone(),
"google_dataproc_workflow_template": resourceDataprocWorkflowTemplate(),
"google_eventarc_trigger": resourceEventarcTrigger(),
"google_firebaserules_release": resourceFirebaserulesRelease(),
Expand Down
15 changes: 15 additions & 0 deletions tpgtools/api/dataplex/samples/basic.zone.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "{{zone}}",
"displayName": "Zone for DCL",
"location": "{{region}}",
"project": "{{project}}",
"lake": "{{ref:basic.lake.json:name}}",
"description": "Zone for DCL",
"type": "RAW",
"discoverySpec": {
"enabled": false
},
"resourceSpec": {
"locationType": "MULTI_REGION"
}
}
34 changes: 34 additions & 0 deletions tpgtools/api/dataplex/samples/basic_zone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2022 Google LLC. All Rights Reserved.
#
# 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.
name: basic_zone
description: A basic example of a dataplex zone
type: zone
versions:
- ga
resource: samples/basic.zone.json
dependencies:
- samples/basic.lake.json
updates:
- resource: samples/update.zone.json
dependencies:
- samples/basic.lake.json
variables:
- name: lake
type: resource_name
- name: project
type: project
- name: region
type: region
- name: zone
type: resource_name
18 changes: 18 additions & 0 deletions tpgtools/api/dataplex/samples/update.zone.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "{{zone}}",
"displayName": "Zone for DCL",
"location": "{{region}}",
"project": "{{project}}",
"lake": "{{ref:basic.lake.json:name}}",
"labels": {
"updated_label": "exists"
},
"description": "Zone for DCL Updated",
"type": "RAW",
"discoverySpec": {
"enabled": false
},
"resourceSpec": {
"locationType": "MULTI_REGION"
}
}
2 changes: 1 addition & 1 deletion tpgtools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
bitbucket.org/creachadair/stringset v0.0.9
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/hcl v1.0.0
Expand Down
4 changes: 2 additions & 2 deletions tpgtools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4 h1:CxVWVPoWru9OCIUYJRUgH7jNWaZZlKBy8RdG8qbn1vU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.14.4/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1 h1:ex2UFZoVSbfsHK0zDsilMpXXs1vBDwi2wk1Fxd5N3D0=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down
Empty file.
Empty file.
Empty file.

0 comments on commit bf437c4

Please sign in to comment.