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

Sync main feature branch 6.0.0 - 7/16 #11179

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e0ef759
Fix wrong field value example in the iap client resource (#11124)
gecko655 Jul 9, 2024
f9598bb
Add Resource SCC V1 Project Notification Config (#11004)
vijaykanthm Jul 9, 2024
07fb117
Update ACM version to highest valid version number (#11110)
SarahFrench Jul 9, 2024
48507d2
Sync version_6_upgrade.html.markdown (#11128)
c2thorn Jul 9, 2024
3471457
promote resource privileged_access_manager_entitlement to ga (#11094)
varsharmavs Jul 9, 2024
b33d6de
Add data_source_google_site_verification_token (#10999)
SirGitsalot Jul 9, 2024
14548b0
Update SarahFrench PTO (#11127)
SarahFrench Jul 10, 2024
ed5ea59
Make `TestAccCloudRunV2Job_cloudrunv2JobRunJobExample ` test beta-onl…
SarahFrench Jul 10, 2024
19e0c3e
Make `TestAccDataprocMetastoreService_dataprocMetastoreServiceAutosca…
SarahFrench Jul 10, 2024
1bd899b
Add `member` property to `google_project_service_identity` (#11130)
kunzese Jul 10, 2024
b8a463e
Support Delayed Deletion for Vmwareengine Private Cloud (#10764)
swamitagupta Jul 10, 2024
2f6cbf5
TeamCity v6.0.0 feature branch testing (#11104)
SarahFrench Jul 10, 2024
07fdf0f
Update membership.go (#11133)
c2thorn Jul 10, 2024
a1b89f3
Add buildServiceAccount field to cloudfunctions (#11100)
nifflets Jul 10, 2024
aea5962
cloudrunv2 and dialogflowcx (#11132)
c2thorn Jul 10, 2024
30ab2a2
Add Apigee environment scope KVMs resource support (#8826)
george-peng Jul 11, 2024
6d7694e
Promote support for BigQuery dataset resource tags to GA (#11122)
wj-chen Jul 11, 2024
f6d628a
TeamCity: Fix references to branches in 6.0.0 testing projects (#11143)
SarahFrench Jul 11, 2024
cf5eb84
Replace labelKeys/Values for tagKeys/Values in policy constraint exam…
rubensf Jul 11, 2024
7ed3a8a
skip TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy in VCR (…
c2thorn Jul 11, 2024
17e9961
Migration of Hub from DCL to Magic-Modules (#11052)
kalpanda Jul 12, 2024
d022681
New resource: Managed Instance Group Resize Request (#10139)
mike-callahan Jul 12, 2024
0f42b57
BigQueryDestinationConfig to include merge and Append-only as configu…
kubikb Jul 12, 2024
00612dd
Router peer changes- Added customLearnedIpRanges and customLearnedRo…
kalpanda Jul 12, 2024
293fae7
Add new zone to VmwareenginePrivateCloud sweeper (#11149)
SarahFrench Jul 12, 2024
877e85c
feat: datastream sql server connection profile/stream from beta to GA…
maor-mordehay Jul 15, 2024
22aeefa
bigtable: add automated backups documentation to bigtable table (#11162)
ma-g-22 Jul 15, 2024
ef027b1
workbench instances support for static external IP (#10934)
bcreddy-gcp Jul 15, 2024
1529c4b
Go rewrite apphub yaml files (#11167)
zli82016 Jul 15, 2024
67f9dd1
Add cloud_storage_target field in google_data_loss_prevention_discove…
patrickmoy Jul 16, 2024
af5c70f
Promote support for BigQuery table resource tags to GA (#11123)
wj-chen Jul 16, 2024
8db8acd
Add Service Attachment support for Secure Web Proxy (#11107)
Samir-Cit Jul 16, 2024
822912f
Add observability config to AlloyDB instance (#10991)
dolphin1999 Jul 16, 2024
5a00cc9
Add rileykarson vacation to assigner (#11170)
rileykarson Jul 16, 2024
69c43d9
TeamCity: Add docs about testing feature branches (#11131)
SarahFrench Jul 16, 2024
6c45fd0
Fixing small typos in contributing guide. (#11160)
aurelienlegrand Jul 16, 2024
2f878cd
Documenting reservation_affinity attribute for gke-nodepool (#11161)
aurelienlegrand Jul 16, 2024
cfe8744
Move go.mod update instructions to a dedicated page (#11178)
rileykarson Jul 16, 2024
09ac542
Merge branch 'FEATURE-BRANCH-major-release-6.0.0' into sync-main-FEAT…
c2thorn Jul 16, 2024
a07d8a1
fix tgc
c2thorn Jul 17, 2024
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
14 changes: 12 additions & 2 deletions .ci/magician/github/membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ var (
},
{
id: "SarahFrench",
startDate: newDate(2024, 5, 17, bstLoc),
endDate: newDate(2024, 5, 19, bstLoc),
startDate: newDate(2024, 7, 10, bstLoc),
endDate: newDate(2024, 7, 28, bstLoc),
},
{
id: "shuyama1",
Expand All @@ -87,6 +87,16 @@ var (
startDate: newDate(2024, 7, 5, pdtLoc),
endDate: newDate(2024, 7, 16, pdtLoc),
},
{
id: "c2thorn",
startDate: newDate(2024, 7, 10, pdtLoc),
endDate: newDate(2024, 7, 16, pdtLoc),
},
{
id: "rileykarson",
startDate: newDate(2024, 7, 18, pdtLoc),
endDate: newDate(2024, 8, 10, pdtLoc),
},
}
)

Expand Down
24 changes: 0 additions & 24 deletions docs/content/best-practices/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,3 @@ if err := tpgresource.SetDataSourceAnnotations(d); err != nil {
7. In the handwritten acceptance tests, add `annotations` to `ImportStateVerifyIgnore`.
8. In the corresponding data source, after the resource read method, call the function `tpgresource.SetDataSourceAnnotations(d)` to make `annotations` have all of the labels on the resource.
9. Add the documentation for these annotation-related fields.

## Update `go.mod`

The Magic Modules repository does not contain a complete Go module, preventing the use of automated tooling like `go get` from that repository. To add or update provider dependencies, use standard Go tooling to update an individual provider and copy the results to the upstream files in Magic Modules. The providers share the same go.mod and go.sum contents so either can be used to generate the changes.

Below are the steps you can follow to make the change:

1. Navigate to the local `google` provider directory:
```bash
cd $GOPATH/src/github.com/hashicorp/terraform-provider-google
```
2. Open the [`go.mod`](https://github.com/hashicorp/terraform-provider-google/blob/main/go.mod) file and add the new entries or modify the versions of existing entries as needed
3. Update dependencies using either of the following methods
* run the following commands to update all dependencies:
```bash
go get
go mod tidy
```
* Alternatively, update a specific package to a desired version:
```bash
go get google.golang.org/[email protected]
go mod tidy
```
4. Copy the contents of the updated `go.mod` and `go.sum` file into [`mmv1/third_party/terraform/go.mod.erb`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.mod.erb) and [`mmv1/third_party/terraform/go.sum`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.sum) in the `magic-modules` respectively. Ensure `<% autogen_exception -%>` is still at the top of the file afterwards
4 changes: 2 additions & 2 deletions docs/content/contribute/review-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This page provides guidelines for reviewing a Magic Modules pull request (PR).
* is linked to a GitHub issue or an internal bug
* 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.
* establishes clear context itself via title or description.
2. If the PR adds any new resource, ensure that the resource does not already exists in the [GA provider](https://github.com/hashicorp/terraform-provider-google) or [beta provider](https://github.com/hashicorp/terraform-provider-google-beta)
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)
1. Read through all the changes in the PR, generated code in the downstreams and the API documentation to ensure that:
1. the resource schema added in the PR matches the API structure.
1. the features are added in the correct version
Expand Down Expand Up @@ -46,4 +46,4 @@ This page provides guidelines for reviewing a Magic Modules pull request (PR).
1. Check documentation to ensure
1. resouce-level and field-level documentation are generated correctly for MMv1-based resource
1. documentation is added manually for handwritten resources.
1. Check if release notes capture all changes in the PR, and are correctly formatted following the guidance in [write release notes]({{< ref "release-notes" >}}) before merge the PR.
1. Check if release notes capture all changes in the PR, and are correctly formatted following the guidance in [write release notes]({{< ref "release-notes" >}}) before merging the PR.
30 changes: 30 additions & 0 deletions docs/content/develop/update-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Update dependencies"
weight: 300
aliases:
- /docs/update-dependencies
---

# Update `go.mod`

The Magic Modules repository does not contain a complete Go module, preventing the use of automated tooling like `go get` from that repository. To add or update provider dependencies, use standard Go tooling to update an individual provider and copy the results to the upstream files in Magic Modules. The providers share the same go.mod and go.sum contents so either can be used to generate the changes.

Below are the steps you can follow to make the change:

1. Navigate to the local `google` provider directory:
```bash
cd $GOPATH/src/github.com/hashicorp/terraform-provider-google
```
2. Open the [`go.mod`](https://github.com/hashicorp/terraform-provider-google/blob/main/go.mod) file and add the new entries or modify the versions of existing entries as needed
3. Update dependencies using either of the following methods
* run the following commands to update all dependencies:
```bash
go get
go mod tidy
```
* Alternatively, update a specific package to a desired version:
```bash
go get google.golang.org/[email protected]
go mod tidy
```
4. Copy the contents of the updated `go.mod` and `go.sum` file into [`mmv1/third_party/terraform/go.mod.erb`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.mod.erb) and [`mmv1/third_party/terraform/go.sum`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.sum) in the `magic-modules` respectively. Ensure `<% autogen_exception -%>` is still at the top of the file afterwards
4 changes: 3 additions & 1 deletion mmv1/api/resource/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ func (e *Examples) UnmarshalYAML(n *yaml.Node) error {
return err
}

e.ConfigPath = fmt.Sprintf("templates/terraform/examples/go/%s.tf.tmpl", e.Name)
if e.ConfigPath == "" {
e.ConfigPath = fmt.Sprintf("templates/terraform/examples/go/%s.tf.tmpl", e.Name)
}
e.SetHCLText()

return nil
Expand Down
30 changes: 30 additions & 0 deletions mmv1/products/alloydb/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,36 @@ properties:
- !ruby/object:Api::Type::Integer
name: 'queryPlansPerMinute'
description: 'Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.'
- !ruby/object:Api::Type::NestedObject
name: 'observabilityConfig'
description: 'Configuration for enhanced query insights.'
default_from_api: true
min_version: beta
properties:
- !ruby/object:Api::Type::Boolean
name: 'enabled'
description: 'Observability feature status for an instance.'
- !ruby/object:Api::Type::Boolean
name: 'preserveComments'
description: 'Preserve comments in the query string.'
- !ruby/object:Api::Type::Boolean
name: 'trackWaitEvents'
description: 'Record wait events during query execution for an instance.'
- !ruby/object:Api::Type::Boolean
name: 'trackWaitEventTypes'
description: 'Record wait event types during query execution for an instance.'
- !ruby/object:Api::Type::Integer
name: 'maxQueryStringLength'
description: 'Query string length. The default value is 10240. Any integer between 1024 and 100000 is considered valid.'
- !ruby/object:Api::Type::Boolean
name: 'recordApplicationTags'
description: 'Record application tags for an instance. This flag is turned "on" by default.'
- !ruby/object:Api::Type::Integer
name: 'queryPlansPerMinute'
description: 'Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 200 is considered valid.'
- !ruby/object:Api::Type::Boolean
name: 'trackActiveQueries'
description: 'Track actively running queries. If not set, default value is "off".'
- !ruby/object:Api::Type::NestedObject
name: 'readPoolConfig'
description: 'Read pool specific config. If the instance type is READ_POOL, this configuration must be provided.'
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/alloydb/go_Backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ timeouts:
delete_minutes: 10
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down
8 changes: 8 additions & 0 deletions mmv1/products/alloydb/go_Cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ docs:
Users can promote a secondary cluster to a primary cluster with the help of `cluster_type`.
To promote, users have to set the `cluster_type` property as `PRIMARY` and remove the `secondary_config` field from cluster configuration.
[See Example](https://github.com/hashicorp/terraform-provider-google/pull/16413).

Switchover is supported in terraform by refreshing the state of the terraform configurations.
The switchover operation still needs to be called outside of terraform.
After the switchover operation is completed successfully:
1. Refresh the state of the AlloyDB resources by running `terraform apply -refresh-only --auto-approve` .
2. Manually update the terraform configuration file(s) to match the actual state of the resources by modifying the `cluster_type` and `secondary_config` fields.
3. Verify the sync of terraform state by running `terraform plan` and ensure that the infrastructure matches the configuration and no changes are required.
base_url: 'projects/{{project}}/locations/{{location}}/clusters'
self_link: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_id}}'
create_url: 'projects/{{project}}/locations/{{location}}/clusters?clusterId={{cluster_id}}'
Expand All @@ -38,6 +45,7 @@ timeouts:
delete_minutes: 30
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down
31 changes: 31 additions & 0 deletions mmv1/products/alloydb/go_Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ timeouts:
delete_minutes: 120
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down Expand Up @@ -234,6 +235,36 @@ properties:
- name: 'queryPlansPerMinute'
type: Integer
description: 'Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.'
- name: 'observabilityConfig'
type: NestedObject
description: 'Configuration for enhanced query insights.'
default_from_api: true
min_version: beta
properties:
- name: 'enabled'
type: Boolean
description: 'Observability feature status for an instance.'
- name: 'preserveComments'
type: Boolean
description: 'Preserve comments in the query string.'
- name: 'trackWaitEvents'
type: Boolean
description: 'Record wait events during query execution for an instance.'
- name: 'trackWaitEventTypes'
type: Boolean
description: 'Record wait event types during query execution for an instance.'
- name: 'maxQueryStringLength'
type: Integer
description: 'Query string length. The default value is 10240. Any integer between 1024 and 100000 is considered valid.'
- name: 'recordApplicationTags'
type: Boolean
description: 'Record application tags for an instance. This flag is turned "on" by default.'
- name: 'queryPlansPerMinute'
type: Integer
description: 'Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 200 is considered valid.'
- name: 'trackActiveQueries'
type: Boolean
description: 'Track actively running queries. If not set, default value is "off".'
- name: 'readPoolConfig'
type: NestedObject
description: 'Read pool specific config. If the instance type is READ_POOL, this configuration must be provided.'
Expand Down
76 changes: 76 additions & 0 deletions mmv1/products/apigee/EnvironmentKeyvaluemap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Copyright 2023 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Api::Resource
name: 'EnvironmentKeyvaluemaps'
description: |
Collection of key/value string pairs.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Using key value maps': 'https://cloud.google.com/apigee/docs/api-platform/cache/key-value-maps'
api: 'https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keyvaluemaps/create'

base_url: '{{env_id}}/keyvaluemaps'
create_url: '{{env_id}}/keyvaluemaps'
delete_url: '{{env_id}}/keyvaluemaps/{{name}}'
self_link: '{{env_id}}/keyvaluemaps/{{name}}/entries'
import_format: ['{{env_id}}/keyvaluemaps/{{name}}', '{{env_id}}/{{name}}']
skip_sweeper: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_basic'
primary_resource_id: 'apigee_environment_keyvaluemaps'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_test: true
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_test'
primary_resource_id: 'apigee_environment_keyvaluemaps'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_docs: true
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_beta_test'
primary_resource_id: 'apigee_environment_keyvaluemaps'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_docs: true
min_version: beta
immutable: true
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 1
delete_minutes: 1
autogen_async: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/apigee_environment_keyvaluemaps.go.erb
custom_create: 'templates/terraform/custom_create/apigee_environment_keyvaluemaps.go'
decoder: templates/terraform/decoders/apigee_environment_keyvaluemaps.go.erb
parameters:
- !ruby/object:Api::Type::String
name: 'envId'
description: |
The Apigee environment group associated with the Apigee environment,
in the format `organizations/{{org_name}}/environments/{{env_name}}`.
required: true
immutable: true
url_param_only: true
properties:
- !ruby/object:Api::Type::String
name: 'name'
description: |
Required. ID of the key value map.
required: true
immutable: true
81 changes: 81 additions & 0 deletions mmv1/products/apigee/EnvironmentKeyvaluemapEntry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2023 Google Inc.
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Api::Resource
name: 'EnvironmentKeyvaluemapsEntries'
description: |
Creates key value entries in a key value map scoped to an environment.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Using key value maps': 'https://cloud.google.com/apigee/docs/api-platform/cache/key-value-maps'
api: 'https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.keyvaluemaps.entries/create'

base_url: '{{env_keyvaluemap_id}}/entries'
create_url: '{{env_keyvaluemap_id}}/entries'
delete_url: '{{env_keyvaluemap_id}}/entries/{{name}}'
self_link: '{{env_keyvaluemap_id}}/entries/{{name}}'
import_format:
['{{env_keyvaluemap_id}}/entries/{{name}}', '{{env_keyvaluemap_id}}/{{name}}']
skip_sweeper: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_entries_basic'
primary_resource_id: 'apigee_environment_keyvaluemaps_entries'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_test: true
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_entries_test'
primary_resource_id: 'apigee_environment_keyvaluemaps_entries'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_docs: true
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_keyvaluemaps_entries_beta_test'
primary_resource_id: 'apigee_environment_keyvaluemaps_entries'
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
skip_docs: true
min_version: beta
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 1
delete_minutes: 1
immutable: true
autogen_async: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/apigee_environment_keyvaluemaps_entries.go.erb
parameters:
- !ruby/object:Api::Type::String
name: 'env_keyvaluemap_id'
description: |
The Apigee environment keyvalumaps Id associated with the Apigee environment,
in the format `organizations/{{org_name}}/environments/{{env_name}}/keyvaluemaps/{{keyvaluemap_name}}`.
required: true
immutable: true
url_param_only: true
properties:
- !ruby/object:Api::Type::String
name: 'name'
description: |
Required. Resource URI that can be used to identify the scope of the key value map entries.
required: true
immutable: true
- !ruby/object:Api::Type::String
name: 'value'
description: |
Required. Data or payload that is being retrieved and associated with the unique key.
required: true
immutable: true
Loading
Loading