Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade guide: Add guidance for removing empty strings from provider blocks #9048

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,21 @@ The new annotations model is similar to the new labels model and will be applied

There are now two annotation-related fields with the new model, the `annotations` and the output-only `effective_annotations` fields.

### Updates to how empty strings are handled in the `provider` block

In 5.0.0+ any empty strings set in the `provider` block will be used and not ignored. Previously any empty strings used as arguments in the `provider` block were ignored and did not contribute to configuration of the provider.

Users should remove empty string arguments to avoid errors during plan/apply stages.

```tf
provider "google" {
credentials = "" # this line should be removed
project = "my-project"
region = "us-central1"
zone = "" # this line should be removed
}
```

### Changes to how default `location`, `region` and `zone` values are obtained for resources

Currently, when configuring resources that require a `location`, `region` or `zone` field you have the choice of specifying it in the resource block or allowing default values to be used. Default [region](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#region) or [zone](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#zone) values can be configured in the provider block or by providing values through environment variables.
Expand Down