Skip to content

Commit

Permalink
provider: don't attempt to register unavailable RPs
Browse files Browse the repository at this point in the history
PR #23380 addressed issue #21785, but with that fix, when an unavailable
resource provider was found, it would still be added to the list of
providers to be registered, and then fail upon attempted registration.

This skips registration for providers which are neither registered nor
unregistered.

Co-Authored-By: Jeff Smith <toxicglados@gmail.com>
Co-Authored-By: Ryan Wozney <wozneyr@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 22, 2024
1 parent 299aa66 commit 39ede90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/resourceproviders/requiring_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func DetermineWhichRequiredResourceProvidersRequireRegistration(requiredResource
if _, isUnregistered := (*unregisteredResourceProviders)[providerName]; !isUnregistered {
// some RPs may not exist in some non-public clouds, so we'll log a warning here instead of raising an error
log.Printf("[WARN] The required Resource Provider %q wasn't returned from the Azure API", providerName)
continue
}

requiringRegistration = append(requiringRegistration, providerName)
Expand Down

0 comments on commit 39ede90

Please sign in to comment.