hashicorp / hashicorp/terraform-plugin-testing

Ability to Pre-provision Resources for Acceptance Tests

Open
#70 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
68
Forks
22
Avg merge
2d 12h
Merged PRs (30d)
1

Description

### SDK version

```
v2.10.1
```

### Use-cases

I'm working on acceptance tests on a TF provider for an application that leverages aws resources. I'm trying to provision ephemeral aws resources prior to my TF provider's acceptance tests running against my service. These resources would be destroyed at the end of the testing cycle.

### Attempted Solutions

Common solution appears to be writing terraform, applying it, then running the acceptance testing. For ex: https://github.com/hashicorp/terraform-provider-kubernetes/tree/main/kubernetes/test-infra

### Proposal

Given that we can add ExternalProviders to acceptance testing, would we also be able to leverage these to create external resources? Much like how you can PreCheck dependencies for acceptance tests, I'd like to be able to PreCheck or PreProvision cloud dependencies that would allow for my acceptance tests to run. Here we would get the ability to keep test infrastructure localized in one testing suite, while being able to perform validation or pass along data regarding infrastructure to your acceptance testing.

### References

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.