Skip to content

Commit 2e40790

Browse files
fix sweepers for resources with overridden names (#14756) (#10492)
[upstream:3497e67827984001f69943b4cd9938ea4fcd326a] Signed-off-by: Modular Magician <[email protected]>
1 parent b73e68d commit 2e40790

File tree

33 files changed

+66
-66
lines changed

33 files changed

+66
-66
lines changed

google-beta/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange_subscription_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ func listAndActionBigqueryAnalyticsHubDataExchangeSubscription(action sweeper.Re
140140
}
141141

142142
// First try the expected resource key
143-
resourceList, ok := res["dataExchangeSubscriptions"]
143+
resourceList, ok := res["subscriptions"]
144144
if ok {
145-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'dataExchangeSubscriptions'")
145+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'subscriptions'")
146146
} else {
147147
// Next, try the common "items" pattern
148148
resourceList, ok = res["items"]

google-beta/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ func listAndActionBigqueryAnalyticsHubListingSubscription(action sweeper.Resourc
140140
}
141141

142142
// First try the expected resource key
143-
resourceList, ok := res["listingSubscriptions"]
143+
resourceList, ok := res["subscriptions"]
144144
if ok {
145-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'listingSubscriptions'")
145+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'subscriptions'")
146146
} else {
147147
// Next, try the common "items" pattern
148148
resourceList, ok = res["items"]

google-beta/services/cloudbuild/resource_cloudbuild_trigger_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionCloudBuildTrigger(action sweeper.ResourceAction) error {
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["triggers"]
145+
resourceList, ok := res["buildTriggers"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'triggers'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'buildTriggers'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/colab/resource_colab_notebook_execution_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionColabNotebookExecution(action sweeper.ResourceAction) error {
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["notebookExecutions"]
145+
resourceList, ok := res["notebookExecutionJobs"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'notebookExecutions'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'notebookExecutionJobs'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/colab/resource_colab_runtime_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionColabRuntime(action sweeper.ResourceAction) error {
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["runtimes"]
145+
resourceList, ok := res["notebookRuntimes"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'runtimes'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'notebookRuntimes'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/colab/resource_colab_runtime_template_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionColabRuntimeTemplate(action sweeper.ResourceAction) error {
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["runtimeTemplates"]
145+
resourceList, ok := res["notebookRuntimeTemplates"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'runtimeTemplates'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'notebookRuntimeTemplates'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/compute/resource_compute_network_firewall_policy_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionComputeNetworkFirewallPolicy(action sweeper.ResourceAction) er
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["networkFirewallPolicies"]
145+
resourceList, ok := res["firewallPolicies"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'networkFirewallPolicies'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'firewallPolicies'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/compute/resource_compute_network_firewall_policy_with_rules_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionComputeNetworkFirewallPolicyWithRules(action sweeper.ResourceA
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["networkFirewallPolicyWithRules"]
145+
resourceList, ok := res["firewallPolicies"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'networkFirewallPolicyWithRules'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'firewallPolicies'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/compute/resource_compute_region_network_firewall_policy_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func listAndActionComputeRegionNetworkFirewallPolicy(action sweeper.ResourceActi
142142
}
143143

144144
// First try the expected resource key
145-
resourceList, ok := res["regionNetworkFirewallPolicies"]
145+
resourceList, ok := res["firewallPolicies"]
146146
if ok {
147-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'regionNetworkFirewallPolicies'")
147+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'firewallPolicies'")
148148
} else {
149149
// Next, try the common "items" pattern
150150
resourceList, ok = res["items"]

google-beta/services/compute/resource_compute_region_network_firewall_policy_with_rules_sweeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ func listAndActionComputeRegionNetworkFirewallPolicyWithRules(action sweeper.Res
140140
}
141141

142142
// First try the expected resource key
143-
resourceList, ok := res["regionNetworkFirewallPolicyWithRules"]
143+
resourceList, ok := res["firewallPolicies"]
144144
if ok {
145-
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'regionNetworkFirewallPolicyWithRules'")
145+
log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'firewallPolicies'")
146146
} else {
147147
// Next, try the common "items" pattern
148148
resourceList, ok = res["items"]

0 commit comments

Comments
 (0)