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 Go 1.19 for breaking-change-detector and missing-test-detector #5449

Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .changelog/7663.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
16 changes: 8 additions & 8 deletions google-beta/data_source_google_iam_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (
// to express a Google Cloud IAM policy in a data resource. This is an example
// of how the schema would be used in a config:
//
// data "google_iam_policy" "admin" {
// binding {
// role = "roles/storage.objectViewer"
// members = [
// "user:evanbrown@google.com",
// ]
// }
// }
// data "google_iam_policy" "admin" {
// binding {
// role = "roles/storage.objectViewer"
// members = [
// "user:evanbrown@google.com",
// ]
// }
// }
func DataSourceGoogleIamPolicy() *schema.Resource {
return &schema.Resource{
Read: dataSourceGoogleIamPolicyRead,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ func resourceComputeDiskResourcePolicyAttachmentDelete(d *schema.ResourceData, m

// resourcePolicies are referred to by region but affixed to zonal disks.
// We construct the regional name from the zone:
// projects/{project}/regions/{region}/resourcePolicies/{resourceId}
//
// projects/{project}/regions/{region}/resourcePolicies/{resourceId}
region := getRegionFromZone(zone)
if region == "" {
return fmt.Errorf("invalid zone %q, unable to infer region from zone", zone)
Expand Down Expand Up @@ -318,7 +319,8 @@ func resourceComputeDiskResourcePolicyAttachmentEncoder(d *schema.ResourceData,

// resourcePolicies are referred to by region but affixed to zonal disks.
// We construct the regional name from the zone:
// projects/{project}/regions/{region}/resourcePolicies/{resourceId}
//
// projects/{project}/regions/{region}/resourcePolicies/{resourceId}
region := getRegionFromZone(zone)
if region == "" {
return nil, fmt.Errorf("invalid zone %q, unable to infer region from zone", zone)
Expand Down
54 changes: 30 additions & 24 deletions google-beta/resource_container_attached_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -964,19 +964,22 @@ func flattenContainerAttachedClusterErrorsMessage(v interface{}, d *schema.Resou
}

// The custom expander transforms input into something like this:
// authorization {
// admin_users [
// { username = "user1" },
// { username = "user2" }
// ]
// }
//
// authorization {
// admin_users [
// { username = "user1" },
// { username = "user2" }
// ]
// }
//
// The custom flattener transforms input back into something like this:
// authorization {
// admin_users = [
// "user1",
// "user2"
// ]
// }
//
// authorization {
// admin_users = [
// "user1",
// "user2"
// ]
// }
func flattenContainerAttachedClusterAuthorization(v interface{}, d *schema.ResourceData, config *Config) interface{} {
if v == nil {
return nil
Expand Down Expand Up @@ -1166,19 +1169,22 @@ type attachedClusterUser struct {
}

// The custom expander transforms input into something like this:
// authorization {
// admin_users [
// { username = "user1" },
// { username = "user2" }
// ]
// }
//
// authorization {
// admin_users [
// { username = "user1" },
// { username = "user2" }
// ]
// }
//
// The custom flattener transforms input back into something like this:
// authorization {
// admin_users = [
// "user1",
// "user2"
// ]
// }
//
// authorization {
// admin_users = [
// "user1",
// "user2"
// ]
// }
func expandContainerAttachedClusterAuthorization(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down
4 changes: 2 additions & 2 deletions google-beta/resource_data_catalog_tag_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

//Use it to delete TagTemplate Field
// Use it to delete TagTemplate Field
func deleteTagTemplateField(d *schema.ResourceData, config *Config, name, billingProject, userAgent string) error {

url_delete, err := replaceVars(d, config, "{{DataCatalogBasePath}}{{name}}/fields/"+name+"?force={{force_delete}}")
Expand All @@ -42,7 +42,7 @@ func deleteTagTemplateField(d *schema.ResourceData, config *Config, name, billin
return nil
}

//Use it to create TagTemplate Field
// Use it to create TagTemplate Field
func createTagTemplateField(d *schema.ResourceData, config *Config, body map[string]interface{}, name, billingProject, userAgent string) error {

url_create, err := replaceVars(d, config, "{{DataCatalogBasePath}}{{name}}/fields")
Expand Down
4 changes: 2 additions & 2 deletions google-beta/resource_spanner_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,14 @@ func resourceSpannerDatabaseUpdateEncoder(d *schema.ResourceData, meta interface
newDdls := new.([]interface{})
updateDdls := []string{}

//Only new ddl statments to be add to update call
// Only new ddl statments to be add to update call
for i := len(oldDdls); i < len(newDdls); i++ {
if newDdls[i] != nil {
updateDdls = append(updateDdls, newDdls[i].(string))
}
}

//Add statement to update version_retention_period property, if needed
// Add statement to update version_retention_period property, if needed
if d.HasChange("version_retention_period") {
dbName := d.Get("name")
retentionDdl := fmt.Sprintf("ALTER DATABASE `%s` SET OPTIONS (version_retention_period=\"%s\")", dbName, obj["versionRetentionPeriod"])
Expand Down