Skip to content

Commit

Permalink
provider: don't attempt to register unavailable RPs (hashicorp#24571)
Browse files Browse the repository at this point in the history
PR hashicorp#23380 addressed issue hashicorp#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 authored and rizkybiz committed Jan 26, 2024
1 parent 651c7df commit 6bbfe3d
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 6bbfe3d

Please sign in to comment.