Skip to content

Commit e68212c

Browse files
Upgrade DCL to 1.78 (#13293) (#9553)
[upstream:cba18c5d3610138025ca40b7f03e4d28b4bd2eb4] Signed-off-by: Modular Magician <[email protected]>
1 parent f032e80 commit e68212c

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
lines changed

.changelog/13293.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
clouddeploy: added `dns_endpoint` field to to `google_clouddeploy_target` resource
3+
```

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.0
44

55
require (
66
cloud.google.com/go/bigtable v1.33.0
7-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0
7+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.78.0
88
github.com/davecgh/go-spew v1.1.1
99
github.com/dnaeon/go-vcr v1.0.1
1010
github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ cloud.google.com/go/monitoring v1.21.2/go.mod h1:hS3pXvaG8KgWTSz+dAdyzPrGUYmi2Q+
2222
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
2323
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
2424
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
25-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0 h1:fCJw7h8lc8oVQAhoMABdsWAGWF8E6+4A5HvDHe5OsVM=
26-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
2725
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
2826
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
2927
github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk=
@@ -447,3 +445,5 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
447445
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
448446
rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
449447
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
448+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.78.0 h1:Mg4zefS6cVY5JEqrsjaWAcS2uUkkB7ttr5zJ3wERUek=
449+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.78.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=

google-beta/services/clouddeploy/resource_clouddeploy_target.go

+14-6
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ func ClouddeployTargetGkeSchema() *schema.Resource {
373373
Description: "Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.",
374374
},
375375

376+
"dns_endpoint": {
377+
Type: schema.TypeBool,
378+
Optional: true,
379+
Description: "Optional. If set, the cluster will be accessed using the DNS endpoint. Note that both `dns_endpoint` and `internal_ip` cannot be set to true.",
380+
},
381+
376382
"internal_ip": {
377383
Type: schema.TypeBool,
378384
Optional: true,
@@ -1027,9 +1033,10 @@ func expandClouddeployTargetGke(o interface{}) *clouddeploy.TargetGke {
10271033
}
10281034
obj := objArr[0].(map[string]interface{})
10291035
return &clouddeploy.TargetGke{
1030-
Cluster: dcl.String(obj["cluster"].(string)),
1031-
InternalIP: dcl.Bool(obj["internal_ip"].(bool)),
1032-
ProxyUrl: dcl.String(obj["proxy_url"].(string)),
1036+
Cluster: dcl.String(obj["cluster"].(string)),
1037+
DnsEndpoint: dcl.Bool(obj["dns_endpoint"].(bool)),
1038+
InternalIP: dcl.Bool(obj["internal_ip"].(bool)),
1039+
ProxyUrl: dcl.String(obj["proxy_url"].(string)),
10331040
}
10341041
}
10351042

@@ -1038,9 +1045,10 @@ func flattenClouddeployTargetGke(obj *clouddeploy.TargetGke) interface{} {
10381045
return nil
10391046
}
10401047
transformed := map[string]interface{}{
1041-
"cluster": obj.Cluster,
1042-
"internal_ip": obj.InternalIP,
1043-
"proxy_url": obj.ProxyUrl,
1048+
"cluster": obj.Cluster,
1049+
"dns_endpoint": obj.DnsEndpoint,
1050+
"internal_ip": obj.InternalIP,
1051+
"proxy_url": obj.ProxyUrl,
10441052
}
10451053

10461054
return []interface{}{transformed}

google-beta/services/clouddeploy/resource_clouddeploy_target_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ resource "google_clouddeploy_target" "primary" {
518518
519519
gke {
520520
cluster = "projects/%{project_name}/locations/%{region}/clusters/example-cluster-name"
521+
dns_endpoint = true
521522
}
522523
523524
project = "%{project_name}"

website/docs/r/clouddeploy_target.html.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ The `gke` block supports:
284284
(Optional)
285285
Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
286286

287+
* `dns_endpoint` -
288+
(Optional)
289+
Optional. If set, the cluster will be accessed using the DNS endpoint. Note that both `dns_endpoint` and `internal_ip` cannot be set to true.
290+
287291
* `internal_ip` -
288292
(Optional)
289293
Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).

0 commit comments

Comments
 (0)