You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: "Can't change variable when applying a saved plan",
350
-
Detail: fmt.Sprintf("The variable %s cannot be set using the -var and -var-file options when applying a saved plan file, because a saved plan includes the variable values that were set when it was created. The saved plan specifies %s as the value whereas during apply the value %s was %s. To declare an ephemeral variable which is not saved in the plan file, use ephemeral = true.", varName, tfdiags.CompactValueStr(parsedVar.Value), tfdiags.CompactValueStr(plannedVar), parsedVar.SourceType.DiagnosticLabel()),
351
-
Subject: rng,
352
-
})
343
+
// error when possible to avoid confusion.
344
+
ifparsedVar.Value.Equals(plannedVar).False() {
345
+
switchparsedVar.SourceType {
346
+
caseterraform.ValueFromAutoFile:
347
+
// If the parsed variables comes from an auto-file,
348
+
// it's not input directly by the user so we have to ignore it.
349
+
continue
350
+
caseterraform.ValueFromConfig:
351
+
// This should never happen since supplied plan
352
+
// already contains the original configuration
353
+
panic("TODO")
354
+
caseterraform.ValueFromInput:
355
+
// This should never happen since we disable prompt
0 commit comments