mirror of https://github.com/hashicorp/terraform
command: test plan -refresh= arg ordering (#33483)
* main: disambiguate arg ordering test Make it extra clear what order of args we are asserting. * command: fix plan -refresh=false test The test for plan -refresh=false was not functioning, since ReadResource will not be called if the resource is not in prior state. Add a new fixture directory with state, and also test the converse, to prevent regression. * command: add test for refresh flag precedence A consumer relies on the fact that running terraform plan -refresh=false -refresh true gives the same result as terraform plan -refresh=true.pull/33486/head
parent
ea162f6ab5
commit
d1a5dfa1ad
@ -0,0 +1,13 @@
|
||||
resource "test_instance" "foo" {
|
||||
ami = "bar"
|
||||
|
||||
# This is here because at some point it caused a test failure
|
||||
network_interface {
|
||||
device_index = 0
|
||||
description = "Main network interface"
|
||||
}
|
||||
}
|
||||
|
||||
data "test_data_source" "a" {
|
||||
id = "zzzzz"
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.6.0",
|
||||
"serial": 1,
|
||||
"lineage": "d496625c-bde2-aebc-f5f4-ebbf54eabed2",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"module": "module.child",
|
||||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": null
|
||||
}
|
||||
Loading…
Reference in new issue