@@ -50,7 +50,7 @@ func TestAzureDependencyFetchOutputFromState(t *testing.T) {
5050 producerPath := filepath .Join (rootPath , "producer" )
5151 consumerPath := filepath .Join (rootPath , "consumer" )
5252 consumerPlan := "terragrunt run plan --backend-bootstrap --experiment azure-backend " +
53- "--dependency-fetch-output-from-state --non-interactive --working-dir " + consumerPath
53+ "--dependency-fetch-output-from-state --non-interactive --log-level debug -- working-dir " + consumerPath
5454
5555 stdout , _ , err := helpers .RunTerragruntCommandWithOutput (t , consumerPlan )
5656 require .NoError (t , err )
@@ -64,10 +64,15 @@ func TestAzureDependencyFetchOutputFromState(t *testing.T) {
6464 )
6565 require .NoError (t , err )
6666
67- stdout , _ , err = helpers .RunTerragruntCommandWithOutput (t , consumerPlan )
67+ stdout , stderr , err : = helpers .RunTerragruntCommandWithOutput (t , consumerPlan )
6868 require .NoError (t , err )
6969 assert .Contains (t , stdout , "from-azure-state" )
7070 assert .NotContains (t , stdout , "mock-azure-value" )
71+
72+ // The value alone does not prove the optimization ran: `tofu output` returns it
73+ // too. Only the direct reader logs this, naming the blob it read.
74+ assert .Contains (t , stderr + stdout , "Fetching outputs directly from azurerm://" ,
75+ "outputs must come from the state blob, not from running tofu output" )
7176}
7277
7378// Environment variables the live tests read, most specific first. The ARM_* /
0 commit comments