Skip to content

Commit

Permalink
remove trace-append and trace-ro (#5353) (#3759)
Browse files Browse the repository at this point in the history
* remove trace-append and trace-ro

* update upgrade guide

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Oct 22, 2021
1 parent 6d18d35 commit 09a52ca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/5353.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
compute: Fixed service account scope alias to be updated.
```
2 changes: 1 addition & 1 deletion google-beta/resource_compute_security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/errwrap"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"google.golang.org/api/compute/v0.beta"
compute "google.golang.org/api/compute/v0.beta"
)

func resourceComputeSecurityPolicy() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion google-beta/resource_gke_hub_feature_membership_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
"github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
gkehub "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/gkehub/beta"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
Expand Down
2 changes: 0 additions & 2 deletions google-beta/service_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func canonicalizeServiceScope(scope string) string {
"storage-rw": "https://www.googleapis.com/auth/devstorage.read_write",
"taskqueue": "https://www.googleapis.com/auth/taskqueue",
"trace": "https://www.googleapis.com/auth/trace.append",
"trace-append": "https://www.googleapis.com/auth/trace.append",
"trace-ro": "https://www.googleapis.com/auth/trace.readonly",
"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
"userinfo-email": "https://www.googleapis.com/auth/userinfo.email",
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/version_4_upgrade.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description: |-
- [Provider](#provider)
- [Redundant default scopes are removed](#redundant-default-scopes-are-removed)
- [Runtime Configurator (`runtimeconfig`) resources have been removed from the GA provider](#runtime-configurator-runtimeconfig-resources-have-been-removed-from-the-ga-provider)
- [Service account scopes no longer accept `trace-append` or `trace-ro`, use `trace` instead](#service-account-scopes-no-longer-accept-trace-append-or-trace-ro-use-trace-instead)
- [Datasource: `google_product_resource`](#datasource-google_product_resource)
- [Datasource-level change example](#datasource-level-change-example)
- [Resource: `google_bigquery_job`](#resource-google_bigquery_job)
Expand Down Expand Up @@ -214,6 +215,11 @@ resource "google_runtimeconfig_config" "my-runtime-config" {
}
```

### Service account scopes no longer accept `trace-append` or `trace-ro`, use `trace` instead

Previously users could specify `trace-append` or `trace-ro` as scopes for a given service account.
However, to better align with [Google documentation](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes), `trace` will now be the only valid scope, as it's an alias for `trace.append` and
`trace-ro` is no longer a documented option.

## Datasource: `google_product_resource`

Expand Down

0 comments on commit 09a52ca

Please sign in to comment.