mirror of https://github.com/hashicorp/terraform
test: Add a test that shows a custom workspace being baked-into a planfile (#37917)
parent
fe70f0a7db
commit
0941763d05
@ -0,0 +1,6 @@
|
||||
The test using this test fixture asserts that a plan generated from this configuration includes both:
|
||||
1. Details of the backend defined in the config when the plan was created
|
||||
2. Details of the workspace that was selected when the plan was generated
|
||||
|
||||
The `inmem` backend is used because it supports the use of CE workspaces.
|
||||
We set a non-default workspace in `internal/command/testdata/plan-out-backend-workspace/.terraform/environment`.
|
||||
@ -0,0 +1 @@
|
||||
custom-workspace
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "1.15.0",
|
||||
"backend": {
|
||||
"type": "inmem",
|
||||
"config": {},
|
||||
"hash": 3307601501
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
terraform {
|
||||
backend "inmem" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "test_instance" "foo" {
|
||||
ami = "bar"
|
||||
}
|
||||
Loading…
Reference in new issue