|
|
|
|
@ -2376,12 +2376,10 @@ func TestContext2Apply_provisionerInterpCount(t *testing.T) {
|
|
|
|
|
t.Fatalf("plan failed unexpectedly: %s", diags.Err())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
state := ctx.State()
|
|
|
|
|
|
|
|
|
|
// We'll marshal and unmarshal the plan here, to ensure that we have
|
|
|
|
|
// a clean new context as would be created if we separately ran
|
|
|
|
|
// terraform plan -out=tfplan && terraform apply tfplan
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
@ -6014,7 +6012,7 @@ func TestContext2Apply_destroyModuleWithAttrsReferencingResource(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
t.Logf("Step 2 plan: %s", legacyDiffComparisonString(plan.Changes))
|
|
|
|
|
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -6089,7 +6087,7 @@ func TestContext2Apply_destroyWithModuleVariableAndCount(t *testing.T) {
|
|
|
|
|
t.Fatalf("destroy plan err: %s", diags.Err())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -6245,7 +6243,7 @@ func TestContext2Apply_destroyWithModuleVariableAndCountNested(t *testing.T) {
|
|
|
|
|
t.Fatalf("destroy plan err: %s", diags.Err())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -8319,7 +8317,7 @@ func TestContext2Apply_issue7824(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write / Read plan to simulate running it through a Plan file
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, ctx.State(), plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -8396,7 +8394,7 @@ func TestContext2Apply_issue5254(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write / Read plan to simulate running it through a Plan file
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -8473,7 +8471,7 @@ func TestContext2Apply_targetedWithTaintedInState(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write / Read plan to simulate running it through a Plan file
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, ctx.State(), plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -8730,7 +8728,7 @@ func TestContext2Apply_destroyNestedModuleWithAttrsReferencingResource(t *testin
|
|
|
|
|
t.Fatalf("destroy plan err: %s", diags.Err())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -9313,7 +9311,7 @@ func TestContext2Apply_plannedInterpolatedCount(t *testing.T) {
|
|
|
|
|
// We'll marshal and unmarshal the plan here, to ensure that we have
|
|
|
|
|
// a clean new context as would be created if we separately ran
|
|
|
|
|
// terraform plan -out=tfplan && terraform apply tfplan
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, ctx.State(), plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -9376,7 +9374,7 @@ func TestContext2Apply_plannedDestroyInterpolatedCount(t *testing.T) {
|
|
|
|
|
// We'll marshal and unmarshal the plan here, to ensure that we have
|
|
|
|
|
// a clean new context as would be created if we separately ran
|
|
|
|
|
// terraform plan -out=tfplan && terraform apply tfplan
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, ctx.State(), plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("failed to round-trip through planfile: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@ -9826,7 +9824,7 @@ func TestContext2Apply_destroyDataCycle(t *testing.T) {
|
|
|
|
|
// We'll marshal and unmarshal the plan here, to ensure that we have
|
|
|
|
|
// a clean new context as would be created if we separately ran
|
|
|
|
|
// terraform plan -out=tfplan && terraform apply tfplan
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
@ -10141,7 +10139,7 @@ func TestContext2Apply_cbdCycle(t *testing.T) {
|
|
|
|
|
// We'll marshal and unmarshal the plan here, to ensure that we have
|
|
|
|
|
// a clean new context as would be created if we separately ran
|
|
|
|
|
// terraform plan -out=tfplan && terraform apply tfplan
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, state, plan)
|
|
|
|
|
ctxOpts, err := contextOptsForPlanViaFile(snap, plan)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
|