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

if google_compute_region_disk_resource_policy_attachment is empty, shouldn't error #2065

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
3 changes: 3 additions & 0 deletions .changelog/3499.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed error where plan would error if `google_compute_region_disk_resource_policy_attachment` had been deleted outside of terraform.
```
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,7 @@ func flattenNestedAccessContextManagerServicePerimeterResource(d *schema.Resourc

v, ok = res["resources"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_big_query_dataset_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,7 @@ func flattenNestedBigQueryDatasetAccess(d *schema.ResourceData, meta interface{}

v, ok = res["access"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ func flattenNestedComputeBackendBucketSignedUrlKey(d *schema.ResourceData, meta

v, ok = res["signedUrlKeyNames"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ func flattenNestedComputeBackendServiceSignedUrlKey(d *schema.ResourceData, meta

v, ok = res["signedUrlKeyNames"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ func flattenNestedComputeDiskResourcePolicyAttachment(d *schema.ResourceData, me

v, ok = res["resourcePolicies"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_global_network_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,7 @@ func flattenNestedComputeGlobalNetworkEndpoint(d *schema.ResourceData, meta inte

v, ok = res["items"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_instance_group_named_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ func flattenNestedComputeInstanceGroupNamedPort(d *schema.ResourceData, meta int

v, ok = res["namedPorts"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_network_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ func flattenNestedComputeNetworkEndpoint(d *schema.ResourceData, meta interface{

v, ok = res["items"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ func flattenNestedComputeNetworkPeeringRoutesConfig(d *schema.ResourceData, meta

v, ok = res["peerings"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_per_instance_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,7 @@ func flattenNestedComputePerInstanceConfig(d *schema.ResourceData, meta interfac

v, ok = res["items"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ func flattenNestedComputeRegionDiskResourcePolicyAttachment(d *schema.ResourceDa

v, ok = res["resourcePolicies"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_region_per_instance_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,7 @@ func flattenNestedComputeRegionPerInstanceConfig(d *schema.ResourceData, meta in

v, ok = res["items"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_router_bgp_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,7 @@ func flattenNestedComputeRouterBgpPeer(d *schema.ResourceData, meta interface{},

v, ok = res["bgpPeers"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_compute_router_nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,9 +999,7 @@ func flattenNestedComputeRouterNat(d *schema.ResourceData, meta interface{}, res

v, ok = res["nats"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_firebase_project_location.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ func flattenNestedFirebaseProjectLocation(d *schema.ResourceData, meta interface

v, ok = res["resources"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
4 changes: 1 addition & 3 deletions google-beta/resource_resource_manager_lien.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ func flattenNestedResourceManagerLien(d *schema.ResourceData, meta interface{},

v, ok = res["liens"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,7 @@ func flattenNestedServiceUsageConsumerQuotaOverride(d *schema.ResourceData, meta

v, ok = res["overrides"]
if !ok || v == nil {
// It's possible that there is only one of these resources and
// that res represents that resource.
v = res
return nil, nil
}

switch v.(type) {
Expand Down