The way we were testing Terraform had the downside of creating infrastructure. While this is useful for verifying that it is actually working, it leads to spamming the production environment.
To run these tests automatically on PRs, we will use Go-VCR to record API interactions and replay them. Although this does not guarantee 100% that the code is working, it at least ensures that if nothing has changed in the API, your code won’t break existing functionality.
Description of Task to be completed?
Configure Go-VCR to record terraform provider interactions with the API
Save the tapes and remove any sensitive information
What does this PR do?
The way we were testing Terraform had the downside of creating infrastructure. While this is useful for verifying that it is actually working, it leads to spamming the production environment.
To run these tests automatically on PRs, we will use Go-VCR to record API interactions and replay them. Although this does not guarantee 100% that the code is working, it at least ensures that if nothing has changed in the API, your code won’t break existing functionality.
Description of Task to be completed?
How should this be manually tested?
You can run the recorded tests locally with:
The data used in these variables is either fake or from resources that were created solely for recording the interaction and then promptly deleted.
Any background context you want to provide?
What are the relevant GitHub issues (if any)?
Screenshots (if appropriate):
Questions: