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

using terratest in existing infrastructure in staging or production #1373

Open
imtiaz2564 opened this issue Nov 16, 2023 · 1 comment
Open

Comments

@imtiaz2564
Copy link

imtiaz2564 commented Nov 16, 2023

Can terratest be used in existing infrastructure in staging or production ?
If yes, should we use InitAndApply and Destroy function ?
Because,
InitAndApply, Initialize and Apply Terraform Configurations what already exists
Destroy, delete the resources.

Should we only use when there are some changes?

@skyzyx
Copy link

skyzyx commented Dec 18, 2023

You should not use it with either.

Well-designed Terraform code is modular, fully-automated, and should empower the creation of ephemeral environments that can be easily created/destroyed.

Terratest can help you validate that your Terraform code does what you think it does — just like automated testing in software development — by running independently of any of your existing environments. Maybe run them from a PR/branch instead of your default branch which should represent what you have deployed to live environments.

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

No branches or pull requests

2 participants