Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dataplex Asset resource #6310

Merged
merged 17 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.15.1
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.16.0
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
4 changes: 4 additions & 0 deletions mmv1/third_party/terraform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1520,3 +1520,7 @@ github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.1 h1:ex
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=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.2 h1:FWEE9Fk1bC4oE4O1jvI7gskksmpUh/vpX9J+GPP/WhA=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.15.2/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.16.0 h1:+zbrl0sUHK+oav4Nhru21AjJLPwnmQCL01oZYzYiPac=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.16.0/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8=
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.15.1
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.16.0
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.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.16.0 h1:+zbrl0sUHK+oav4Nhru21AjJLPwnmQCL01oZYzYiPac=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.16.0/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.
60 changes: 60 additions & 0 deletions tpgtools/overrides/dataplex/samples/asset/basic_asset.tf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
resource "google_storage_bucket" "basic_bucket" {
name = "dataplex-bucket-%{random_suffix}"
location = "{{region}}"
uniform_bucket_level_access = true
lifecycle {
ignore_changes = [
labels
]
}

project = "{{project}}"
}

resource "google_dataplex_lake" "basic_lake" {
name = "{{lake}}"
location = "{{region}}"
project = "{{project}}"
}


resource "google_dataplex_zone" "basic_zone" {
name = "{{zone}}"
location = "{{region}}"
lake = google_dataplex_lake.basic_lake.name
type = "RAW"

discovery_spec {
enabled = false
}


resource_spec {
location_type = "SINGLE_REGION"
}

project = "{{project}}"
}


resource "google_dataplex_asset" "primary" {
name = "{{asset}}"
location = "{{region}}"

lake = google_dataplex_lake.basic_lake.name
dataplex_zone = google_dataplex_zone.basic_zone.name

discovery_spec {
enabled = false
}

resource_spec {
name = "projects/{{project}}/buckets/dataplex-bucket-%{random_suffix}"
type = "STORAGE_BUCKET"
}

project = "{{project}}"
depends_on = [
google_storage_bucket.basic_bucket
]
}
16 changes: 16 additions & 0 deletions tpgtools/overrides/dataplex/samples/asset/basic_asset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# optional test level config -- needed for updates basic.tf.tmpl def
updates:
- resource: ./basic_asset.tf.tmpl
variables:
- name: lake
type: resource_name
- name: zone
type: resource_name
- name: asset
type: resource_name
- name: bucket
type: resource_name
- name: project
type: project
- name: region
type: region
2 changes: 2 additions & 0 deletions tpgtools/overrides/dataplex/samples/asset/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore_read:
- "resource_spec.0.name"