Skip to content

Commit ff44228

Browse files
Upgrade dcl version to v1.49.0 (#8706) (#15564)
Signed-off-by: Modular Magician <[email protected]>
1 parent 83b2cb8 commit ff44228

File tree

6 files changed

+68
-6
lines changed

6 files changed

+68
-6
lines changed

.changelog/8706.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```release-note:enhancement
2+
clouddeploy: promoted `multi_target` to GA in `google_clouddelploy_target`
3+
```
4+
```release-note:enhancement
5+
containeraws: made `config.labels` updatable in `google_container_aws_node_pool`
6+
```

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ go 1.19
33

44
require (
55
cloud.google.com/go/bigtable v1.19.0
6-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.48.0
6+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.49.0
77
github.com/apparentlymart/go-cidr v1.1.0
88
github.com/davecgh/go-spew v1.1.1
99
github.com/dnaeon/go-vcr v1.0.1

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHS
1717
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1818
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.48.0 h1:+1lMwM8ZN8IGqYnSn2qh3Kb0fBBf9SwB+7yPBtcpNsM=
1919
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.48.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
20+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.49.0 h1:XvQtlNIEx3wMIXa+eymDIqYO5gvjYoMsi3XF2fblKmM=
21+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.49.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
2022
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
2123
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
2224
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=

google/services/clouddeploy/resource_clouddeploy_target.go

+58-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func ResourceClouddeployTarget() *schema.Resource {
7979
Description: "Information specifying an Anthos Cluster.",
8080
MaxItems: 1,
8181
Elem: ClouddeployTargetAnthosClusterSchema(),
82-
ConflictsWith: []string{"gke", "run"},
82+
ConflictsWith: []string{"gke", "run", "multi_target"},
8383
},
8484

8585
"deploy_parameters": {
@@ -109,7 +109,7 @@ func ResourceClouddeployTarget() *schema.Resource {
109109
Description: "Information specifying a GKE Cluster.",
110110
MaxItems: 1,
111111
Elem: ClouddeployTargetGkeSchema(),
112-
ConflictsWith: []string{"anthos_cluster", "run"},
112+
ConflictsWith: []string{"anthos_cluster", "run", "multi_target"},
113113
},
114114

115115
"labels": {
@@ -119,6 +119,15 @@ func ResourceClouddeployTarget() *schema.Resource {
119119
Elem: &schema.Schema{Type: schema.TypeString},
120120
},
121121

122+
"multi_target": {
123+
Type: schema.TypeList,
124+
Optional: true,
125+
Description: "Information specifying a multiTarget.",
126+
MaxItems: 1,
127+
Elem: ClouddeployTargetMultiTargetSchema(),
128+
ConflictsWith: []string{"gke", "anthos_cluster", "run"},
129+
},
130+
122131
"project": {
123132
Type: schema.TypeString,
124133
Computed: true,
@@ -140,7 +149,7 @@ func ResourceClouddeployTarget() *schema.Resource {
140149
Description: "Information specifying a Cloud Run deployment target.",
141150
MaxItems: 1,
142151
Elem: ClouddeployTargetRunSchema(),
143-
ConflictsWith: []string{"gke", "anthos_cluster"},
152+
ConflictsWith: []string{"gke", "anthos_cluster", "multi_target"},
144153
},
145154

146155
"create_time": {
@@ -249,6 +258,19 @@ func ClouddeployTargetGkeSchema() *schema.Resource {
249258
}
250259
}
251260

261+
func ClouddeployTargetMultiTargetSchema() *schema.Resource {
262+
return &schema.Resource{
263+
Schema: map[string]*schema.Schema{
264+
"target_ids": {
265+
Type: schema.TypeList,
266+
Required: true,
267+
Description: "Required. The target_ids of this multiTarget.",
268+
Elem: &schema.Schema{Type: schema.TypeString},
269+
},
270+
},
271+
}
272+
}
273+
252274
func ClouddeployTargetRunSchema() *schema.Resource {
253275
return &schema.Resource{
254276
Schema: map[string]*schema.Schema{
@@ -278,6 +300,7 @@ func resourceClouddeployTargetCreate(d *schema.ResourceData, meta interface{}) e
278300
ExecutionConfigs: expandClouddeployTargetExecutionConfigsArray(d.Get("execution_configs")),
279301
Gke: expandClouddeployTargetGke(d.Get("gke")),
280302
Labels: tpgresource.CheckStringMap(d.Get("labels")),
303+
MultiTarget: expandClouddeployTargetMultiTarget(d.Get("multi_target")),
281304
Project: dcl.String(project),
282305
RequireApproval: dcl.Bool(d.Get("require_approval").(bool)),
283306
Run: expandClouddeployTargetRun(d.Get("run")),
@@ -337,6 +360,7 @@ func resourceClouddeployTargetRead(d *schema.ResourceData, meta interface{}) err
337360
ExecutionConfigs: expandClouddeployTargetExecutionConfigsArray(d.Get("execution_configs")),
338361
Gke: expandClouddeployTargetGke(d.Get("gke")),
339362
Labels: tpgresource.CheckStringMap(d.Get("labels")),
363+
MultiTarget: expandClouddeployTargetMultiTarget(d.Get("multi_target")),
340364
Project: dcl.String(project),
341365
RequireApproval: dcl.Bool(d.Get("require_approval").(bool)),
342366
Run: expandClouddeployTargetRun(d.Get("run")),
@@ -391,6 +415,9 @@ func resourceClouddeployTargetRead(d *schema.ResourceData, meta interface{}) err
391415
if err = d.Set("labels", res.Labels); err != nil {
392416
return fmt.Errorf("error setting labels in state: %s", err)
393417
}
418+
if err = d.Set("multi_target", flattenClouddeployTargetMultiTarget(res.MultiTarget)); err != nil {
419+
return fmt.Errorf("error setting multi_target in state: %s", err)
420+
}
394421
if err = d.Set("project", res.Project); err != nil {
395422
return fmt.Errorf("error setting project in state: %s", err)
396423
}
@@ -435,6 +462,7 @@ func resourceClouddeployTargetUpdate(d *schema.ResourceData, meta interface{}) e
435462
ExecutionConfigs: expandClouddeployTargetExecutionConfigsArray(d.Get("execution_configs")),
436463
Gke: expandClouddeployTargetGke(d.Get("gke")),
437464
Labels: tpgresource.CheckStringMap(d.Get("labels")),
465+
MultiTarget: expandClouddeployTargetMultiTarget(d.Get("multi_target")),
438466
Project: dcl.String(project),
439467
RequireApproval: dcl.Bool(d.Get("require_approval").(bool)),
440468
Run: expandClouddeployTargetRun(d.Get("run")),
@@ -489,6 +517,7 @@ func resourceClouddeployTargetDelete(d *schema.ResourceData, meta interface{}) e
489517
ExecutionConfigs: expandClouddeployTargetExecutionConfigsArray(d.Get("execution_configs")),
490518
Gke: expandClouddeployTargetGke(d.Get("gke")),
491519
Labels: tpgresource.CheckStringMap(d.Get("labels")),
520+
MultiTarget: expandClouddeployTargetMultiTarget(d.Get("multi_target")),
492521
Project: dcl.String(project),
493522
RequireApproval: dcl.Bool(d.Get("require_approval").(bool)),
494523
Run: expandClouddeployTargetRun(d.Get("run")),
@@ -657,6 +686,32 @@ func flattenClouddeployTargetGke(obj *clouddeploy.TargetGke) interface{} {
657686

658687
}
659688

689+
func expandClouddeployTargetMultiTarget(o interface{}) *clouddeploy.TargetMultiTarget {
690+
if o == nil {
691+
return clouddeploy.EmptyTargetMultiTarget
692+
}
693+
objArr := o.([]interface{})
694+
if len(objArr) == 0 || objArr[0] == nil {
695+
return clouddeploy.EmptyTargetMultiTarget
696+
}
697+
obj := objArr[0].(map[string]interface{})
698+
return &clouddeploy.TargetMultiTarget{
699+
TargetIds: tpgdclresource.ExpandStringArray(obj["target_ids"]),
700+
}
701+
}
702+
703+
func flattenClouddeployTargetMultiTarget(obj *clouddeploy.TargetMultiTarget) interface{} {
704+
if obj == nil || obj.Empty() {
705+
return nil
706+
}
707+
transformed := map[string]interface{}{
708+
"target_ids": obj.TargetIds,
709+
}
710+
711+
return []interface{}{transformed}
712+
713+
}
714+
660715
func expandClouddeployTargetRun(o interface{}) *clouddeploy.TargetRun {
661716
if o == nil {
662717
return clouddeploy.EmptyTargetRun

google/services/containeraws/resource_container_aws_node_pool.go

-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func ContainerAwsNodePoolConfigSchema() *schema.Resource {
221221
"labels": {
222222
Type: schema.TypeMap,
223223
Optional: true,
224-
ForceNew: true,
225224
Description: "Optional. The initial labels assigned to nodes of this node pool. An object containing a list of \"key\": value pairs. Example: { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.",
226225
Elem: &schema.Schema{Type: schema.TypeString},
227226
},

website/docs/r/clouddeploy_target.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The following arguments are supported:
178178

179179
* `multi_target` -
180180
(Optional)
181-
(Beta only) Information specifying a multiTarget.
181+
Information specifying a multiTarget.
182182

183183
* `project` -
184184
(Optional)

0 commit comments

Comments
 (0)