fix(warehouse|bigquery): read operation - inconsistent data collector #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: