Skip heroku_review_app_config.deploy_target.id region lookup for space #368
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.
The current code assumes that the
heroku_review_app_config.deploy_target
is of typeregion
and tries to resolve it to a name, but in the case of a deploy target that is aspace
, it should remain as theid
, as space names would violate the schema and cause breaking changes. This skips the name look up if the type is space. Without this code change, Terraform updates toheroku_review_app_config
are made in Heroku but then fail to update the Terraform state.Note, I did not add tests to this because the current tests depend on a real pipeline in CI, which I'm not sure has spaces enabled and I don't have access to check or configure it. I have been able to manually test this however with my own pipeline.