Skip to content

Commit

Permalink
Add post_read custom_code (#12703)
Browse files Browse the repository at this point in the history
[upstream:b8cc517211c1155d47e73fd83bdbbd692fcebc68]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician committed Jan 7, 2025
1 parent 6ab8e54 commit 438d5a4
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .changelog/12703.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ func resourceAccessContextManagerAccessLevelConditionListForPatch(d *schema.Reso
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["basic"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ func resourceAccessContextManagerEgressPolicyListForPatch(d *schema.ResourceData
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["status"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ func resourceAccessContextManagerIngressPolicyListForPatch(d *schema.ResourceDat
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["status"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ func resourceAccessContextManagerServicePerimeterDryRunEgressPolicyListForPatch(
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["spec"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,6 @@ func resourceAccessContextManagerServicePerimeterDryRunIngressPolicyListForPatch
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["spec"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ func resourceAccessContextManagerServicePerimeterDryRunResourceListForPatch(d *s
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["spec"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,6 @@ func resourceAccessContextManagerServicePerimeterEgressPolicyListForPatch(d *sch
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["status"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,6 @@ func resourceAccessContextManagerServicePerimeterIngressPolicyListForPatch(d *sc
if err != nil {
return nil, err
}

var v interface{}
var ok bool
if v, ok = res["status"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ func resourceAccessContextManagerServicePerimeterResourceRead(d *schema.Resource
if err != nil {
return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("AccessContextManagerServicePerimeterResource %q", d.Id()))
}
// post_read template for access_context_manager_service_perimeter_resource

// this is a placeholder for now but in the future we can use this to access
// the etag from the read response

res, err = flattenNestedAccessContextManagerServicePerimeterResource(d, meta, res)
if err != nil {
Expand Down Expand Up @@ -457,7 +461,10 @@ func resourceAccessContextManagerServicePerimeterResourceListForPatch(d *schema.
if err != nil {
return nil, err
}
// post_read template for access_context_manager_service_perimeter_resource

// this is a placeholder for now but in the future we can use this to access
// the etag from the read response
var v interface{}
var ok bool
if v, ok = res["status"]; ok && v != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,6 @@ func resourceBigQueryDatasetAccessListForPatch(d *schema.ResourceData, meta inte
if err != nil {
return nil, err
}

var v interface{}
var ok bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ func resourceComputeInstanceGroupNamedPortListForPatch(d *schema.ResourceData, m
if err != nil {
return nil, err
}

var v interface{}
var ok bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,6 @@ func resourceComputeRouterNatListForPatch(d *schema.ResourceData, meta interface
if err != nil {
return nil, err
}

var v interface{}
var ok bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,6 @@ func resourceComputeRouterNatAddressListForPatch(d *schema.ResourceData, meta in
if err != nil {
return nil, err
}

var v interface{}
var ok bool

Expand Down

0 comments on commit 438d5a4

Please sign in to comment.