|
| 1 | +--- |
| 2 | +layout: "language" |
| 3 | +page_title: "Upgrading to Terraform v1.1" |
| 4 | +sidebar_current: "upgrade-guides-1-1" |
| 5 | +description: |- |
| 6 | + Upgrading to Terraform v1.1 |
| 7 | +--- |
| 8 | + |
| 9 | +# Upgrading to Terraform v1.1 |
| 10 | + |
| 11 | +Terraform v1.1 is the first minor release after establishing a compatibility |
| 12 | +baseline in Terraform v1.0, and so this release should not require any |
| 13 | +unusual upgrade steps for most users. |
| 14 | + |
| 15 | +However, if you are upgrading from a version earlier than v1.0 then please |
| 16 | +refer to [the Terraform v1.0 upgrade guide](1-0.html) for how to upgrade through |
| 17 | +the v0 releases to reach the v1 release series. Because v1.1 is |
| 18 | +backward-compatible with the v1.0 series, you can upgrade directly to the |
| 19 | +latest v1.1 release, skipping the v1.0 series entirely, at any point where the |
| 20 | +v1.0 upgrade guide calls for upgrading to Terraform v1.0. |
| 21 | + |
| 22 | +Terraform v1.1 continues to honor |
| 23 | +[the Terraform v1.0 Compatibility Promises](/docs/language/v1-compatibility-promises.html), |
| 24 | +but there are some behavior changes outside of those promises that may affect a |
| 25 | +small number of users, described in the following sections. |
| 26 | + |
| 27 | +* [Terraform requires macOS 10.13 High Sierra or later](#terraform-requires-macos-1013-high-sierra-or-later) |
| 28 | +* [Preparation for removing Azure AD Graph support in the AzureRM Backend](#preparation-for-removing-azure-ad-graph-support-in-the-azurerm-backend) |
| 29 | +* [Changes to `terraform graph`](#changes-to-terraform-graph) |
| 30 | +* [Changes to `terraform state mv`](#changes-to-terraform-state-mv) |
| 31 | +* [Provider checksum verification in `terraform apply`](#provider-checksum-verification-in-terraform-apply) |
| 32 | + |
| 33 | +## Terraform requires macOS 10.13 High Sierra or later |
| 34 | + |
| 35 | +As operating system vendors phase out support for older versions of their |
| 36 | +software, the Terraform team must also phase out support in order to focus |
| 37 | +on supporting newer releases. |
| 38 | + |
| 39 | +With that in mind, the official releases of Terraform v1.1 now require |
| 40 | +macOS 10.13 High Sierra or later. Earlier versions of macOS are no longer |
| 41 | +supported, and Terraform CLI behavior on those earlier versions is undefined. |
| 42 | + |
| 43 | +## Preparation for removing Azure AD Graph support in the AzureRM Backend |
| 44 | + |
| 45 | +[Microsoft has announced the deprecation of Azure AD Graph](https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-faq), |
| 46 | +and so Terraform v1.1 marks the first phase of a deprecation process for |
| 47 | +that legacy system in [the AzureRM state storage backend](/docs/language/settings/backends/azurerm.html). |
| 48 | + |
| 49 | +During the Terraform v1.1 release the default behavior is unchanged, but you |
| 50 | +can explicitly opt in to Microsoft Graph by setting |
| 51 | +`use_microsoft_graph = true` inside your `backend "azurerm` block and then |
| 52 | +reinitializing your working directory with `terraform init -reconfigure`. |
| 53 | + |
| 54 | +In Terraform v1.2 we plan to change this argument to default to `true` when |
| 55 | +not set, and so we strongly recommend planning to migrate to Microsoft Graph |
| 56 | +in the near future to prepare for the final removal of Azure AD Graph support |
| 57 | +in a later Terraform release. However, no immediate change is required before |
| 58 | +upgrading to Terraform v1.1. |
| 59 | + |
| 60 | +## Changes to `terraform graph` |
| 61 | + |
| 62 | +The `terraform graph` command exists to help with debugging and so it |
| 63 | +inherently exposes some of Terraform Core's implementation details. For that |
| 64 | +reason it isn't included in the v1.0 Compatibility Promises, but we still |
| 65 | +aim to preserve its behavior in spirit even as Terraform Core's internal |
| 66 | +design changes. |
| 67 | + |
| 68 | +In previous releases, `terraform graph` exposed the implementation detail that |
| 69 | +Terraform internally knows how to build graph types called "validate" and |
| 70 | +"eval", but Terraform Core no longer exposes those graph types externally |
| 71 | +and so consequently the graph command will no longer accept the options |
| 72 | +`-type=validate` or `-type=eval`. |
| 73 | + |
| 74 | +You can see a similar result to what those graph types would previously |
| 75 | +produce by generating a _plan_ graph, which is the default graph type and |
| 76 | +therefore requires no special `-type=...` option. |
| 77 | + |
| 78 | +## Changes to `terraform state mv` |
| 79 | + |
| 80 | +Terraform's local state storage backend supports a number of |
| 81 | +[legacy command line options](/docs/language/settings/backends/local.html#command-line-arguments) |
| 82 | +for backward-compatibility with workflows from much older versions of Terraform, |
| 83 | +prior to the introduction of Backends. |
| 84 | + |
| 85 | +Those options are not supported when using any other backend, but for many |
| 86 | +commands they are simply silently ignored rather than returning an error. |
| 87 | + |
| 88 | +Because `terraform state mv` has some extra use-cases related to migrating |
| 89 | +between states, it historically had some slightly different handling of those |
| 90 | +legacy options, but was not fully consistent. |
| 91 | + |
| 92 | +From Terraform v1.1, the behavior of these options has changed as follows: |
| 93 | + |
| 94 | +* The `-state=...` argument is allowed even when a remote backend is specified |
| 95 | + in the configuration. If present, it forces the command to work in local |
| 96 | + mode. |
| 97 | +* The `-backup=...` and `-backup-out=...` options are allowed only if either |
| 98 | + the local backend is the configuration's selected backend _or_ if you |
| 99 | + specify `-state=...` to force local state operation. These options will now |
| 100 | + return an error if used against a remote backend, whereas previous Terraform |
| 101 | + versions ignored them entirely in that case. |
| 102 | + |
| 103 | +There are no breaking changes to `terraform state mv`'s normal usage pattern, |
| 104 | +without any special options overriding the state storage strategy. |
| 105 | + |
| 106 | +## Provider checksum verification in `terraform apply` |
| 107 | + |
| 108 | +This section applies only to situations where you might generate a saved |
| 109 | +plan file using `terraform plan -out=tfplan` and then separately apply it |
| 110 | +using `terraform apply tfplan`. |
| 111 | + |
| 112 | +You do not need to consider this section unless you are using a custom |
| 113 | +Terraform provider which somehow modifies its own provider package contents |
| 114 | +during execution. That is hypothetically possible, but not true in practice for |
| 115 | +any publicly-available providers we are aware of at the time of writing this |
| 116 | +guide. |
| 117 | + |
| 118 | +Our design intent for this two-step run workflow is that the saved plan |
| 119 | +records enough information for Terraform to guarantee that it's running |
| 120 | +against an identical set of providers during the apply step as it was during |
| 121 | +the plan step, because otherwise the different provider plugins may disagree |
| 122 | +about the meaning of the planned actions. |
| 123 | + |
| 124 | +However, prior versions of Terraform verified consistency only for the main |
| 125 | +executable file representing a provider plugin, and didn't consider other |
| 126 | +files that might appear alongside in the plugin package. Terraform v1.1 now |
| 127 | +uses the same strategy for provider checking during apply as it does when |
| 128 | +verifying provider consistency against |
| 129 | +[the dependency lock file](/docs/language/dependency-lock.html) |
| 130 | +during `terraform init`, which means `terraform apply` will return an error |
| 131 | +if it detects that _any_ of the files in a provider's plugin package have |
| 132 | +changed compared to when the plan was created. |
| 133 | + |
| 134 | +In the unlikely event that you _do_ use a self-modifying provider plugin, |
| 135 | +please consider other solutions to achieve the goals which motivated that, |
| 136 | +which do not involve the provider modifying itself at runtime. If you aren't |
| 137 | +sure, please open a GitHub issue to discuss your use-case. |
0 commit comments