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

fix(warehouse|bigquery): read operation - inconsistent data collector #29

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

ndopj
Copy link
Contributor

@ndopj ndopj commented Oct 4, 2023

While it is not possible now, it might be possible in the future that Data Collector for already existing BigQuery warehouse resource will change externally in the Monte Carlo (for example if Monte Carlo releases such functionality).

To prevent issue possibly occurring from such action read operation of montecarlo_bigquery_warehouse was fixed to also check whether the Data Collector UUID obtained from the API response for read operations is the same as the one provided in the Terraform configuration associated with that resource.

If there is inconsistency found in the Data Collector UUID, read operation will fail with an error preventing any other issues which might happen during resource updates.

If such error would occurs, users will be asked by the error in the Terraform output to change configuration of that resource so it matches the current Data Collector UUID where the warehouse is deployed. This will force the resource to be updated and if the supplied Data Collector UUID is correct the update operation will be successful as well as any other subsequent read operations.

Example of the error users will obtain:

Error: Obtained BigQuery warehouse with [uuid: 8bfc4] but its Data Collector UUID does not match with configured value [obtained: eee72529, configured: 5502b1a4]. BigQuery warehouse might have been moved to other Data Collector externally
        
          with montecarlo_bigquery_warehouse.test,
          on terraform_plugin_test.tf line 9, in resource "montecarlo_bigquery_warehouse" "test":
           9: resource "montecarlo_bigquery_warehouse" "test" {
        
Since its not possible for this provider to update Data Collector of BigQuery 
warehouse, this resource cannot continue to function properly. It is 
recommended to change Data Collector UUID for this resource directly in the 
Terraform configuration

@ndopj ndopj added the bug Something isn't working label Oct 4, 2023
@ndopj ndopj self-assigned this Oct 4, 2023
@ndopj ndopj force-pushed the ndopj/data-intel-data-platform-streaming branch from 358829d to 2c238ff Compare October 4, 2023 08:45
@ndopj ndopj force-pushed the ndopj/data-intel-data-platform-streaming branch from 65a469c to 4ed06ce Compare October 4, 2023 09:20
@ndopj ndopj merged commit e27f656 into master Oct 4, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant