From ba2b9b71bc60aaa159f100cec4197bad6f98413a Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Mon, 2 Mar 2026 14:51:23 -0800 Subject: [PATCH 1/5] Refactor include_in_tgc_next in Compute resources (Part 4) --- mmv1/products/compute/ServiceAttachment.yaml | 2 ++ mmv1/products/compute/SslPolicy.yaml | 2 ++ mmv1/products/compute/StoragePool.yaml | 2 +- mmv1/products/compute/TargetGrpcProxy.yaml | 2 ++ mmv1/products/compute/TargetHttpProxy.yaml | 2 ++ mmv1/products/compute/TargetHttpsProxy.yaml | 2 ++ mmv1/products/compute/TargetInstance.yaml | 5 +++-- mmv1/products/compute/TargetSslProxy.yaml | 1 + mmv1/products/compute/TargetTcpProxy.yaml | 1 + 9 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mmv1/products/compute/ServiceAttachment.yaml b/mmv1/products/compute/ServiceAttachment.yaml index 1859a69b04c3..956295508860 100644 --- a/mmv1/products/compute/ServiceAttachment.yaml +++ b/mmv1/products/compute/ServiceAttachment.yaml @@ -13,6 +13,7 @@ --- name: 'ServiceAttachment' + kind: 'compute#ServiceAttachment' description: | Represents a ServiceAttachment resource. @@ -35,6 +36,7 @@ async: base_url: '{{op_id}}' result: resource_inside_response: false +include_in_tgc_next: true custom_code: constants: 'templates/terraform/constants/compute_service_attachment.go.tmpl' update_encoder: 'templates/terraform/update_encoder/compute_service_attachment.go.tmpl' diff --git a/mmv1/products/compute/SslPolicy.yaml b/mmv1/products/compute/SslPolicy.yaml index c9dc34f365d9..3e287718fc02 100644 --- a/mmv1/products/compute/SslPolicy.yaml +++ b/mmv1/products/compute/SslPolicy.yaml @@ -13,6 +13,7 @@ --- name: 'SslPolicy' + kind: 'compute#sslPolicy' description: | Represents a SSL policy. SSL policies give you the ability to control the @@ -37,6 +38,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: constants: 'templates/terraform/constants/ssl_policy.tmpl' update_encoder: 'templates/terraform/update_encoder/ssl_policy.tmpl' diff --git a/mmv1/products/compute/StoragePool.yaml b/mmv1/products/compute/StoragePool.yaml index d582860d3565..71353ca799db 100644 --- a/mmv1/products/compute/StoragePool.yaml +++ b/mmv1/products/compute/StoragePool.yaml @@ -288,6 +288,6 @@ virtual_fields: When the field is set to true or unset in Terraform state, a `terraform apply` or `terraform destroy` that would delete the StoragePool will fail. When the field is set to false, deleting the StoragePool is allowed. +include_in_tgc_next: true custom_code: pre_delete: templates/terraform/pre_delete/compute_storage_pool.go.tmpl -include_in_tgc_next: true diff --git a/mmv1/products/compute/TargetGrpcProxy.yaml b/mmv1/products/compute/TargetGrpcProxy.yaml index b3ad09fa674f..85887ee8a52d 100644 --- a/mmv1/products/compute/TargetGrpcProxy.yaml +++ b/mmv1/products/compute/TargetGrpcProxy.yaml @@ -13,6 +13,7 @@ --- name: 'TargetGrpcProxy' + kind: 'compute#targetGrpcProxy' description: | Represents a Target gRPC Proxy resource. A target gRPC proxy is a component @@ -39,6 +40,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: examples: - name: 'target_grpc_proxy_basic' diff --git a/mmv1/products/compute/TargetHttpProxy.yaml b/mmv1/products/compute/TargetHttpProxy.yaml index d221a310f271..137ada84b15a 100644 --- a/mmv1/products/compute/TargetHttpProxy.yaml +++ b/mmv1/products/compute/TargetHttpProxy.yaml @@ -13,6 +13,7 @@ --- name: 'TargetHttpProxy' + kind: 'compute#targetHttpProxy' description: | Represents a TargetHttpProxy resource, which is used by one or more global @@ -37,6 +38,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: examples: - name: 'target_http_proxy_basic' diff --git a/mmv1/products/compute/TargetHttpsProxy.yaml b/mmv1/products/compute/TargetHttpsProxy.yaml index f0eed46422ae..a7f7ee6292fc 100644 --- a/mmv1/products/compute/TargetHttpsProxy.yaml +++ b/mmv1/products/compute/TargetHttpsProxy.yaml @@ -13,6 +13,7 @@ --- name: 'TargetHttpsProxy' + kind: 'compute#targetHttpsProxy' description: | Represents a TargetHttpsProxy resource, which is used by one or more @@ -37,6 +38,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: encoder: 'templates/terraform/encoders/compute_target_https_proxy.go.tmpl' # update_encoder is usually the same as encoder by default. This resource is an uncommon case where the whole resource diff --git a/mmv1/products/compute/TargetInstance.yaml b/mmv1/products/compute/TargetInstance.yaml index 686d7298db73..25c25d9ca581 100644 --- a/mmv1/products/compute/TargetInstance.yaml +++ b/mmv1/products/compute/TargetInstance.yaml @@ -41,11 +41,12 @@ async: result: resource_inside_response: false collection_url_key: 'items' -custom_code: - post_create: 'templates/terraform/post_create/compute_target_instance_security_policy.go.tmpl' sweeper: url_substitutions: - zone: "southamerica-west1-a" +include_in_tgc_next: true +custom_code: + post_create: 'templates/terraform/post_create/compute_target_instance_security_policy.go.tmpl' examples: - name: 'target_instance_basic' primary_resource_id: 'default' diff --git a/mmv1/products/compute/TargetSslProxy.yaml b/mmv1/products/compute/TargetSslProxy.yaml index 44bd284b8b04..d1aed453dec5 100644 --- a/mmv1/products/compute/TargetSslProxy.yaml +++ b/mmv1/products/compute/TargetSslProxy.yaml @@ -38,6 +38,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: examples: - name: 'target_ssl_proxy_basic' diff --git a/mmv1/products/compute/TargetTcpProxy.yaml b/mmv1/products/compute/TargetTcpProxy.yaml index 5f9d26969739..671c60ca567e 100644 --- a/mmv1/products/compute/TargetTcpProxy.yaml +++ b/mmv1/products/compute/TargetTcpProxy.yaml @@ -38,6 +38,7 @@ async: result: resource_inside_response: false collection_url_key: 'items' +include_in_tgc_next: true custom_code: examples: - name: 'target_tcp_proxy_basic' From 7ff8734eb1a9b15c1f1f1ed536c57483e323a794 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Tue, 3 Mar 2026 11:57:51 -0800 Subject: [PATCH 2/5] Remove all empty lines --- clean_empty_lines.py | 69 +++++ cleanup_tgc.py | 60 ++++ mmv1/products/compute/ServiceAttachment.yaml | 5 - mmv1/products/compute/SslPolicy.yaml | 4 - mmv1/products/compute/StoragePool.yaml | 2 - mmv1/products/compute/TargetGrpcProxy.yaml | 2 - mmv1/products/compute/TargetHttpProxy.yaml | 2 - mmv1/products/compute/TargetHttpsProxy.yaml | 3 - mmv1/products/compute/TargetInstance.yaml | 1 - mmv1/products/compute/TargetSslProxy.yaml | 1 - mmv1/products/compute/TargetTcpProxy.yaml | 1 - old_storage_pool.yaml | 293 +++++++++++++++++++ patch_cai2hcl.sh | 1 + patch_tfplan.sh | 1 + 14 files changed, 424 insertions(+), 21 deletions(-) create mode 100644 clean_empty_lines.py create mode 100644 cleanup_tgc.py create mode 100644 old_storage_pool.yaml create mode 100644 patch_cai2hcl.sh create mode 100644 patch_tfplan.sh diff --git a/clean_empty_lines.py b/clean_empty_lines.py new file mode 100644 index 000000000000..14493b51a46d --- /dev/null +++ b/clean_empty_lines.py @@ -0,0 +1,69 @@ +import subprocess +import os + +def run_command(command): + print(f"Running: {command}") + result = subprocess.run(command, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + return result.stdout.strip() + +def clean_file(filepath): + with open(filepath, 'r') as f: + lines = f.readlines() + + new_lines = [] + last_line_empty = False + for line in lines: + is_empty = not line.strip() + if is_empty: + if not last_line_empty: + new_lines.append(line) + last_line_empty = True + else: + new_lines.append(line) + last_line_empty = False + + # Remove trailing empty lines + while new_lines and not new_lines[-1].strip(): + new_lines.pop() + + # Ensure one newline at end if file is not empty + if new_lines and not new_lines[-1].endswith('\n'): + new_lines[-1] += '\n' + + with open(filepath, 'w') as f: + f.writelines(new_lines) + +def main(): + branches = ["tgc-ai-compute", "refactor-compute-part-2", "refactor-compute-part-3", "refactor-compute-part-4"] + + for branch in branches: + print(f"Processing branch: {branch}") + run_command(f"git checkout {branch}") + + # Get modified files in the last commit (or HEAD if we just committed) + # We want to check files that were touched in the 'Refactor...' commit. + # Since we might have multiple commits now (e.g. the merge/split), let's look at the files modified in the last commit. + files = run_command("git show --name-only --format='' HEAD").splitlines() + files = [f for f in files if f.strip() and f.endswith('.yaml')] + + if not files: + print(f"No YAML files found in last commit of {branch}") + continue + + print(f"Checking {len(files)} files...") + for f in files: + if os.path.exists(f): + clean_file(f) + + # Check if any changes + status = run_command("git status --porcelain") + if status: + print(f"Changes found in {branch}, committing...") + run_command("git add .") + run_command("git commit -m 'Remove empty lines'") + run_command(f"git push origin {branch}") + else: + print(f"No changes in {branch}") + +if __name__ == "__main__": + main() diff --git a/cleanup_tgc.py b/cleanup_tgc.py new file mode 100644 index 000000000000..835d0673122a --- /dev/null +++ b/cleanup_tgc.py @@ -0,0 +1,60 @@ +import subprocess +import os +import shutil + +repo_root = "/Users/zhenhuali/Documents/workspace/container_node_pool" +keep_prefix = "mmv1/third_party/tgc_next/pkg/services/container" +target_dir = "mmv1/third_party/tgc_next" + +def run_command(command): + subprocess.run(command, shell=True, check=True, cwd=repo_root) + +def cleanup(): + # Get status + result = subprocess.run(["git", "status", "--porcelain"], cwd=repo_root, capture_output=True, text=True) + lines = result.stdout.splitlines() + + files_to_restore = [] + files_to_clean = [] + + for line in lines: + if not line.strip(): + continue + status = line[:2] + path = line[3:] + + # Only care about files in mmv1/third_party/tgc_next + if not path.startswith(target_dir): + continue + + # Skip if in the keep directory + if path.startswith(keep_prefix): + continue + + if status.strip() == "??": + files_to_clean.append(path) + else: + files_to_restore.append(path) + + # Restore modified/deleted/staged files + if files_to_restore: + print(f"Restoring {len(files_to_restore)} files...") + # Restore in batches to avoid command line length limits + batch_size = 50 + for i in range(0, len(files_to_restore), batch_size): + batch = files_to_restore[i:i+batch_size] + cmd = ["git", "restore", "--staged", "--worktree"] + batch + subprocess.run(cmd, cwd=repo_root, check=True) + + # Remove untracked files + if files_to_clean: + print(f"Cleaning {len(files_to_clean)} files...") + for path in files_to_clean: + full_path = os.path.join(repo_root, path) + if os.path.isdir(full_path): + shutil.rmtree(full_path) + elif os.path.isfile(full_path): + os.remove(full_path) + +if __name__ == "__main__": + cleanup() diff --git a/mmv1/products/compute/ServiceAttachment.yaml b/mmv1/products/compute/ServiceAttachment.yaml index 956295508860..ab915aea88c0 100644 --- a/mmv1/products/compute/ServiceAttachment.yaml +++ b/mmv1/products/compute/ServiceAttachment.yaml @@ -10,10 +10,8 @@ # 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. - --- name: 'ServiceAttachment' - kind: 'compute#ServiceAttachment' description: | Represents a ServiceAttachment resource. @@ -321,7 +319,6 @@ properties: type: Boolean description: | This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. - If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified . If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list. default_from_api: true @@ -331,10 +328,8 @@ properties: description: | The number of consumer spokes that connected Private Service Connect endpoints can be propagated to through Network Connectivity Center. This limit lets the service producer limit how many propagated Private Service Connect connections can be established to this service attachment from a single consumer. - If the connection preference of the service attachment is ACCEPT_MANUAL, the limit applies to each project or network that is listed in the consumer accept list. If the connection preference of the service attachment is ACCEPT_AUTOMATIC, the limit applies to each project that contains a connected endpoint. - If unspecified, the default propagated connection limit is 250. To explicitly send a zero value, set `send_propagated_connection_limit_if_zero = true`. default_from_api: true virtual_fields: diff --git a/mmv1/products/compute/SslPolicy.yaml b/mmv1/products/compute/SslPolicy.yaml index 3e287718fc02..12608f5de065 100644 --- a/mmv1/products/compute/SslPolicy.yaml +++ b/mmv1/products/compute/SslPolicy.yaml @@ -10,10 +10,8 @@ # 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. - --- name: 'SslPolicy' - kind: 'compute#sslPolicy' description: | Represents a SSL policy. SSL policies give you the ability to control the @@ -81,7 +79,6 @@ properties: load balancer when negotiating SSL with clients. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. - See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) for information on what cipher suites each profile provides. If `CUSTOM` is used, the `custom_features` attribute **must be set**. @@ -121,7 +118,6 @@ properties: `COMPATIBLE`, `MODERN`, `RESTRICTED`, or `CUSTOM`. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. - See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) for which ciphers are available to use. **Note**: this argument *must* be present when using the `CUSTOM` profile. This argument diff --git a/mmv1/products/compute/StoragePool.yaml b/mmv1/products/compute/StoragePool.yaml index 71353ca799db..6611ea190679 100644 --- a/mmv1/products/compute/StoragePool.yaml +++ b/mmv1/products/compute/StoragePool.yaml @@ -10,7 +10,6 @@ # 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. - --- name: "StoragePool" description: | @@ -189,7 +188,6 @@ properties: description: | Type of the storage pool. For example, the following are valid values: - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced` * `hyperdisk-throughput` required: true diff --git a/mmv1/products/compute/TargetGrpcProxy.yaml b/mmv1/products/compute/TargetGrpcProxy.yaml index 85887ee8a52d..2dee0b495101 100644 --- a/mmv1/products/compute/TargetGrpcProxy.yaml +++ b/mmv1/products/compute/TargetGrpcProxy.yaml @@ -10,10 +10,8 @@ # 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. - --- name: 'TargetGrpcProxy' - kind: 'compute#targetGrpcProxy' description: | Represents a Target gRPC Proxy resource. A target gRPC proxy is a component diff --git a/mmv1/products/compute/TargetHttpProxy.yaml b/mmv1/products/compute/TargetHttpProxy.yaml index 137ada84b15a..b0f30e8d84b3 100644 --- a/mmv1/products/compute/TargetHttpProxy.yaml +++ b/mmv1/products/compute/TargetHttpProxy.yaml @@ -10,10 +10,8 @@ # 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. - --- name: 'TargetHttpProxy' - kind: 'compute#targetHttpProxy' description: | Represents a TargetHttpProxy resource, which is used by one or more global diff --git a/mmv1/products/compute/TargetHttpsProxy.yaml b/mmv1/products/compute/TargetHttpsProxy.yaml index a7f7ee6292fc..d136fc940900 100644 --- a/mmv1/products/compute/TargetHttpsProxy.yaml +++ b/mmv1/products/compute/TargetHttpsProxy.yaml @@ -10,10 +10,8 @@ # 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. - --- name: 'TargetHttpsProxy' - kind: 'compute#targetHttpsProxy' description: | Represents a TargetHttpsProxy resource, which is used by one or more @@ -238,7 +236,6 @@ properties: INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. - If you remove this field from your configuration at the same time as deleting or recreating a referenced ServerTlsPolicy resource, you will receive a resourceInUseByAnotherResource error. Use lifecycle.create_before_destroy diff --git a/mmv1/products/compute/TargetInstance.yaml b/mmv1/products/compute/TargetInstance.yaml index 25c25d9ca581..78d031b95483 100644 --- a/mmv1/products/compute/TargetInstance.yaml +++ b/mmv1/products/compute/TargetInstance.yaml @@ -10,7 +10,6 @@ # 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. - --- name: 'TargetInstance' kind: 'compute#targetInstance' diff --git a/mmv1/products/compute/TargetSslProxy.yaml b/mmv1/products/compute/TargetSslProxy.yaml index d1aed453dec5..5f950850899a 100644 --- a/mmv1/products/compute/TargetSslProxy.yaml +++ b/mmv1/products/compute/TargetSslProxy.yaml @@ -10,7 +10,6 @@ # 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. - --- name: 'TargetSslProxy' kind: 'compute#targetSslProxy' diff --git a/mmv1/products/compute/TargetTcpProxy.yaml b/mmv1/products/compute/TargetTcpProxy.yaml index 671c60ca567e..de49de9c0078 100644 --- a/mmv1/products/compute/TargetTcpProxy.yaml +++ b/mmv1/products/compute/TargetTcpProxy.yaml @@ -10,7 +10,6 @@ # 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. - --- name: 'TargetTcpProxy' kind: 'compute#targetTcpProxy' diff --git a/old_storage_pool.yaml b/old_storage_pool.yaml new file mode 100644 index 000000000000..d582860d3565 --- /dev/null +++ b/old_storage_pool.yaml @@ -0,0 +1,293 @@ +# Copyright 2025 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. + +--- +name: "StoragePool" +description: | + A Hyperdisk Storage Pool is a pre-purchased collection of capacity, throughput, and IOPS + which you can then provision to your applications as needed. + You can use Hyperdisk Storage Pools to create and manage disks in pools and use the disks across multiple workloads. +references: + guides: + "Create Hyperdisk Storage Pools": "https://cloud.google.com/compute/docs/disks/create-storage-pools" + api: "https://cloud.google.com/compute/docs/reference/rest/v1/storagePools" +base_url: "projects/{{project}}/zones/{{zone}}/storagePools" +self_link: "projects/{{project}}/zones/{{zone}}/storagePools/{{name}}" +immutable: false +create_url: "projects/{{project}}/zones/{{zone}}/storagePools" +update_verb: "PATCH" +update_mask: false +autogen_async: true +async: + type: 'OpAsync' + operation: + base_url: "{{op_id}}" +iam_policy: + parent_resource_attribute: "name" + method_name_separator: "/" + import_format: + - "projects/{{project}}/zones/{{zone}}/storagePools/{{name}}" + iam_conditions_request_type: "QUERY_PARAM" + allowed_iam_role: "roles/compute.viewer" +examples: + - name: "compute_storage_pool_basic" + primary_resource_id: "test-storage-pool-basic" + vars: + storage_pool_name: "storage-pool-basic" + ignore_read_extra: + - 'deletion_protection' + exclude_test: true + - name: "compute_storage_pool_full" + primary_resource_id: "test-storage-pool-full" + vars: + storage_pool_name: "storage-pool-full" + ignore_read_extra: + - 'deletion_protection' + exclude_test: true +parameters: + - name: "zone" + type: ResourceRef + description: "A reference to the zone where the storage pool resides." + required: false + default_from_api: true + custom_expand: "templates/terraform/custom_expand/resourceref_with_validation.go.tmpl" + custom_flatten: "templates/terraform/custom_flatten/name_from_self_link.tmpl" + resource: "Zone" + imports: "name" +properties: + - name: "kind" + type: String + description: | + Type of the resource. + output: true + - name: "id" + type: String + description: | + The unique identifier for the resource. This identifier is defined by the server. + output: true + - name: "creationTimestamp" + type: String + description: | + Creation timestamp in RFC3339 text format. + output: true + - name: "name" + type: String + description: | + Name of the resource. Provided by the client when the resource is created. + The name must be 1-63 characters long, and comply with RFC1035. + Specifically, the name must be 1-63 characters long and match + the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` + which means the first character must be a lowercase letter, + and all following characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + immutable: true + required: true + - name: "description" + type: String + description: | + A description of this resource. Provide this property when you create the resource. + immutable: true + required: false + - name: "poolProvisionedCapacityGb" + type: String + description: | + Size, in GiB, of the storage pool. For more information about the size limits, + see https://cloud.google.com/compute/docs/disks/storage-pools. + required: true + - name: "poolProvisionedIops" + type: String + description: | + Provisioned IOPS of the storage pool. + Only relevant if the storage pool type is `hyperdisk-balanced`. + required: false + - name: "poolProvisionedThroughput" + type: String + description: | + Provisioned throughput, in MB/s, of the storage pool. + Only relevant if the storage pool type is `hyperdisk-balanced` or `hyperdisk-throughput`. + required: true + - name: "labelFingerprint" + type: Fingerprint + description: | + The fingerprint used for optimistic locking of this resource. + Used internally during updates. + output: true + - name: "resourceStatus" + type: NestedObject + description: | + Status information for the storage pool resource. + output: true + properties: + - name: "lastResizeTimestamp" + type: String + description: | + Timestamp of the last successful resize in RFC3339 text format. + output: true + - name: "diskCount" + type: String + description: | + Number of disks used. + output: true + - name: "poolUsedCapacityBytes" + type: String + description: | + Space used by data stored in disks within the storage pool (in bytes). + This will reflect the total number of bytes written to the disks in the pool, + in contrast to the capacity of those disks. + output: true + - name: "poolUserWrittenBytes" + type: String + description: | + Amount of data written into the pool, before it is compacted. + output: true + - name: "totalProvisionedDiskCapacityGb" + type: String + description: | + Sum of all the capacity provisioned in disks in this storage pool. + A disk's provisioned capacity is the same as its total capacity. + output: true + - name: "maxTotalProvisionedDiskCapacityGb" + type: String + description: | + Maximum allowed aggregate disk size in gigabytes. + output: true + - name: "poolUsedIops" + type: String + description: | + Sum of all the disks' provisioned IOPS, minus some amount + that is allowed per disk that is not counted towards pool's IOPS capacity. + For more information, see https://cloud.google.com/compute/docs/disks/storage-pools. + output: true + - name: "totalProvisionedDiskIops" + type: String + description: | + Sum of all the disks' provisioned IOPS. + output: true + - name: "poolUsedThroughput" + type: String + description: | + Sum of all the disks' provisioned throughput in MB/s. + output: true + - name: "totalProvisionedDiskThroughput" + type: String + description: | + Sum of all the disks' provisioned throughput in MB/s, + minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + output: true + - name: "storagePoolType" + type: ResourceRef + description: | + Type of the storage pool. For example, the + following are valid values: + + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced` + * `hyperdisk-throughput` + required: true + immutable: true + custom_expand: 'templates/terraform/custom_expand/resourceref_with_validation.go.tmpl' + resource: 'StoragePoolType' + imports: 'selfLink' + - name: "status" + type: NestedObject + description: | + Status information for the storage pool resource. + output: true + properties: + - name: "lastResizeTimestamp" + type: String + description: | + Timestamp of the last successful resize in RFC3339 text format. + output: true + - name: "diskCount" + type: String + description: | + Number of disks used. + output: true + - name: "poolUsedCapacityBytes" + type: String + description: | + Space used by data stored in disks within the storage pool (in bytes). + This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. + output: true + - name: "poolUserWrittenBytes" + type: String + description: | + Amount of data written into the pool, before it is compacted. + output: true + - name: "totalProvisionedDiskCapacityGb" + type: String + description: | + Sum of all the capacity provisioned in disks in this storage pool. + A disk's provisioned capacity is the same as its total capacity. + output: true + - name: "maxTotalProvisionedDiskCapacityGb" + type: String + description: | + Maximum allowed aggregate disk size in gigabytes. + output: true + - name: "poolUsedIops" + type: String + description: | + Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools. + output: true + - name: "totalProvisionedDiskIops" + type: String + description: | + Sum of all the disks' provisioned IOPS. + output: true + - name: "poolUsedThroughput" + type: String + description: | + Sum of all the disks' provisioned throughput in MB/s. + output: true + - name: "totalProvisionedDiskThroughput" + type: String + description: | + Sum of all the disks' provisioned throughput in MB/s, + minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + output: true + - name: "capacityProvisioningType" + type: Enum + description: | + Provisioning type of the byte capacity of the pool. + immutable: true + enum_values: + - "STANDARD" + - "ADVANCED" + default_from_api: true + - name: "performanceProvisioningType" + type: Enum + description: | + Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. + immutable: true + required: false + enum_values: + - "STANDARD" + - "ADVANCED" + default_from_api: true + - name: "labels" + type: KeyValueLabels + description: | + Labels to apply to this storage pool. These can be later modified by the setLabels method. +virtual_fields: + - name: "deletion_protection" + type: Boolean + default_value: true + description: | + Whether Terraform will be prevented from destroying the StoragePool. + When the field is set to true or unset in Terraform state, a `terraform apply` + or `terraform destroy` that would delete the StoragePool will fail. + When the field is set to false, deleting the StoragePool is allowed. +custom_code: + pre_delete: templates/terraform/pre_delete/compute_storage_pool.go.tmpl +include_in_tgc_next: true diff --git a/patch_cai2hcl.sh b/patch_cai2hcl.sh new file mode 100644 index 000000000000..3ae41f4631a2 --- /dev/null +++ b/patch_cai2hcl.sh @@ -0,0 +1 @@ +sed -i '' -e 's|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/compute"|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/compute"\n "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/container"|' mmv1/templates/tgc_next/cai2hcl/resource_converters.go.tmpl diff --git a/patch_tfplan.sh b/patch_tfplan.sh new file mode 100644 index 000000000000..faa0bdb3196c --- /dev/null +++ b/patch_tfplan.sh @@ -0,0 +1 @@ +sed -i '' -e 's|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/resourcemanager"|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/resourcemanager"\n "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/container"|' mmv1/templates/tgc_next/tfplan2cai/resource_converters.go.tmpl From ace4ed7419a8a2ee5d155a422f079eedbb9ca2ed Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Tue, 3 Mar 2026 11:58:10 -0800 Subject: [PATCH 3/5] Remove temporary scripts --- clean_empty_lines.py | 69 ---------- cleanup_tgc.py | 60 --------- old_storage_pool.yaml | 293 ------------------------------------------ patch_cai2hcl.sh | 1 - patch_tfplan.sh | 1 - 5 files changed, 424 deletions(-) delete mode 100644 clean_empty_lines.py delete mode 100644 cleanup_tgc.py delete mode 100644 old_storage_pool.yaml delete mode 100644 patch_cai2hcl.sh delete mode 100644 patch_tfplan.sh diff --git a/clean_empty_lines.py b/clean_empty_lines.py deleted file mode 100644 index 14493b51a46d..000000000000 --- a/clean_empty_lines.py +++ /dev/null @@ -1,69 +0,0 @@ -import subprocess -import os - -def run_command(command): - print(f"Running: {command}") - result = subprocess.run(command, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - return result.stdout.strip() - -def clean_file(filepath): - with open(filepath, 'r') as f: - lines = f.readlines() - - new_lines = [] - last_line_empty = False - for line in lines: - is_empty = not line.strip() - if is_empty: - if not last_line_empty: - new_lines.append(line) - last_line_empty = True - else: - new_lines.append(line) - last_line_empty = False - - # Remove trailing empty lines - while new_lines and not new_lines[-1].strip(): - new_lines.pop() - - # Ensure one newline at end if file is not empty - if new_lines and not new_lines[-1].endswith('\n'): - new_lines[-1] += '\n' - - with open(filepath, 'w') as f: - f.writelines(new_lines) - -def main(): - branches = ["tgc-ai-compute", "refactor-compute-part-2", "refactor-compute-part-3", "refactor-compute-part-4"] - - for branch in branches: - print(f"Processing branch: {branch}") - run_command(f"git checkout {branch}") - - # Get modified files in the last commit (or HEAD if we just committed) - # We want to check files that were touched in the 'Refactor...' commit. - # Since we might have multiple commits now (e.g. the merge/split), let's look at the files modified in the last commit. - files = run_command("git show --name-only --format='' HEAD").splitlines() - files = [f for f in files if f.strip() and f.endswith('.yaml')] - - if not files: - print(f"No YAML files found in last commit of {branch}") - continue - - print(f"Checking {len(files)} files...") - for f in files: - if os.path.exists(f): - clean_file(f) - - # Check if any changes - status = run_command("git status --porcelain") - if status: - print(f"Changes found in {branch}, committing...") - run_command("git add .") - run_command("git commit -m 'Remove empty lines'") - run_command(f"git push origin {branch}") - else: - print(f"No changes in {branch}") - -if __name__ == "__main__": - main() diff --git a/cleanup_tgc.py b/cleanup_tgc.py deleted file mode 100644 index 835d0673122a..000000000000 --- a/cleanup_tgc.py +++ /dev/null @@ -1,60 +0,0 @@ -import subprocess -import os -import shutil - -repo_root = "/Users/zhenhuali/Documents/workspace/container_node_pool" -keep_prefix = "mmv1/third_party/tgc_next/pkg/services/container" -target_dir = "mmv1/third_party/tgc_next" - -def run_command(command): - subprocess.run(command, shell=True, check=True, cwd=repo_root) - -def cleanup(): - # Get status - result = subprocess.run(["git", "status", "--porcelain"], cwd=repo_root, capture_output=True, text=True) - lines = result.stdout.splitlines() - - files_to_restore = [] - files_to_clean = [] - - for line in lines: - if not line.strip(): - continue - status = line[:2] - path = line[3:] - - # Only care about files in mmv1/third_party/tgc_next - if not path.startswith(target_dir): - continue - - # Skip if in the keep directory - if path.startswith(keep_prefix): - continue - - if status.strip() == "??": - files_to_clean.append(path) - else: - files_to_restore.append(path) - - # Restore modified/deleted/staged files - if files_to_restore: - print(f"Restoring {len(files_to_restore)} files...") - # Restore in batches to avoid command line length limits - batch_size = 50 - for i in range(0, len(files_to_restore), batch_size): - batch = files_to_restore[i:i+batch_size] - cmd = ["git", "restore", "--staged", "--worktree"] + batch - subprocess.run(cmd, cwd=repo_root, check=True) - - # Remove untracked files - if files_to_clean: - print(f"Cleaning {len(files_to_clean)} files...") - for path in files_to_clean: - full_path = os.path.join(repo_root, path) - if os.path.isdir(full_path): - shutil.rmtree(full_path) - elif os.path.isfile(full_path): - os.remove(full_path) - -if __name__ == "__main__": - cleanup() diff --git a/old_storage_pool.yaml b/old_storage_pool.yaml deleted file mode 100644 index d582860d3565..000000000000 --- a/old_storage_pool.yaml +++ /dev/null @@ -1,293 +0,0 @@ -# Copyright 2025 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. - ---- -name: "StoragePool" -description: | - A Hyperdisk Storage Pool is a pre-purchased collection of capacity, throughput, and IOPS - which you can then provision to your applications as needed. - You can use Hyperdisk Storage Pools to create and manage disks in pools and use the disks across multiple workloads. -references: - guides: - "Create Hyperdisk Storage Pools": "https://cloud.google.com/compute/docs/disks/create-storage-pools" - api: "https://cloud.google.com/compute/docs/reference/rest/v1/storagePools" -base_url: "projects/{{project}}/zones/{{zone}}/storagePools" -self_link: "projects/{{project}}/zones/{{zone}}/storagePools/{{name}}" -immutable: false -create_url: "projects/{{project}}/zones/{{zone}}/storagePools" -update_verb: "PATCH" -update_mask: false -autogen_async: true -async: - type: 'OpAsync' - operation: - base_url: "{{op_id}}" -iam_policy: - parent_resource_attribute: "name" - method_name_separator: "/" - import_format: - - "projects/{{project}}/zones/{{zone}}/storagePools/{{name}}" - iam_conditions_request_type: "QUERY_PARAM" - allowed_iam_role: "roles/compute.viewer" -examples: - - name: "compute_storage_pool_basic" - primary_resource_id: "test-storage-pool-basic" - vars: - storage_pool_name: "storage-pool-basic" - ignore_read_extra: - - 'deletion_protection' - exclude_test: true - - name: "compute_storage_pool_full" - primary_resource_id: "test-storage-pool-full" - vars: - storage_pool_name: "storage-pool-full" - ignore_read_extra: - - 'deletion_protection' - exclude_test: true -parameters: - - name: "zone" - type: ResourceRef - description: "A reference to the zone where the storage pool resides." - required: false - default_from_api: true - custom_expand: "templates/terraform/custom_expand/resourceref_with_validation.go.tmpl" - custom_flatten: "templates/terraform/custom_flatten/name_from_self_link.tmpl" - resource: "Zone" - imports: "name" -properties: - - name: "kind" - type: String - description: | - Type of the resource. - output: true - - name: "id" - type: String - description: | - The unique identifier for the resource. This identifier is defined by the server. - output: true - - name: "creationTimestamp" - type: String - description: | - Creation timestamp in RFC3339 text format. - output: true - - name: "name" - type: String - description: | - Name of the resource. Provided by the client when the resource is created. - The name must be 1-63 characters long, and comply with RFC1035. - Specifically, the name must be 1-63 characters long and match - the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` - which means the first character must be a lowercase letter, - and all following characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - immutable: true - required: true - - name: "description" - type: String - description: | - A description of this resource. Provide this property when you create the resource. - immutable: true - required: false - - name: "poolProvisionedCapacityGb" - type: String - description: | - Size, in GiB, of the storage pool. For more information about the size limits, - see https://cloud.google.com/compute/docs/disks/storage-pools. - required: true - - name: "poolProvisionedIops" - type: String - description: | - Provisioned IOPS of the storage pool. - Only relevant if the storage pool type is `hyperdisk-balanced`. - required: false - - name: "poolProvisionedThroughput" - type: String - description: | - Provisioned throughput, in MB/s, of the storage pool. - Only relevant if the storage pool type is `hyperdisk-balanced` or `hyperdisk-throughput`. - required: true - - name: "labelFingerprint" - type: Fingerprint - description: | - The fingerprint used for optimistic locking of this resource. - Used internally during updates. - output: true - - name: "resourceStatus" - type: NestedObject - description: | - Status information for the storage pool resource. - output: true - properties: - - name: "lastResizeTimestamp" - type: String - description: | - Timestamp of the last successful resize in RFC3339 text format. - output: true - - name: "diskCount" - type: String - description: | - Number of disks used. - output: true - - name: "poolUsedCapacityBytes" - type: String - description: | - Space used by data stored in disks within the storage pool (in bytes). - This will reflect the total number of bytes written to the disks in the pool, - in contrast to the capacity of those disks. - output: true - - name: "poolUserWrittenBytes" - type: String - description: | - Amount of data written into the pool, before it is compacted. - output: true - - name: "totalProvisionedDiskCapacityGb" - type: String - description: | - Sum of all the capacity provisioned in disks in this storage pool. - A disk's provisioned capacity is the same as its total capacity. - output: true - - name: "maxTotalProvisionedDiskCapacityGb" - type: String - description: | - Maximum allowed aggregate disk size in gigabytes. - output: true - - name: "poolUsedIops" - type: String - description: | - Sum of all the disks' provisioned IOPS, minus some amount - that is allowed per disk that is not counted towards pool's IOPS capacity. - For more information, see https://cloud.google.com/compute/docs/disks/storage-pools. - output: true - - name: "totalProvisionedDiskIops" - type: String - description: | - Sum of all the disks' provisioned IOPS. - output: true - - name: "poolUsedThroughput" - type: String - description: | - Sum of all the disks' provisioned throughput in MB/s. - output: true - - name: "totalProvisionedDiskThroughput" - type: String - description: | - Sum of all the disks' provisioned throughput in MB/s, - minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. - output: true - - name: "storagePoolType" - type: ResourceRef - description: | - Type of the storage pool. For example, the - following are valid values: - - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced` - * `hyperdisk-throughput` - required: true - immutable: true - custom_expand: 'templates/terraform/custom_expand/resourceref_with_validation.go.tmpl' - resource: 'StoragePoolType' - imports: 'selfLink' - - name: "status" - type: NestedObject - description: | - Status information for the storage pool resource. - output: true - properties: - - name: "lastResizeTimestamp" - type: String - description: | - Timestamp of the last successful resize in RFC3339 text format. - output: true - - name: "diskCount" - type: String - description: | - Number of disks used. - output: true - - name: "poolUsedCapacityBytes" - type: String - description: | - Space used by data stored in disks within the storage pool (in bytes). - This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. - output: true - - name: "poolUserWrittenBytes" - type: String - description: | - Amount of data written into the pool, before it is compacted. - output: true - - name: "totalProvisionedDiskCapacityGb" - type: String - description: | - Sum of all the capacity provisioned in disks in this storage pool. - A disk's provisioned capacity is the same as its total capacity. - output: true - - name: "maxTotalProvisionedDiskCapacityGb" - type: String - description: | - Maximum allowed aggregate disk size in gigabytes. - output: true - - name: "poolUsedIops" - type: String - description: | - Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools. - output: true - - name: "totalProvisionedDiskIops" - type: String - description: | - Sum of all the disks' provisioned IOPS. - output: true - - name: "poolUsedThroughput" - type: String - description: | - Sum of all the disks' provisioned throughput in MB/s. - output: true - - name: "totalProvisionedDiskThroughput" - type: String - description: | - Sum of all the disks' provisioned throughput in MB/s, - minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. - output: true - - name: "capacityProvisioningType" - type: Enum - description: | - Provisioning type of the byte capacity of the pool. - immutable: true - enum_values: - - "STANDARD" - - "ADVANCED" - default_from_api: true - - name: "performanceProvisioningType" - type: Enum - description: | - Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. - immutable: true - required: false - enum_values: - - "STANDARD" - - "ADVANCED" - default_from_api: true - - name: "labels" - type: KeyValueLabels - description: | - Labels to apply to this storage pool. These can be later modified by the setLabels method. -virtual_fields: - - name: "deletion_protection" - type: Boolean - default_value: true - description: | - Whether Terraform will be prevented from destroying the StoragePool. - When the field is set to true or unset in Terraform state, a `terraform apply` - or `terraform destroy` that would delete the StoragePool will fail. - When the field is set to false, deleting the StoragePool is allowed. -custom_code: - pre_delete: templates/terraform/pre_delete/compute_storage_pool.go.tmpl -include_in_tgc_next: true diff --git a/patch_cai2hcl.sh b/patch_cai2hcl.sh deleted file mode 100644 index 3ae41f4631a2..000000000000 --- a/patch_cai2hcl.sh +++ /dev/null @@ -1 +0,0 @@ -sed -i '' -e 's|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/compute"|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/compute"\n "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/container"|' mmv1/templates/tgc_next/cai2hcl/resource_converters.go.tmpl diff --git a/patch_tfplan.sh b/patch_tfplan.sh deleted file mode 100644 index faa0bdb3196c..000000000000 --- a/patch_tfplan.sh +++ /dev/null @@ -1 +0,0 @@ -sed -i '' -e 's|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/resourcemanager"|"github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/resourcemanager"\n "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/pkg/services/container"|' mmv1/templates/tgc_next/tfplan2cai/resource_converters.go.tmpl From 2c41f5649436ba323faf2267254ab356d90c0353 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Tue, 3 Mar 2026 12:06:16 -0800 Subject: [PATCH 4/5] Revert "Remove all empty lines" This reverts commit 7ff8734eb1a9b15c1f1f1ed536c57483e323a794. --- mmv1/products/compute/ServiceAttachment.yaml | 5 +++++ mmv1/products/compute/SslPolicy.yaml | 4 ++++ mmv1/products/compute/StoragePool.yaml | 2 ++ mmv1/products/compute/TargetGrpcProxy.yaml | 2 ++ mmv1/products/compute/TargetHttpProxy.yaml | 2 ++ mmv1/products/compute/TargetHttpsProxy.yaml | 3 +++ mmv1/products/compute/TargetInstance.yaml | 1 + mmv1/products/compute/TargetSslProxy.yaml | 1 + mmv1/products/compute/TargetTcpProxy.yaml | 1 + 9 files changed, 21 insertions(+) diff --git a/mmv1/products/compute/ServiceAttachment.yaml b/mmv1/products/compute/ServiceAttachment.yaml index ab915aea88c0..956295508860 100644 --- a/mmv1/products/compute/ServiceAttachment.yaml +++ b/mmv1/products/compute/ServiceAttachment.yaml @@ -10,8 +10,10 @@ # 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. + --- name: 'ServiceAttachment' + kind: 'compute#ServiceAttachment' description: | Represents a ServiceAttachment resource. @@ -319,6 +321,7 @@ properties: type: Boolean description: | This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. + If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified . If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list. default_from_api: true @@ -328,8 +331,10 @@ properties: description: | The number of consumer spokes that connected Private Service Connect endpoints can be propagated to through Network Connectivity Center. This limit lets the service producer limit how many propagated Private Service Connect connections can be established to this service attachment from a single consumer. + If the connection preference of the service attachment is ACCEPT_MANUAL, the limit applies to each project or network that is listed in the consumer accept list. If the connection preference of the service attachment is ACCEPT_AUTOMATIC, the limit applies to each project that contains a connected endpoint. + If unspecified, the default propagated connection limit is 250. To explicitly send a zero value, set `send_propagated_connection_limit_if_zero = true`. default_from_api: true virtual_fields: diff --git a/mmv1/products/compute/SslPolicy.yaml b/mmv1/products/compute/SslPolicy.yaml index 12608f5de065..3e287718fc02 100644 --- a/mmv1/products/compute/SslPolicy.yaml +++ b/mmv1/products/compute/SslPolicy.yaml @@ -10,8 +10,10 @@ # 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. + --- name: 'SslPolicy' + kind: 'compute#sslPolicy' description: | Represents a SSL policy. SSL policies give you the ability to control the @@ -79,6 +81,7 @@ properties: load balancer when negotiating SSL with clients. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. + See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) for information on what cipher suites each profile provides. If `CUSTOM` is used, the `custom_features` attribute **must be set**. @@ -118,6 +121,7 @@ properties: `COMPATIBLE`, `MODERN`, `RESTRICTED`, or `CUSTOM`. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. + See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) for which ciphers are available to use. **Note**: this argument *must* be present when using the `CUSTOM` profile. This argument diff --git a/mmv1/products/compute/StoragePool.yaml b/mmv1/products/compute/StoragePool.yaml index 6611ea190679..71353ca799db 100644 --- a/mmv1/products/compute/StoragePool.yaml +++ b/mmv1/products/compute/StoragePool.yaml @@ -10,6 +10,7 @@ # 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. + --- name: "StoragePool" description: | @@ -188,6 +189,7 @@ properties: description: | Type of the storage pool. For example, the following are valid values: + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced` * `hyperdisk-throughput` required: true diff --git a/mmv1/products/compute/TargetGrpcProxy.yaml b/mmv1/products/compute/TargetGrpcProxy.yaml index 2dee0b495101..85887ee8a52d 100644 --- a/mmv1/products/compute/TargetGrpcProxy.yaml +++ b/mmv1/products/compute/TargetGrpcProxy.yaml @@ -10,8 +10,10 @@ # 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. + --- name: 'TargetGrpcProxy' + kind: 'compute#targetGrpcProxy' description: | Represents a Target gRPC Proxy resource. A target gRPC proxy is a component diff --git a/mmv1/products/compute/TargetHttpProxy.yaml b/mmv1/products/compute/TargetHttpProxy.yaml index b0f30e8d84b3..137ada84b15a 100644 --- a/mmv1/products/compute/TargetHttpProxy.yaml +++ b/mmv1/products/compute/TargetHttpProxy.yaml @@ -10,8 +10,10 @@ # 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. + --- name: 'TargetHttpProxy' + kind: 'compute#targetHttpProxy' description: | Represents a TargetHttpProxy resource, which is used by one or more global diff --git a/mmv1/products/compute/TargetHttpsProxy.yaml b/mmv1/products/compute/TargetHttpsProxy.yaml index d136fc940900..a7f7ee6292fc 100644 --- a/mmv1/products/compute/TargetHttpsProxy.yaml +++ b/mmv1/products/compute/TargetHttpsProxy.yaml @@ -10,8 +10,10 @@ # 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. + --- name: 'TargetHttpsProxy' + kind: 'compute#targetHttpsProxy' description: | Represents a TargetHttpsProxy resource, which is used by one or more @@ -236,6 +238,7 @@ properties: INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. + If you remove this field from your configuration at the same time as deleting or recreating a referenced ServerTlsPolicy resource, you will receive a resourceInUseByAnotherResource error. Use lifecycle.create_before_destroy diff --git a/mmv1/products/compute/TargetInstance.yaml b/mmv1/products/compute/TargetInstance.yaml index 78d031b95483..25c25d9ca581 100644 --- a/mmv1/products/compute/TargetInstance.yaml +++ b/mmv1/products/compute/TargetInstance.yaml @@ -10,6 +10,7 @@ # 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. + --- name: 'TargetInstance' kind: 'compute#targetInstance' diff --git a/mmv1/products/compute/TargetSslProxy.yaml b/mmv1/products/compute/TargetSslProxy.yaml index 5f950850899a..d1aed453dec5 100644 --- a/mmv1/products/compute/TargetSslProxy.yaml +++ b/mmv1/products/compute/TargetSslProxy.yaml @@ -10,6 +10,7 @@ # 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. + --- name: 'TargetSslProxy' kind: 'compute#targetSslProxy' diff --git a/mmv1/products/compute/TargetTcpProxy.yaml b/mmv1/products/compute/TargetTcpProxy.yaml index de49de9c0078..671c60ca567e 100644 --- a/mmv1/products/compute/TargetTcpProxy.yaml +++ b/mmv1/products/compute/TargetTcpProxy.yaml @@ -10,6 +10,7 @@ # 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. + --- name: 'TargetTcpProxy' kind: 'compute#targetTcpProxy' From 1c120d8dc4933a6a3d6bb423244172962e0427f9 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Tue, 3 Mar 2026 12:20:23 -0800 Subject: [PATCH 5/5] Remove empty header lines in part-4 --- mmv1/products/compute/ServiceAttachment.yaml | 1 - mmv1/products/compute/SslPolicy.yaml | 1 - mmv1/products/compute/TargetGrpcProxy.yaml | 1 - mmv1/products/compute/TargetHttpProxy.yaml | 1 - mmv1/products/compute/TargetHttpsProxy.yaml | 1 - 5 files changed, 5 deletions(-) diff --git a/mmv1/products/compute/ServiceAttachment.yaml b/mmv1/products/compute/ServiceAttachment.yaml index 956295508860..6444336b6d0c 100644 --- a/mmv1/products/compute/ServiceAttachment.yaml +++ b/mmv1/products/compute/ServiceAttachment.yaml @@ -13,7 +13,6 @@ --- name: 'ServiceAttachment' - kind: 'compute#ServiceAttachment' description: | Represents a ServiceAttachment resource. diff --git a/mmv1/products/compute/SslPolicy.yaml b/mmv1/products/compute/SslPolicy.yaml index 3e287718fc02..64954449e8c1 100644 --- a/mmv1/products/compute/SslPolicy.yaml +++ b/mmv1/products/compute/SslPolicy.yaml @@ -13,7 +13,6 @@ --- name: 'SslPolicy' - kind: 'compute#sslPolicy' description: | Represents a SSL policy. SSL policies give you the ability to control the diff --git a/mmv1/products/compute/TargetGrpcProxy.yaml b/mmv1/products/compute/TargetGrpcProxy.yaml index 85887ee8a52d..74900cb88adc 100644 --- a/mmv1/products/compute/TargetGrpcProxy.yaml +++ b/mmv1/products/compute/TargetGrpcProxy.yaml @@ -13,7 +13,6 @@ --- name: 'TargetGrpcProxy' - kind: 'compute#targetGrpcProxy' description: | Represents a Target gRPC Proxy resource. A target gRPC proxy is a component diff --git a/mmv1/products/compute/TargetHttpProxy.yaml b/mmv1/products/compute/TargetHttpProxy.yaml index 137ada84b15a..95af4014ab83 100644 --- a/mmv1/products/compute/TargetHttpProxy.yaml +++ b/mmv1/products/compute/TargetHttpProxy.yaml @@ -13,7 +13,6 @@ --- name: 'TargetHttpProxy' - kind: 'compute#targetHttpProxy' description: | Represents a TargetHttpProxy resource, which is used by one or more global diff --git a/mmv1/products/compute/TargetHttpsProxy.yaml b/mmv1/products/compute/TargetHttpsProxy.yaml index a7f7ee6292fc..f5f48b5a06fa 100644 --- a/mmv1/products/compute/TargetHttpsProxy.yaml +++ b/mmv1/products/compute/TargetHttpsProxy.yaml @@ -13,7 +13,6 @@ --- name: 'TargetHttpsProxy' - kind: 'compute#targetHttpsProxy' description: | Represents a TargetHttpsProxy resource, which is used by one or more