Skip to content

Commit

Permalink
Add misc entries to the upgrade guide (#2657)
Browse files Browse the repository at this point in the history
* Add misc entries to the upgrade guide

* Remove extra space
  • Loading branch information
rileykarson authored Nov 12, 2019
1 parent 01eda86 commit 7ed0a38
Showing 1 changed file with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ so Terraform knows to manage them.
<!-- TOC depthFrom:2 depthTo:2 -->

- [Provider Version Configuration](#provider-version-configuration)
- [Provider](#provider)
- [ID Format Changes](#id-format-changes)
- [Data Source: `google_container_engine_versions`](#data-source-google_container_engine_versions)
- [Resource: `google_app_engine_application`](#resource-google_app_engine_application)
Expand Down Expand Up @@ -121,6 +122,37 @@ provider "google" {
}
```

## Provider

### `userinfo.email` added to default scopes

`userinfo.email` has been added to the default set of OAuth scopes in the
provider. This provides the Terraform user specified by `credentials`' (generally
a service account) email address to GCP APIs in addition to an obfuscated user
id; particularly, it makes the email of the Terraform user available for some
Kubernetes and IAP use cases.

If this was previously defined explicitly, the definition can now be removed.

#### Old Config

```hcl
provider "google" {
scopes = [
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/userinfo.email",
]
}
```

#### New Config

```hcl
provider "google" {}
```

## ID Format Changes

Expand Down Expand Up @@ -359,6 +391,43 @@ in config files, `interface` is now required on the `google_compute_instance.scr

## Resource: `google_compute_instance_template`

### Disks with invalid scratch disk configurations are now rejected

The instance template API allows specifying invalid configurations in some cases,
and an error is only returned when attempting to provision them. Terraform will
now report that some configs that previously appeared valid at plan time are
now invalid.

A disk with `type` `"SCRATCH"` must have `disk_type` `"local-ssd"`. For example,
the following is valid:

```hcl
disk {
auto_delete = true
type = "SCRATCH"
disk_type = "local-ssd"
}
```

These configs would have been accepted by Terraform previously, but will now
fail:

```hcl
disk {
source_image = "https://www.googleapis.com/compute/v1/projects/gce-uefi-images/global/images/centos-7-v20190729"
auto_delete = true
type = "SCRATCH"
}
```

```hcl
disk {
source_image = "https://www.googleapis.com/compute/v1/projects/gce-uefi-images/global/images/centos-7-v20190729"
auto_delete = true
disk_type = "local-ssd"
}
```

### `kms_key_self_link` is now required on block `google_compute_instance_template.disk_encryption_key`

In an attempt to avoid allowing empty blocks in config files, `kms_key_self_link` is now
Expand Down

0 comments on commit 7ed0a38

Please sign in to comment.