Skip to content

Commit ef471f9

Browse files
authored
Sync feature branch 7.0.0 aug 04 (#14736)
2 parents d6bf6c4 + 44afba1 commit ef471f9

136 files changed

Lines changed: 5183 additions & 338 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/magician/cmd/templates/vcr/post_replay.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ None
3131
{{end}}
3232
</blockquote>
3333
</details>
34+
3435
{{ if gt (len .ReplayingResult.FailedTests) 0 -}}
3536
#### Action taken
3637
<details>
@@ -52,4 +53,4 @@ None
5253
{{- end}}
5354

5455
View the [build log](https://storage.cloud.google.com/{{.LogBucket}}/{{.Version}}/refs/heads/{{.Head}}/artifacts/{{.BuildID}}/build-log/replaying_test.log)
55-
{{- end}}
56+
{{- end}}

.ci/magician/cmd/vcr_merge_eap.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cmd
33
import (
44
"fmt"
55
"magician/exec"
6-
"magician/github"
76
"magician/source"
87
"os"
98

@@ -26,11 +25,6 @@ var vcrMergeEapCmd = &cobra.Command{
2625
clNumber := args[0]
2726
fmt.Println("CL number:", clNumber)
2827

29-
githubToken, ok := os.LookupEnv("GITHUB_TOKEN_CLASSIC")
30-
if !ok {
31-
return fmt.Errorf("did not provide GITHUB_TOKEN_CLASSIC environment variable")
32-
}
33-
3428
baseBranch := os.Getenv("BASE_BRANCH")
3529
if baseBranch == "" {
3630
return fmt.Errorf("environment variable BASE_BRANCH is empty")
@@ -41,12 +35,11 @@ var vcrMergeEapCmd = &cobra.Command{
4135
return fmt.Errorf("error creating Runner: %w", err)
4236
}
4337

44-
gh := github.NewClient(githubToken)
45-
return execVCRMergeEAP(gh, clNumber, baseBranch, rnr)
38+
return execVCRMergeEAP(clNumber, baseBranch, rnr)
4639
},
4740
}
4841

49-
func execVCRMergeEAP(gh GithubClient, clNumber, baseBranch string, runner source.Runner) error {
42+
func execVCRMergeEAP(clNumber, baseBranch string, runner source.Runner) error {
5043
head := "auto-cl-" + clNumber
5144
mergeCassettes("gs://ci-vcr-cassettes/private", baseBranch, fmt.Sprintf("refs/heads/%s", head), runner)
5245
return nil

.ci/magician/github/membership_data.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ var (
102102
"roaks3": {
103103
vacations: []Vacation{
104104
{
105-
startDate: newDate(2025, 7, 1),
106-
endDate: newDate(2025, 7, 14),
105+
startDate: newDate(2025, 8, 1),
106+
endDate: newDate(2025, 8, 11),
107107
},
108108
},
109109
},

docs/content/code-review/review-pr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The following types of PRs may require additional scrutiny and/or multiple revie
2121
1. Read the PR description to understand the context and ensure the PR either
2222
* is linked to a GitHub issue or an internal bug
2323
* if not, check the [issue tracker](https://github.com/hashicorp/terraform-provider-google/issues) to see whether the feature has already been requested and add the issues in the description, if any.
24+
* "Fixes {github_issue_link}" is preferred if an external issue is available because it will [auto-close the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue) when the PR is merged. However, there's no need to create an external issue solely for this purpose.
2425
* establishes clear context itself via title or description.
2526
2. If the PR adds any new resource, ensure that the resource does not already exist in the [GA provider](https://github.com/hashicorp/terraform-provider-google) or [beta provider](https://github.com/hashicorp/terraform-provider-google-beta)
2627
1. Read through all the changes in the PR, generated code in the downstreams and the API documentation to ensure that:

docs/content/test/test.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,11 @@ If [bootstrapping]({{< ref "#bootstrapping" >}}) doesn't work or isn't an option
451451
```go
452452
import (
453453
"testing"
454-
"github.com/hashicorp/terraform-provider-google-beta/google-beta/acctest"
455-
"github.com/hashicorp/terraform-provider-google-beta/google-beta/envvar"
454+
455+
456+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
457+
"github.com/hashicorp/terraform-provider-google-beta/google-beta/acctest"
458+
"github.com/hashicorp/terraform-provider-google-beta/google-beta/envvar"
456459
)
457460
func TestAccProductResourceName_update(t *testing.T) {
458461
t.Parallel()
@@ -464,6 +467,10 @@ func TestAccProductResourceName_update(t *testing.T) {
464467
}
465468
acctest.VcrTest(t, resource.TestCase{
466469
// ...
470+
// Add ExternalProviders so you can use `time_sleep`
471+
ExternalProviders: map[string]resource.ExternalProvider{
472+
"time": {},
473+
},
467474
Steps: []resource.TestStep{
468475
{
469476
testAccProductResourceName_update1(context),

mmv1/api/type.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,3 +1274,13 @@ func (t Type) GetPropertySchemaPathList(propertyList []string) []string {
12741274
}
12751275
return list
12761276
}
1277+
1278+
func (t Type) IsJsonField() bool {
1279+
if t.CustomFlatten == "templates/terraform/custom_flatten/json_schema.tmpl" {
1280+
return true
1281+
}
1282+
if t.CustomExpand == "templates/terraform/custom_expand/json_schema.tmpl" || t.CustomExpand == "templates/terraform/custom_expand/json_value.tmpl" {
1283+
return true
1284+
}
1285+
return false
1286+
}

mmv1/products/alloydb/Backup.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ async:
4040
resource_inside_response: false
4141
custom_code:
4242
encoder: 'templates/terraform/encoders/alloydb_backup.tmpl'
43+
include_in_tgc_next_DO_NOT_USE: true
4344
examples:
4445
- name: 'alloydb_backup_basic'
4546
primary_resource_id: 'default'

mmv1/products/backupdr/BackupPlan.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ examples:
4545
backup_plan_id: 'backup-plan-disk-test'
4646
test_env_vars:
4747
project: :PROJECT_NAME
48+
- name: 'backup_dr_backup_plan_for_csql_resource'
49+
primary_resource_id: 'my-csql-backup-plan-1'
50+
vars:
51+
backup_vault_id: 'backup-vault-csql-test'
52+
backup_plan_id: 'backup-plan-csql-test'
53+
test_env_vars:
54+
project: :PROJECT_NAME
4855
parameters:
4956
- name: 'location'
5057
type: String
@@ -96,7 +103,7 @@ properties:
96103
type: String
97104
description: |
98105
The resource type to which the `BackupPlan` will be applied.
99-
Examples include, "compute.googleapis.com/Instance", "compute.googleapis.com/Disk", and "storage.googleapis.com/Bucket".
106+
Examples include, "compute.googleapis.com/Instance", "compute.googleapis.com/Disk", "sqladmin.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
100107
required: true
101108
- name: 'createTime'
102109
type: String
@@ -236,3 +243,8 @@ properties:
236243
description: |
237244
The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
238245
The end hour of the day should be greater than the start
246+
- name: 'logRetentionDays'
247+
type: Integer
248+
immutable: true
249+
description: |
250+
This is only applicable for CloudSql resource. Days for which logs will be stored. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.

mmv1/products/backupdr/BackupVault.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,12 @@ properties:
179179
- 'WITHIN_ORGANIZATION'
180180
- 'UNRESTRICTED'
181181
- 'WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA'
182+
- name: 'backupRetentionInheritance'
183+
type: Enum
184+
ignore_read: true
185+
description: |
186+
How a backup's enforced retention end time is inherited. Default value is `INHERIT_VAULT_RETENTION` if not provided during creation.
187+
enum_values:
188+
- 'BACKUP_RETENTION_INHERITANCE_UNSPECIFIED'
189+
- 'INHERIT_VAULT_RETENTION'
190+
- 'MATCH_BACKUP_EXPIRE_TIME'

mmv1/products/bigquery/Table.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,3 +638,11 @@ virtual_fields:
638638
View sets the optional parameter "view": Specifies the view that determines which table information is
639639
returned. By default, basic table information and storage statistics (STORAGE_STATS) are returned.
640640
Possible values: TABLE_METADATA_VIEW_UNSPECIFIED, BASIC, STORAGE_STATS, FULL
641+
- name: 'ignore_auto_generated_schema'
642+
type: Boolean
643+
description: |
644+
If set to true, Terraform will prevent implicitly added columns in schema from showing diff.
645+
- name: 'generated_schema_columns'
646+
type: String
647+
description: |
648+
(Output-only) A list of autogenerated schema fields.

0 commit comments

Comments
 (0)