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

Skip heroku_review_app_config.deploy_target.id region lookup for space #368

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

ryanbrainard
Copy link
Contributor

The current code assumes that the heroku_review_app_config.deploy_target is of type region and tries to resolve it to a name, but in the case of a deploy target that is a space, it should remain as the id, 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 to heroku_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.

The current code assumes that the heroku_review_app_config.deploy_target is a region and tries to resolve it to a name, but in the case of a deploy target that is a Private Space, it should remain as the id, as space names would violate the schema and cause breaking changes. This skips the name look up if the type is space.
Copy link
Member

@mars mars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @ryanbrainard 👍 Thank you for filling this gap in functionality, so that terraformed Review App Config works for Review Apps in Private Spaces.

@mars mars merged commit 3a83337 into master Apr 11, 2023
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