gophercloud / utils

Apache License 2.0
20 stars 55 forks source link

terraform: add an ability to override endpoint service name #228

Closed kayrus closed 1 month ago

kayrus commented 1 month ago

Currently there is an ability to override endpoint URL to a static URL. However there is a case to override the endpoint service type to an alias, e.g. replace object-store with the object-store-beta. This change also must not depend on the original service type, e.g. if the catalog doesn't contain the object-store, we still need to replace it with the object-store-beta if possible.

There could be 3 scenarios:

There is no object-store service in the catalog, but there is object-store-beta service and we want to use it:

endpoint_overrides = {
  "object-store" = "object-store-beta"
}

There is object-store service in the catalog, but there is also object-store-beta service and we want to use it instead:

endpoint_overrides = {
  "object-store" = "object-store-beta"
}

There is neither object-store nor object-store-beta in the catalog, but we just want to override the service URL:

endpoint_overrides = {
  "object-store" = "http://localhost/v1/AUTH_679d134152e248118a3c34c4d4900add/"
}