github.com/opentofu/opentofu@v1.7.1/internal/command/testdata/test/state_propagation/main.tftest.hcl (about)

     1  # Our test will run this in verbose mode and we should see the plan output for
     2  # the second run block showing the resource being updated as the state should
     3  # be propagated from the first one to the second one.
     4  #
     5  # We also interweave alternate modules to test the handling of multiple states
     6  # within the file.
     7  
     8  run "initial_apply_example" {
     9    module {
    10      source = "./example"
    11    }
    12  
    13    variables {
    14      input = "start"
    15    }
    16  }
    17  
    18  run "initial_apply" {
    19    variables {
    20      input = "start"
    21    }
    22  }
    23  
    24  run "plan_second_example" {
    25    command = plan
    26  
    27    module {
    28      source = "./second_example"
    29    }
    30  
    31    variables {
    32      input = "start"
    33    }
    34  }
    35  
    36  run "plan_update" {
    37    command = plan
    38  
    39    variables {
    40      input = "update"
    41    }
    42  }
    43  
    44  run "plan_update_example" {
    45    command = plan
    46  
    47    module {
    48      source = "./example"
    49    }
    50  
    51    variables {
    52      input = "update"
    53    }
    54  }