Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDPCP-9511 Ability to set CDP Region #32

Merged
merged 1 commit into from
Jul 26, 2023
Merged

CDPCP-9511 Ability to set CDP Region #32

merged 1 commit into from
Jul 26, 2023

Conversation

enis
Copy link
Contributor

@enis enis commented Jul 18, 2023

CDP Control plane has multiple regions, but we lacked the ability to set the region to send the API requests to in the TF provider. We were defaulting to the us-west-1 region of the control plane.

With this change, I have added the cdp_region attribute to the provider configuration and support for the same in the cdp-sdk-go. Similar to CDP CLI and Java SDK, we support setting the region either from the provider, or from env variables or from the CDP config file. The changes to the docs hopefully make it clear for the end user to configure this.

I have also done some light cleanup to the tests, reformatted the tf code, regenerated docs and added error propogation for the config value getters (previous we were swallowing errors).

Testing done:

  • New and existing unit tests
  • Tested manually by setting the region to eu-1 in my local profile

CDP Control plane has multiple regions, but we lacked the ability to set the region to send the
API requests to in the TF provider. We were defaulting to the us-west-1 region of the control plane.

With this change, I have added the cdp_region attribute to the provider configuration and support
for the same in the cdp-sdk-go. Similar to CDP CLI and Java SDK, we support setting the region
either from the provider, or from env variables or from the CDP config file. The changes to the
docs hopefully make it clear for the end user to configure this.

I have also done some light cleanup to the tests and reformatted the tf code and regenerated docs.

Testing done:
 - New and existing unit tests
 - Tested manually by setting the region to eu-1 in my local profile
@enis enis requested a review from a team as a code owner July 18, 2023 23:30
@daszabo daszabo merged commit ff7a648 into main Jul 26, 2023
18 checks passed
@daszabo daszabo deleted the CDPCP-9511 branch July 26, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants