If you just want to test stack manipulation this should be fairly simple, just use a transient local file state backend in your integration tests since you don't actually care about keeping that state. You can blow the state away after each run.
w
worried-lunch-10568
10/29/2021, 11:35 AM
I'm actually looking for a way to create a real infrastructure.
What I think of it for now:
• use automation scripts to provision real infrastructure
• write separate tests that will take stack outputs and will use Provider (AWS, Azure) API to check certain aspect of the infra (tags, network etc)
b
bored-oyster-3147
10/29/2021, 5:53 PM
The way I planned on handling this previously:
• create a local filestate pulumi backend that I don't care about keeping around after tests finish
• provision real infrastructure into a sandbox AWS account
• run tests / integration tests against real infrastructure
• make best-effort to tear down real infrastructure when tests finish
• blow away local pulumi filestate backend
• have a separate scheduled task unrelated to this process that regularly nukes the sandbox AWS account to cleanup any orphaned infrastructure