dikhan/terraform-provider-openapi

Deprecate legacy multi-region support on resource name level

dikhan opened this issue · 0 comments

Describe the bug

Deprecating legacy code is an important part of maintaining a project and keeping the code base clean. This issue is opened to deprecate the legacy support for multiregion on the resource name level added in the early days of the OpenAPI Terraform provider. During that time, when thinking of how the OpenAPI Terraform provider could support multi-region the decision was to add the region on the resource name which then behind the scenes would make the provider call the corresponding regional API accordingly. This did not play very well when using the OpenAPI Terraform provider inside Terraform modules since the resource names had attached the region; hence making it difficult to use the provider in modules.

As a result, the second iteration of multiregion support added the region on the provider configuration level. This meant that the user could specify the region as a property of the provider as needed and the resources that were using that configuration provider configuration (eg: using the provider alias) would result into the OpenAPI Terraform provider making the API call agains the specified region. This was the natural way to support multiregion as expected by Terraform and also played nicely when using the OpenAPI Terraform provider inside Terraform modules.

The legacy multiregion option has been supported in the source code for a while, but the expectation is for service providers using this OpenAPI Terraform provider to use the proper way to configure multi-region as described early and documented in the How to - Multi-region Configuration

Expected behaviour

All code related to the legacy functionality should be removed from the source code, documentation and tests/int tests.

Additional context

Add any other context about the problem here.

Checklist (for admin only)

Don't forget to go through the checklist to make sure the issue is created properly:

  • I have added a corresponding label (bug) to the issue (right side menu)
  • I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)