From 5e570a944d60ec916b81122743e694c1a461f696 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Tue, 23 Jul 2024 12:28:00 -0700 Subject: [PATCH] Go rewrite edgecontainer, edgenetwork, essentialcontacts, filestore, firebase (#11235) --- mmv1/products/edgecontainer/go_Cluster.yaml | 529 ++++++++++++++++++ mmv1/products/edgecontainer/go_NodePool.yaml | 161 ++++++ .../edgecontainer/go_VpnConnection.yaml | 154 +++++ mmv1/products/edgecontainer/go_product.yaml | 22 + mmv1/products/edgenetwork/go_Network.yaml | 116 ++++ mmv1/products/edgenetwork/go_Subnet.yaml | 158 ++++++ mmv1/products/edgenetwork/go_product.yaml | 34 ++ .../essentialcontacts/go_Contact.yaml | 76 +++ .../essentialcontacts/go_product.yaml | 22 + mmv1/products/filestore/go_Backup.yaml | 149 +++++ mmv1/products/filestore/go_Instance.yaml | 285 ++++++++++ mmv1/products/filestore/go_Snapshot.yaml | 119 ++++ mmv1/products/filestore/go_product.yaml | 36 ++ mmv1/products/firebase/go_AndroidApp.yaml | 156 ++++++ mmv1/products/firebase/go_AppleApp.yaml | 143 +++++ mmv1/products/firebase/go_Project.yaml | 80 +++ mmv1/products/firebase/go_WebApp.yaml | 131 +++++ mmv1/products/firebase/go_product.yaml | 34 ++ .../terraform/yaml_conversion_field.erb | 7 +- 19 files changed, 2411 insertions(+), 1 deletion(-) create mode 100644 mmv1/products/edgecontainer/go_Cluster.yaml create mode 100644 mmv1/products/edgecontainer/go_NodePool.yaml create mode 100644 mmv1/products/edgecontainer/go_VpnConnection.yaml create mode 100644 mmv1/products/edgecontainer/go_product.yaml create mode 100644 mmv1/products/edgenetwork/go_Network.yaml create mode 100644 mmv1/products/edgenetwork/go_Subnet.yaml create mode 100644 mmv1/products/edgenetwork/go_product.yaml create mode 100644 mmv1/products/essentialcontacts/go_Contact.yaml create mode 100644 mmv1/products/essentialcontacts/go_product.yaml create mode 100644 mmv1/products/filestore/go_Backup.yaml create mode 100644 mmv1/products/filestore/go_Instance.yaml create mode 100644 mmv1/products/filestore/go_Snapshot.yaml create mode 100644 mmv1/products/filestore/go_product.yaml create mode 100644 mmv1/products/firebase/go_AndroidApp.yaml create mode 100644 mmv1/products/firebase/go_AppleApp.yaml create mode 100644 mmv1/products/firebase/go_Project.yaml create mode 100644 mmv1/products/firebase/go_WebApp.yaml create mode 100644 mmv1/products/firebase/go_product.yaml diff --git a/mmv1/products/edgecontainer/go_Cluster.yaml b/mmv1/products/edgecontainer/go_Cluster.yaml new file mode 100644 index 000000000000..590ccb156e0c --- /dev/null +++ b/mmv1/products/edgecontainer/go_Cluster.yaml @@ -0,0 +1,529 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Cluster' +description: | + Cluster contains information about a Google Distributed Cloud Edge Kubernetes cluster. +references: + guides: + 'Create and manage clusters': 'https://cloud.google.com/distributed-cloud/edge/latest/docs/clusters' + api: 'https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.clusters' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/clusters' +self_link: 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/clusters?cluster_id={{name}}' +update_url: 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' +update_verb: 'PATCH' +update_mask: true +import_format: + - 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' +timeouts: + insert_minutes: 480 + update_minutes: 480 + delete_minutes: 480 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + timeouts: + insert_minutes: 480 + update_minutes: 480 + delete_minutes: 480 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' +custom_code: +examples: + - name: 'edgecontainer_cluster' + primary_resource_id: 'default' + vars: + edgecontainer_cluster_name: 'basic-cluster' + - name: 'edgecontainer_cluster_with_maintenance_window' + primary_resource_id: 'default' + vars: + edgecontainer_cluster_name: 'cluster-with-maintenance' + - name: 'edgecontainer_local_control_plane_cluster' + primary_resource_id: 'default' + vars: + edgecontainer_cluster_name: 'local-control-plane-cluster' + skip_test: true +parameters: + - name: 'location' + type: String + description: | + The location of the resource. + url_param_only: true + required: true + immutable: true + - name: 'name' + type: String + description: | + The GDCE cluster name. + url_param_only: true + required: true + immutable: true +properties: + - name: 'createTime' + type: Time + description: | + The time the cluster was created, in RFC3339 text format. + output: true + - name: 'updateTime' + type: Time + description: | + The time the cluster was last updated, in RFC3339 text format. + output: true + - name: 'labels' + type: KeyValueLabels + description: "User-defined labels for the edgecloud cluster." + - name: 'fleet' + type: NestedObject + description: | + Fleet related configuration. + Fleets are a Google Cloud concept for logically organizing clusters, + letting you use and manage multi-cluster capabilities and apply + consistent policies across your systems. + required: true + immutable: true + properties: + - name: 'project' + type: String + description: | + The name of the Fleet host project where this cluster will be registered. + Project names are formatted as + `projects/`. + required: true + immutable: true + - name: 'membership' + type: String + description: | + The name of the managed Hub Membership resource associated to this cluster. + Membership names are formatted as + `projects//locations/global/membership/`. + output: true + - name: 'networking' + type: NestedObject + description: | + Fleet related configuration. + Fleets are a Google Cloud concept for logically organizing clusters, + letting you use and manage multi-cluster capabilities and apply + consistent policies across your systems. + required: true + properties: + - name: 'clusterIpv4CidrBlocks' + type: Array + description: | + All pods in the cluster are assigned an RFC1918 IPv4 address from these + blocks. Only a single block is supported. This field cannot be changed + after creation. + required: true + immutable: true + item_type: + type: String + - name: 'servicesIpv4CidrBlocks' + type: Array + description: | + All services in the cluster are assigned an RFC1918 IPv4 address from these + blocks. Only a single block is supported. This field cannot be changed + after creation. + required: true + immutable: true + item_type: + type: String + - name: 'clusterIpv6CidrBlocks' + type: Array + description: | + If specified, dual stack mode is enabled and all pods in the cluster are + assigned an IPv6 address from these blocks alongside from an IPv4 + address. Only a single block is supported. This field cannot be changed + after creation. + immutable: true + item_type: + type: String + - name: 'servicesIpv6CidrBlocks' + type: Array + description: | + If specified, dual stack mode is enabled and all services in the cluster are + assigned an IPv6 address from these blocks alongside from an IPv4 + address. Only a single block is supported. This field cannot be changed + after creation. + immutable: true + item_type: + type: String + - name: 'networkType' + type: String + description: | + IP addressing type of this cluster i.e. SINGLESTACK_V4 vs DUALSTACK_V4_V6. + output: true + - name: 'authorization' + type: NestedObject + description: | + RBAC policy that will be applied and managed by GEC. + required: true + immutable: true + properties: + - name: 'adminUsers' + type: NestedObject + description: | + User that will be granted the cluster-admin role on the cluster, providing + full access to the cluster. Currently, this is a singular field, but will + be expanded to allow multiple admins in the future. + required: true + properties: + - name: 'username' + type: String + description: | + An active Google username. + required: true + - name: 'defaultMaxPodsPerNode' + type: Integer + description: | + The default maximum number of pods per node used if a maximum value is not + specified explicitly for a node pool in this cluster. If unspecified, the + Kubernetes default value will be used. + default_from_api: true + - name: 'endpoint' + type: String + description: | + The IP address of the Kubernetes API server. + output: true + - name: 'port' + type: Integer + description: | + The port number of the Kubernetes API server. + output: true + - name: 'clusterCaCertificate' + type: String + description: | + The PEM-encoded public certificate of the cluster's CA. + sensitive: true + output: true + - name: 'maintenancePolicy' + type: NestedObject + description: | + Cluster-wide maintenance policy configuration. + default_from_api: true + properties: + - name: 'window' + type: NestedObject + description: | + Specifies the maintenance window in which maintenance may be performed. + required: true + properties: + - name: 'recurringWindow' + type: NestedObject + description: | + Represents an arbitrary window of time that recurs. + required: true + properties: + - name: 'window' + type: NestedObject + description: | + Represents an arbitrary window of time. + default_from_api: true + properties: + - name: 'startTime' + type: Time + description: | + The time that the window first starts. + default_from_api: true + - name: 'endTime' + type: Time + description: | + The time that the window ends. The end time must take place after the + start time. + default_from_api: true + - name: 'recurrence' + type: String + description: | + An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + this window recurs. They go on for the span of time between the start and + end time. + default_from_api: true + - name: 'maintenanceExclusions' + type: Array + description: | + Exclusions to automatic maintenance. Non-emergency maintenance should not occur + in these windows. Each exclusion has a unique name and may be active or expired. + The max number of maintenance exclusions allowed at a given time is 3. + required: false + item_type: + type: NestedObject + properties: + - name: 'window' + type: NestedObject + description: | + Represents an arbitrary window of time. + default_from_api: true + properties: + - name: 'startTime' + type: Time + description: | + The time that the window first starts. + default_from_api: true + - name: 'endTime' + type: Time + description: | + The time that the window ends. The end time must take place after the + start time. + default_from_api: true + - name: 'id' + type: String + description: | + A unique (per cluster) id for the window. + default_from_api: true + - name: 'controlPlaneVersion' + type: String + description: | + The control plane release version. + output: true + - name: 'nodeVersion' + type: String + description: | + The lowest release version among all worker nodes. This field can be empty + if the cluster does not have any worker nodes. + output: true + - name: 'controlPlane' + type: NestedObject + description: | + The configuration of the cluster control plane. + properties: + - name: 'remote' + type: NestedObject + description: | + Remote control plane configuration. + immutable: true + default_from_api: true + exactly_one_of: + - 'control_plane.0.remote' + - 'control_plane.0.local' + properties: + - name: 'nodeLocation' + type: String + description: | + Name of the Google Distributed Cloud Edge zones where this node pool + will be created. For example: `us-central1-edge-customer-a`. + immutable: true + default_from_api: true + - name: 'local' + type: NestedObject + description: | + Local control plane configuration. + immutable: true + default_from_api: true + exactly_one_of: + - 'control_plane.0.remote' + - 'control_plane.0.local' + properties: + - name: 'nodeLocation' + type: String + description: | + Name of the Google Distributed Cloud Edge zones where this node pool + will be created. For example: `us-central1-edge-customer-a`. + immutable: true + default_from_api: true + - name: 'nodeCount' + type: Integer + description: | + The number of nodes to serve as replicas of the Control Plane. + Only 1 and 3 are supported. + default_from_api: true + - name: 'machineFilter' + type: String + description: | + Only machines matching this filter will be allowed to host control + plane nodes. The filtering language accepts strings like "name=", + and is documented here: [AIP-160](https://google.aip.dev/160). + - name: 'sharedDeploymentPolicy' + type: Enum + description: | + Policy configuration about how user applications are deployed. + default_from_api: true + enum_values: + - 'SHARED_DEPLOYMENT_POLICY_UNSPECIFIED' + - 'ALLOWED' + - 'DISALLOWED' + - name: 'systemAddonsConfig' + type: NestedObject + description: | + Config that customers are allowed to define for GDCE system add-ons. + default_from_api: true + properties: + - name: 'ingress' + type: NestedObject + description: | + Config for the Ingress add-on which allows customers to create an Ingress + object to manage external access to the servers in a cluster. The add-on + consists of istiod and istio-ingress. + default_from_api: true + properties: + - name: 'disabled' + type: Boolean + description: | + Whether Ingress is disabled. + default_from_api: true + - name: 'ipv4Vip' + type: String + description: | + Ingress VIP. + default_from_api: true + - name: 'externalLoadBalancerIpv4AddressPools' + type: Array + description: | + Address pools for cluster data plane external load balancing. + default_from_api: true + item_type: + type: String + - name: 'controlPlaneEncryption' + type: NestedObject + description: | + Remote control plane disk encryption options. This field is only used when + enabling CMEK support. + default_from_api: true + properties: + - name: 'kmsKey' + type: String + description: | + The Cloud KMS CryptoKey e.g. + projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} + to use for protecting control plane disks. If not specified, a + Google-managed key will be used instead. + immutable: true + default_from_api: true + - name: 'kmsKeyActiveVersion' + type: String + description: | + The Cloud KMS CryptoKeyVersion currently in use for protecting control + plane disks. Only applicable if kms_key is set. + output: true + - name: 'kmsKeyState' + type: String + description: | + Availability of the Cloud KMS CryptoKey. If not `KEY_AVAILABLE`, then + nodes may go offline as they cannot access their local data. This can be + caused by a lack of permissions to use the key, or if the key is disabled + or deleted. + output: true + - name: 'kmsStatus' + type: NestedObject + description: | + Error status returned by Cloud KMS when using this key. This field may be + populated only if `kms_key_state` is not `KMS_KEY_STATE_KEY_AVAILABLE`. + If populated, this field contains the error status reported by Cloud KMS. + output: true + properties: + - name: 'code' + type: Integer + description: The status code, which should be an enum value of google.rpc.Code. + output: true + - name: 'message' + type: String + description: + A developer-facing error message, which should be in English. + Any user-facing error message should be localized and sent in + the google.rpc.Status.details field, or localized by the client. + output: true + - name: 'status' + type: String + description: | + Indicates the status of the cluster. + output: true + - name: 'maintenanceEvents' + type: Array + description: | + All the maintenance events scheduled for the cluster, including the ones + ongoing, planned for the future and done in the past (up to 90 days). + output: true + item_type: + type: NestedObject + properties: + - name: 'uuid' + type: String + description: | + UUID of the maintenance event. + output: true + - name: 'targetVersion' + type: String + description: | + The target version of the cluster. + output: true + - name: 'operation' + type: String + description: | + The operation for running the maintenance event. Specified in the format + projects/*/locations/*/operations/*. If the maintenance event is split + into multiple operations (e.g. due to maintenance windows), the latest + one is recorded. + output: true + - name: 'type' + type: String + description: | + Indicates the maintenance event type. + output: true + - name: 'schedule' + type: String + description: | + The schedule of the maintenance event. + output: true + - name: 'state' + type: String + description: | + Indicates the maintenance event state. + output: true + - name: 'createTime' + type: Time + description: | + The time when the maintenance event request was created. + output: true + - name: 'startTime' + type: Time + description: | + The time when the maintenance event started. + output: true + - name: 'endTime' + type: Time + description: | + The time when the maintenance event ended, either successfully or not. If + the maintenance event is split into multiple maintenance windows, + end_time is only updated when the whole flow ends. + output: true + - name: 'updateTime' + type: Time + description: | + The time when the maintenance event message was updated. + output: true + - name: 'targetVersion' + type: String + description: | + The target cluster version. For example: "1.5.0". + default_from_api: true + update_url: 'projects/{{project}}/locations/{{location}}/clusters/{{name}}:upgrade' + update_verb: 'POST' + - name: 'releaseChannel' + type: Enum + description: | + The release channel a cluster is subscribed to. + default_from_api: true + enum_values: + - 'RELEASE_CHANNEL_UNSPECIFIED' + - 'NONE' + - 'REGULAR' diff --git a/mmv1/products/edgecontainer/go_NodePool.yaml b/mmv1/products/edgecontainer/go_NodePool.yaml new file mode 100644 index 000000000000..052ebe5d33fe --- /dev/null +++ b/mmv1/products/edgecontainer/go_NodePool.yaml @@ -0,0 +1,161 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'NodePool' +description: | + "A set of Kubernetes nodes in a cluster with common configuration and specification." +references: + guides: + 'Google Distributed Cloud Edge': 'https://cloud.google.com/distributed-cloud/edge/latest/docs' + api: 'https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.clusters.nodePools' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools' +self_link: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools?nodePoolId={{name}}' +update_url: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}' +update_verb: 'PATCH' +update_mask: true +import_format: + - 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}' +timeouts: + insert_minutes: 480 + update_minutes: 480 + delete_minutes: 480 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + timeouts: + insert_minutes: 480 + update_minutes: 480 + delete_minutes: 480 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' +custom_code: +examples: + - name: 'edgecontainer_node_pool' + primary_resource_id: 'default' + skip_test: true + - name: 'edgecontainer_node_pool_with_cmek' + primary_resource_id: 'default' + skip_test: true + - name: 'edgecontainer_local_control_plane_node_pool' + primary_resource_id: 'default' + skip_test: true + - name: 'edgecontainer_local_control_plane_node_pool_internal' + primary_resource_id: 'default' + skip_test: true + skip_docs: true + skip_vcr: true +parameters: + - name: 'name' + type: String + description: | + The resource name of the node pool. + url_param_only: true + required: true + immutable: true + - name: 'location' + type: String + description: | + The location of the resource. + url_param_only: true + required: true + immutable: true + - name: 'cluster' + type: String + description: | + The name of the target Distributed Cloud Edge Cluster. + url_param_only: true + required: true + immutable: true +properties: + - name: 'createTime' + type: Time + description: | + The time when the node pool was created. + output: true + - name: 'updateTime' + type: Time + description: | + The time when the node pool was last updated. + output: true + - name: 'labels' + type: KeyValueLabels + description: "Labels associated with this resource." + - name: 'nodeLocation' + type: String + description: | + Name of the Google Distributed Cloud Edge zone where this node pool will be created. For example: `us-central1-edge-customer-a`. + required: true + immutable: true + - name: 'nodeCount' + type: Integer + description: | + The number of nodes in the pool. + required: true + - name: 'machineFilter' + type: String + description: | + Only machines matching this filter will be allowed to join the node pool. + The filtering language accepts strings like "name=", and is + documented in more detail in [AIP-160](https://google.aip.dev/160). + default_from_api: true + - name: 'localDiskEncryption' + type: NestedObject + description: | + Local disk encryption options. This field is only used when enabling CMEK support. + properties: + - name: 'kmsKey' + type: String + description: | + The Cloud KMS CryptoKey e.g. projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} to use for protecting node local disks. + If not specified, a Google-managed key will be used instead. + immutable: true + - name: 'kmsKeyActiveVersion' + type: String + description: | + The Cloud KMS CryptoKeyVersion currently in use for protecting node local disks. Only applicable if kmsKey is set. + output: true + - name: 'kmsKeyState' + type: String + description: | + Availability of the Cloud KMS CryptoKey. If not KEY_AVAILABLE, then nodes may go offline as they cannot access their local data. + This can be caused by a lack of permissions to use the key, or if the key is disabled or deleted. + output: true + - name: 'nodeVersion' + type: String + description: | + The lowest release version among all worker nodes. + output: true + - name: 'nodeConfig' + type: NestedObject + description: | + Configuration for each node in the NodePool + default_from_api: true + properties: + - name: 'labels' + type: KeyValuePairs + description: | + "The Kubernetes node labels" + default_from_api: true diff --git a/mmv1/products/edgecontainer/go_VpnConnection.yaml b/mmv1/products/edgecontainer/go_VpnConnection.yaml new file mode 100644 index 000000000000..030dfb88a343 --- /dev/null +++ b/mmv1/products/edgecontainer/go_VpnConnection.yaml @@ -0,0 +1,154 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'VpnConnection' +description: "A VPN connection" +references: + guides: + 'Google Distributed Cloud Edge': 'https://cloud.google.com/distributed-cloud/edge/latest/docs' + api: 'https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.vpnConnections' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/vpnConnections' +self_link: 'projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/vpnConnections?vpnConnectionId={{name}}' +timeouts: + insert_minutes: 30 + update_minutes: 30 + delete_minutes: 30 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + timeouts: + insert_minutes: 30 + update_minutes: 30 + delete_minutes: 30 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' +custom_code: +examples: + - name: 'edgecontainer_vpn_connection' + primary_resource_id: 'default' + skip_test: true +parameters: + - name: 'name' + type: String + description: | + The resource name of VPN connection + url_param_only: true + required: true + immutable: true + - name: 'location' + type: String + description: | + Google Cloud Platform location. + url_param_only: true + required: true + immutable: true +properties: + - name: 'createTime' + type: Time + description: | + The time when the VPN connection was created. + output: true + - name: 'updateTime' + type: Time + description: | + The time when the VPN connection was last updated. + output: true + - name: 'labels' + type: KeyValueLabels + description: "Labels associated with this resource." + immutable: true + - name: 'natGatewayIp' + type: String + description: | + NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. + This is empty if NAT is not used. + immutable: true + - name: 'cluster' + type: String + description: | + The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}. + required: true + immutable: true + - name: 'vpc' + type: String + description: | + The network ID of VPC to connect to. + immutable: true + - name: 'vpcProject' + type: NestedObject + description: Project detail of the VPC network. Required if VPC is in a different project than the cluster project. + properties: + - name: 'projectId' + type: String + description: | + The project of the VPC to connect to. If not specified, it is the same as the cluster project. + immutable: true + - name: 'enableHighAvailability' + type: Boolean + description: | + Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs. + immutable: true + default_from_api: true + - name: 'router' + type: String + description: | + The VPN connection Cloud Router name. + - name: 'details' + type: NestedObject + output: true + properties: + - name: 'state' + type: String + description: | + The current connection state. + output: true + - name: 'error' + type: String + description: | + The error message. This is only populated when state=ERROR. + output: true + - name: 'cloudRouter' + type: NestedObject + description: | + The Cloud Router info. + output: true + properties: + - name: 'name' + type: String + description: | + The associated Cloud Router name. + output: true + - name: 'cloudVpns' + type: NestedObject + description: | + Each connection has multiple Cloud VPN gateways. + output: true + properties: + - name: 'gateway' + type: String + description: | + The created Cloud VPN gateway name. + output: true diff --git a/mmv1/products/edgecontainer/go_product.yaml b/mmv1/products/edgecontainer/go_product.yaml new file mode 100644 index 000000000000..4826175b1000 --- /dev/null +++ b/mmv1/products/edgecontainer/go_product.yaml @@ -0,0 +1,22 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Edgecontainer' +display_name: 'Google Distributed Cloud Edge' +versions: + - name: 'ga' + base_url: 'https://edgecontainer.googleapis.com/v1/' +scopes: + - 'https://www.googleapis.com/auth/cloud-platform' diff --git a/mmv1/products/edgenetwork/go_Network.yaml b/mmv1/products/edgenetwork/go_Network.yaml new file mode 100644 index 000000000000..56a1c60b7d5e --- /dev/null +++ b/mmv1/products/edgenetwork/go_Network.yaml @@ -0,0 +1,116 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Network' +description: | + A Distributed Cloud Edge network, which provides L3 isolation within a zone. +references: + guides: + 'Create and manage networks': 'https://cloud.google.com/distributed-cloud/edge/latest/docs/networks#api' + api: 'https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/network/rest/v1/projects.locations.zones.networks' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks' +self_link: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}' +create_url: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks?networkId={{network_id}}' +immutable: true +import_format: + - 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}' + - '{{name}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 30 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' +custom_code: +examples: + - name: 'edgenetwork_network' + primary_resource_id: 'example_network' + vars: + edgenetwork_network_id: 'example-network' + test_env_vars: + location: 'REGION' + zone: 'ZONE' + skip_test: true +parameters: + - name: 'location' + type: String + description: | + The Google Cloud region to which the target Distributed Cloud Edge zone belongs. + url_param_only: true + required: true + immutable: true + - name: 'zone' + type: String + description: | + The name of the target Distributed Cloud Edge zone. + url_param_only: true + required: true + immutable: true + - name: 'network_id' + type: String + description: | + A unique ID that identifies this network. + url_param_only: true + required: true + immutable: true +properties: + - name: 'name' + type: String + description: | + The canonical name of this resource, with format + `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}` + output: true + - name: 'labels' + type: KeyValuePairs + description: | + Labels associated with this resource. + required: false + - name: 'description' + type: String + description: | + A free-text description of the resource. Max length 1024 characters. + required: false + - name: 'createTime' + type: String + description: | + The time when the subnet was created. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine + fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`. + output: true + - name: 'updateTime' + type: String + description: | + The time when the subnet was last updated. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine + fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`. + output: true + - name: 'mtu' + type: Integer + description: | + IP (L3) MTU value of the network. Default value is `1500`. Possible values are: `1500`, `9000`. + default_value: 1500 diff --git a/mmv1/products/edgenetwork/go_Subnet.yaml b/mmv1/products/edgenetwork/go_Subnet.yaml new file mode 100644 index 000000000000..f59a6862db55 --- /dev/null +++ b/mmv1/products/edgenetwork/go_Subnet.yaml @@ -0,0 +1,158 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Subnet' +description: | + A Distributed Cloud Edge subnet, which provides L2 isolation within a network. +references: + guides: + 'Create and manage subnetworks': 'https://cloud.google.com/distributed-cloud/edge/latest/docs/subnetworks#api' + api: 'https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/network/rest/v1/projects.locations.zones.subnets' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets' +self_link: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}' +create_url: 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets?subnetId={{subnet_id}}' +immutable: true +import_format: + - 'projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}' + - '{{name}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 30 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' +custom_code: +examples: + - name: 'edgenetwork_subnet' + primary_resource_id: 'example_subnet' + vars: + edgenetwork_subnet_id: 'example-subnet' + edgenetwork_network_id: 'example-network' + test_env_vars: + location: 'REGION' + zone: 'ZONE' + skip_test: true + - name: 'edgenetwork_subnet_with_vlan_id' + primary_resource_id: 'example_subnet_with_vlan_id' + vars: + edgenetwork_subnet_id: 'example-subnet-with-vlan-id' + edgenetwork_network_id: 'example-network' + test_env_vars: + location: 'REGION' + zone: 'ZONE' + skip_test: true +parameters: + - name: 'location' + type: String + description: | + The Google Cloud region to which the target Distributed Cloud Edge zone belongs. + url_param_only: true + required: true + immutable: true + - name: 'zone' + type: String + description: | + The name of the target Distributed Cloud Edge zone. + url_param_only: true + required: true + immutable: true + - name: 'subnet_id' + type: String + description: | + A unique ID that identifies this subnet. + url_param_only: true + required: true + immutable: true +properties: + - name: 'name' + type: String + description: | + The canonical name of this resource, with format + `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}` + output: true + - name: 'labels' + type: KeyValuePairs + description: | + Labels associated with this resource. + required: false + - name: 'description' + type: String + description: | + A free-text description of the resource. Max length 1024 characters. + required: false + - name: 'createTime' + type: String + description: | + The time when the subnet was created. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine + fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`. + output: true + - name: 'updateTime' + type: String + description: | + The time when the subnet was last updated. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine + fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`. + output: true + - name: 'network' + type: ResourceRef + description: | + The ID of the network to which this router belongs. + Must be of the form: `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}` + required: true + custom_expand: 'templates/terraform/custom_expand/go/resourceref_with_validation.go.tmpl' + resource: 'Network' + imports: 'name' + - name: 'ipv4Cidr' + type: Array + description: | + The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format. + item_type: + type: String + - name: 'ipv6Cidr' + type: Array + description: | + The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format. + item_type: + type: String + - name: 'vlanId' + type: Integer + description: | + VLAN ID for this subnetwork. If not specified, one is assigned automatically. + default_from_api: true + - name: 'state' + type: Enum + description: | + Current stage of the resource to the device by config push. + output: true + enum_values: + - 'STATE_PENDING' + - 'STATE_PROVISIONING' + - 'STATE_RUNNING' + - 'STATE_SUSPENDED' + - 'STATE_DELETING' diff --git a/mmv1/products/edgenetwork/go_product.yaml b/mmv1/products/edgenetwork/go_product.yaml new file mode 100644 index 000000000000..5aed11af86a3 --- /dev/null +++ b/mmv1/products/edgenetwork/go_product.yaml @@ -0,0 +1,34 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Edgenetwork' +display_name: 'Distributed Cloud Edge Network' +versions: + - name: 'ga' + base_url: 'https://edgenetwork.googleapis.com/v1/' +scopes: + - 'https://www.googleapis.com/auth/cloud-platform' +async: + type: "OpAsync" + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: false + error: + path: 'error' + message: 'message' diff --git a/mmv1/products/essentialcontacts/go_Contact.yaml b/mmv1/products/essentialcontacts/go_Contact.yaml new file mode 100644 index 000000000000..79d845b8fcd1 --- /dev/null +++ b/mmv1/products/essentialcontacts/go_Contact.yaml @@ -0,0 +1,76 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Contact' +description: | + A contact that will receive notifications from Google Cloud. +references: + guides: + 'Official Documentation': 'https://cloud.google.com/resource-manager/docs/managing-notification-contacts' + api: 'https://cloud.google.com/resource-manager/docs/reference/essentialcontacts/rest/v1/projects.contacts' +docs: + warning: | + If you are using User ADCs (Application Default Credentials) with this resource, + you must specify a `billing_project` and set `user_project_override` to true + in the provider configuration. Otherwise the Essential Contacts API will return a 403 error. + Your account must have the `serviceusage.services.use` permission on the + `billing_project` you defined. +base_url: '{{name}}' +self_link: '{{name}}' +create_url: '{{parent}}/contacts' +update_verb: 'PATCH' +update_mask: true +import_format: + - '{{%name}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +custom_code: +examples: + - name: 'essential_contact' + primary_resource_id: 'contact' +parameters: + - name: 'parent' + type: String + description: | + The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} + url_param_only: true + required: true + immutable: true +properties: + - name: 'name' + type: String + description: | + The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id} + output: true + - name: 'email' + type: String + description: | + The email address to send notifications to. This does not need to be a Google account. + required: true + immutable: true + - name: 'notificationCategorySubscriptions' + type: Array + description: | + The categories of notifications that the contact will receive communications for. + required: true + item_type: + type: String + - name: 'languageTag' + type: String + description: | + The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages. + required: true diff --git a/mmv1/products/essentialcontacts/go_product.yaml b/mmv1/products/essentialcontacts/go_product.yaml new file mode 100644 index 000000000000..9b80b60de11b --- /dev/null +++ b/mmv1/products/essentialcontacts/go_product.yaml @@ -0,0 +1,22 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'EssentialContacts' +display_name: 'Essential Contacts' +versions: + - name: 'ga' + base_url: 'https://essentialcontacts.googleapis.com/v1/' +scopes: + - 'https://www.googleapis.com/auth/cloud-platform' diff --git a/mmv1/products/filestore/go_Backup.yaml b/mmv1/products/filestore/go_Backup.yaml new file mode 100644 index 000000000000..1c141e33ee83 --- /dev/null +++ b/mmv1/products/filestore/go_Backup.yaml @@ -0,0 +1,149 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Backup' +description: | + A Google Cloud Filestore backup. +references: + guides: + 'Official Documentation': 'https://cloud.google.com/filestore/docs/backups' + 'Creating Backups': 'https://cloud.google.com/filestore/docs/create-backups' + api: 'https://cloud.google.com/filestore/docs/reference/rest/v1/projects.locations.instances.backups' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/backups' +self_link: 'projects/{{project}}/locations/{{location}}/backups/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/backups?backupId={{name}}' +update_verb: 'PATCH' +update_mask: true +mutex: 'filestore/{{project}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +custom_code: +error_abort_predicates: + + - 'transport_tpg.Is429QuotaError' +examples: + - name: 'filestore_backup_basic' + primary_resource_id: 'backup' + vars: + backup_name: 'tf-fs-bkup' + instance_name: 'tf-fs-inst' +parameters: + - name: 'location' + type: String + description: | + The name of the location of the instance. This can be a region for ENTERPRISE tier instances. + url_param_only: true + required: true + immutable: true +properties: + - name: 'name' + type: String + description: | + The resource name of the backup. The name must be unique within the specified instance. + + 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. + url_param_only: true + required: true + immutable: true + - name: 'description' + type: String + description: | + A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. + - name: 'state' + type: Enum + description: | + The backup state. + output: true + enum_values: + - 'STATE_UNSPECIFIED' + - 'FINALIZING' + - 'CREATING' + - 'READY' + - 'DELETING' + - name: 'createTime' + type: Time + description: | + The time when the snapshot was created in RFC3339 text format. + output: true + - name: 'labels' + type: KeyValueLabels + description: | + Resource labels to represent user-provided metadata. + - name: 'capacityGb' + type: String + description: | + The amount of bytes needed to allocate a full copy of the snapshot content. + output: true + - name: 'storageBytes' + type: String + description: | + The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion. + output: true + - name: 'sourceInstance' + type: String + description: | + The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup. + required: true + - name: 'sourceFileShare' + type: String + description: | + Name of the file share in the source Cloud Filestore instance that the backup is created from. + required: true + immutable: true + - name: 'sourceInstanceTier' + type: Enum + description: | + The service tier of the source Cloud Filestore instance that this backup is created from. + output: true + enum_values: + - 'STANDARD' + - 'PREMIUM' + - 'BASIC_HDD' + - 'BASIC_SSD' + - 'HIGH_SCALE_SSD' + - 'ZONAL' + - 'REGIONAL' + - 'ENTERPRISE' + - name: 'downloadBytes' + type: String + description: | + Amount of bytes that will be downloaded if the backup is restored. + output: true + - name: 'kmsKeyName' + type: String + description: | + KMS key name used for data encryption. + output: true diff --git a/mmv1/products/filestore/go_Instance.yaml b/mmv1/products/filestore/go_Instance.yaml new file mode 100644 index 000000000000..dcf66e7d05db --- /dev/null +++ b/mmv1/products/filestore/go_Instance.yaml @@ -0,0 +1,285 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Instance' +description: | + A Google Cloud Filestore instance. +references: + guides: + 'Official Documentation': 'https://cloud.google.com/filestore/docs/creating-instances' + 'Use with Kubernetes': 'https://cloud.google.com/filestore/docs/accessing-fileshares' + 'Copying Data In/Out': 'https://cloud.google.com/filestore/docs/copying-data' + api: 'https://cloud.google.com/filestore/docs/reference/rest/v1beta1/projects.locations.instances/create' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/instances' +self_link: 'projects/{{project}}/locations/{{location}}/instances/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/instances?instanceId={{name}}' +update_verb: 'PATCH' +update_mask: true +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +custom_code: + pre_create: 'templates/terraform/pre_create/go/filestore_instance.go.tmpl' +error_abort_predicates: + + - 'transport_tpg.Is429QuotaError' +schema_version: 1 +state_upgraders: true +examples: + - name: 'filestore_instance_basic' + primary_resource_id: 'instance' + vars: + instance_name: 'test-instance' + - name: 'filestore_instance_full' + primary_resource_id: 'instance' + vars: + instance_name: 'test-instance' + - name: 'filestore_instance_protocol' + primary_resource_id: 'instance' + min_version: 'beta' + vars: + instance_name: 'test-instance' + - name: 'filestore_instance_enterprise' + primary_resource_id: 'instance' + vars: + instance_name: 'test-instance' + skip_test: true +parameters: + - name: 'zone' + type: String + description: | + The name of the Filestore zone of the instance. + url_param_only: true + immutable: true + ignore_read: true + default_from_api: true + exactly_one_of: + - 'zone' + - 'location' + deprecation_message: '`zone` is deprecated and will be removed in a future major release. Use `location` instead.' + - name: 'location' + type: String + description: | + The name of the location of the instance. This can be a region for ENTERPRISE tier instances. + url_param_only: true + immutable: true + ignore_read: true + default_from_api: true + exactly_one_of: + - 'zone' + - 'location' +properties: + - name: 'name' + type: String + description: | + The resource name of the instance. + url_param_only: true + required: true + custom_flatten: 'templates/terraform/custom_flatten/go/name_from_self_link.tmpl' + - name: 'description' + type: String + description: | + A description of the instance. + - name: 'createTime' + type: Time + description: Creation timestamp in RFC3339 text format. + output: true + - name: 'tier' + type: String + description: | + The service tier of the instance. + Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE + required: true + immutable: true + - name: 'protocol' + type: Enum + description: | + Either NFSv3, for using NFS version 3 as file sharing protocol, + or NFSv4.1, for using NFS version 4.1 as file sharing protocol. + NFSv4.1 can be used with HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE. + The default is NFSv3. + min_version: 'beta' + immutable: true + custom_flatten: 'templates/terraform/custom_flatten/go/default_if_empty.tmpl' + default_value: "NFS_V3" + enum_values: + - 'NFS_V3' + - 'NFS_V4_1' + - name: 'labels' + type: KeyValueLabels + description: | + Resource labels to represent user-provided metadata. + - name: 'fileShares' + type: Array + description: | + File system shares on the instance. For this version, only a + single file share is supported. + required: true + item_type: + type: NestedObject + properties: + - name: 'name' + type: String + description: | + The name of the fileshare (16 characters or less) + required: true + immutable: true + - name: 'capacityGb' + type: Integer + description: | + File share capacity in GiB. This must be at least 1024 GiB + for the standard tier, or 2560 GiB for the premium tier. + required: true + - name: 'sourceBackup' + type: String + description: | + The resource name of the backup, in the format + projects/{projectId}/locations/{locationId}/backups/{backupId}, + that this file share has been restored from. + immutable: true + - name: 'nfsExportOptions' + type: Array + description: | + Nfs Export Options. There is a limit of 10 export options per file share. + item_type: + type: NestedObject + properties: + - name: 'ipRanges' + type: Array + description: | + List of either IPv4 addresses, or ranges in CIDR notation which may mount the file share. + Overlapping IP ranges are not allowed, both within and across NfsExportOptions. An error will be returned. + The limit is 64 IP ranges/addresses for each FileShareConfig among all NfsExportOptions. + item_type: + type: String + - name: 'accessMode' + type: Enum + description: | + Either READ_ONLY, for allowing only read requests on the exported directory, + or READ_WRITE, for allowing both read and write requests. The default is READ_WRITE. + default_value: "READ_WRITE" + enum_values: + - 'READ_ONLY' + - 'READ_WRITE' + - name: 'squashMode' + type: Enum + description: | + Either NO_ROOT_SQUASH, for allowing root access on the exported directory, or ROOT_SQUASH, + for not allowing root access. The default is NO_ROOT_SQUASH. + default_value: "NO_ROOT_SQUASH" + enum_values: + - 'NO_ROOT_SQUASH' + - 'ROOT_SQUASH' + - name: 'anonUid' + type: Integer + description: | + An integer representing the anonymous user id with a default value of 65534. + Anon_uid may only be set with squashMode of ROOT_SQUASH. An error will be returned + if this field is specified for other squashMode settings. + - name: 'anonGid' + type: Integer + description: | + An integer representing the anonymous group id with a default value of 65534. + Anon_gid may only be set with squashMode of ROOT_SQUASH. An error will be returned + if this field is specified for other squashMode settings. + max_size: 10 + max_size: 1 + - name: 'networks' + type: Array + description: | + VPC networks to which the instance is connected. For this version, + only a single network is supported. + required: true + immutable: true + item_type: + type: NestedObject + properties: + - name: 'network' + type: String + description: | + The name of the GCE VPC network to which the + instance is connected. + required: true + immutable: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - name: 'modes' + type: Array + description: | + IP versions for which the instance has + IP addresses assigned. + required: true + immutable: true + item_type: + type: Enum + description: An IP version. + enum_values: + - 'ADDRESS_MODE_UNSPECIFIED' + - 'MODE_IPV4' + - 'MODE_IPV6' + - name: 'reservedIpRange' + type: String + description: | + A /29 CIDR block that identifies the range of IP + addresses reserved for this instance. + immutable: true + default_from_api: true + custom_flatten: 'templates/terraform/custom_flatten/go/filestore_instance_networks_reserved_ip_range.go.tmpl' + - name: 'ipAddresses' + type: Array + description: | + A list of IPv4 or IPv6 addresses. + output: true + item_type: + type: String + - name: 'connectMode' + type: Enum + description: | + The network connect mode of the Filestore instance. + If not provided, the connect mode defaults to + DIRECT_PEERING. + immutable: true + custom_flatten: 'templates/terraform/custom_flatten/go/default_if_empty.tmpl' + default_value: "DIRECT_PEERING" + enum_values: + - 'DIRECT_PEERING' + - 'PRIVATE_SERVICE_ACCESS' + min_size: 1 + - name: 'etag' + type: String + description: | + Server-specified ETag for the instance resource to prevent + simultaneous updates from overwriting each other. + output: true + - name: 'kmsKeyName' + type: String + description: | + KMS key name used for data encryption. + immutable: true diff --git a/mmv1/products/filestore/go_Snapshot.yaml b/mmv1/products/filestore/go_Snapshot.yaml new file mode 100644 index 000000000000..35a461150bb6 --- /dev/null +++ b/mmv1/products/filestore/go_Snapshot.yaml @@ -0,0 +1,119 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Snapshot' +description: | + A Google Cloud Filestore snapshot. +references: + guides: + 'Official Documentation': 'https://cloud.google.com/filestore/docs/snapshots' + 'Creating Snapshots': 'https://cloud.google.com/filestore/docs/create-snapshots' + api: 'https://cloud.google.com/filestore/docs/reference/rest/v1/projects.locations.instances.snapshots' +docs: +base_url: 'projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots' +self_link: 'projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots/{{name}}' +create_url: 'projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots?snapshotId={{name}}' +update_verb: 'PATCH' +update_mask: true +mutex: 'filestore/{{project}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +custom_code: +error_abort_predicates: + + - 'transport_tpg.Is429QuotaError' +examples: + - name: 'filestore_snapshot_basic' + primary_resource_id: 'snapshot' + vars: + snapshot_name: 'test-snapshot' + instance_name: 'test-instance-for-snapshot' + - name: 'filestore_snapshot_full' + primary_resource_id: 'snapshot' + vars: + snapshot_name: 'test-snapshot' + instance_name: 'test-instance-for-snapshot' +parameters: + - name: 'location' + type: String + description: | + The name of the location of the instance. This can be a region for ENTERPRISE tier instances. + url_param_only: true + required: true + immutable: true + - name: 'instance' + type: String + description: | + The resource name of the filestore instance. + url_param_only: true + required: true + immutable: true +properties: + - name: 'name' + type: String + description: | + The resource name of the snapshot. The name must be unique within the specified instance. + + 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. + url_param_only: true + required: true + immutable: true + - name: 'description' + type: String + description: | + A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. + - name: 'state' + type: Enum + description: | + The snapshot state. + output: true + enum_values: + - 'CREATING' + - 'READY' + - 'DELETING' + - name: 'createTime' + type: Time + description: | + The time when the snapshot was created in RFC3339 text format. + output: true + - name: 'labels' + type: KeyValueLabels + description: | + Resource labels to represent user-provided metadata. + - name: 'filesystemUsedBytes' + type: String + description: | + The amount of bytes needed to allocate a full copy of the snapshot content. + output: true diff --git a/mmv1/products/filestore/go_product.yaml b/mmv1/products/filestore/go_product.yaml new file mode 100644 index 000000000000..d2495d6279f3 --- /dev/null +++ b/mmv1/products/filestore/go_product.yaml @@ -0,0 +1,36 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Filestore' +display_name: 'Filestore' +versions: + - name: 'ga' + base_url: 'https://file.googleapis.com/v1/' + - name: 'beta' + base_url: 'https://file.googleapis.com/v1beta1/' +scopes: + - 'https://www.googleapis.com/auth/cloud-platform' +async: + type: "OpAsync" + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' diff --git a/mmv1/products/firebase/go_AndroidApp.yaml b/mmv1/products/firebase/go_AndroidApp.yaml new file mode 100644 index 000000000000..ab01c6b0ab27 --- /dev/null +++ b/mmv1/products/firebase/go_AndroidApp.yaml @@ -0,0 +1,156 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'AndroidApp' +description: | + A Google Cloud Firebase Android application instance +min_version: 'beta' +references: + guides: + 'Official Documentation': 'https://firebase.google.com/docs/android/setup' + api: 'https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.androidApps' +docs: +base_url: 'projects/{{project}}/androidApps' +self_link: 'projects/{{project}}/androidApps/{{app_id}}' +update_verb: 'PATCH' +update_mask: true +delete_url: 'projects/{{project}}/androidApps/{{app_id}}:remove' +delete_verb: 'POST' +import_format: + - '{{project}} projects/{{project}}/androidApps/{{app_id}}' + - 'projects/{{project}}/androidApps/{{app_id}}' + - 'androidApps/{{app_id}}' + - '{{app_id}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +autogen_async: true +async: + actions: ['create', 'delete'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +identity: + - appId + - name +custom_code: + custom_delete: 'templates/terraform/custom_delete/go/firebase_app_deletion_policy.tmpl' +skip_sweeper: true +examples: + - name: 'firebase_android_app_basic' + primary_resource_id: 'basic' + min_version: 'beta' + vars: + display_name: 'Display Name Basic' + package_name: 'android.package.app' + test_env_vars: + project_id: 'PROJECT_NAME' + test_vars_overrides: + 'package_name': '"android.package.app" + acctest.RandString(t, 4)' + 'display_name': '"tf-test Display Name Basic"' + ignore_read_extra: + - 'project' + - 'deletion_policy' + - name: 'firebase_android_app_custom_api_key' + primary_resource_id: 'default' + min_version: 'beta' + vars: + display_name: 'Display Name' + api_key_name: 'api-key' + package_name: 'android.package.app' + test_env_vars: + project_id: 'PROJECT_NAME' + test_vars_overrides: + 'package_name': '"android.package.app" + acctest.RandString(t, 4)' + 'display_name': '"tf-test Display Name"' + ignore_read_extra: + - 'project' + - 'deletion_policy' +virtual_fields: + - name: 'deletion_policy' + description: | + (Optional) Set to `ABANDON` to allow the AndroidApp to be untracked from terraform state + rather than deleted upon `terraform destroy`. This is useful because the AndroidApp may be + serving traffic. Set to `DELETE` to delete the AndroidApp. Defaults to `DELETE`. + type: Enum + default_value: "DELETE" +parameters: +properties: + - name: 'name' + type: String + description: | + The fully qualified resource name of the AndroidApp, for example: + projects/projectId/androidApps/appId + min_version: 'beta' + output: true + - name: 'displayName' + type: String + description: | + The user-assigned display name of the AndroidApp. + min_version: 'beta' + required: true + - name: 'appId' + type: String + description: | + The globally unique, Firebase-assigned identifier of the AndroidApp. + This identifier should be treated as an opaque token, as the data format is not specified. + min_version: 'beta' + output: true + - name: 'packageName' + type: String + description: | + The canonical package name of the Android app as would appear in the Google Play + Developer Console. + min_version: 'beta' + required: true + immutable: true + - name: 'sha1Hashes' + type: Array + description: | + The SHA1 certificate hashes for the AndroidApp. + min_version: 'beta' + item_type: + type: String + - name: 'sha256Hashes' + type: Array + description: | + The SHA256 certificate hashes for the AndroidApp. + min_version: 'beta' + item_type: + type: String + - name: 'apiKeyId' + type: String + description: | + The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AndroidApp. + If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AndroidApp. + This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned. + min_version: 'beta' + default_from_api: true + - name: 'etag' + type: Fingerprint + description: | + This checksum is computed by the server based on the value of other fields, and it may be sent + with update requests to ensure the client has an up-to-date value before proceeding. + min_version: 'beta' + output: true diff --git a/mmv1/products/firebase/go_AppleApp.yaml b/mmv1/products/firebase/go_AppleApp.yaml new file mode 100644 index 000000000000..125b7aafdd63 --- /dev/null +++ b/mmv1/products/firebase/go_AppleApp.yaml @@ -0,0 +1,143 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'AppleApp' +description: | + A Google Cloud Firebase Apple application instance +min_version: 'beta' +references: + guides: + 'Official Documentation': 'https://firebase.google.com/docs/ios/setup' + api: 'https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps' +docs: +base_url: 'projects/{{project}}/iosApps' +self_link: 'projects/{{project}}/iosApps/{{app_id}}' +update_verb: 'PATCH' +update_mask: true +delete_url: 'projects/{{project}}/iosApps/{{app_id}}:remove' +delete_verb: 'POST' +import_format: + - '{{project}} projects/{{project}}/iosApps/{{app_id}}' + - 'projects/{{project}}/iosApps/{{app_id}}' + - 'iosApps/{{app_id}}' + - '{{app_id}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +autogen_async: true +async: + actions: ['create', 'delete'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +identity: + - appId + - name +custom_code: + custom_delete: 'templates/terraform/custom_delete/go/firebase_app_deletion_policy.tmpl' +skip_sweeper: true +examples: + - name: 'firebase_apple_app_basic' + primary_resource_id: 'default' + min_version: 'beta' + vars: + display_name: 'Display Name Basic' + bundle_id: 'apple.app.12345' + test_env_vars: + project_id: 'PROJECT_NAME' + test_vars_overrides: + 'display_name': '"tf-test Display Name Basic"' + - name: 'firebase_apple_app_full' + primary_resource_id: 'full' + min_version: 'beta' + vars: + display_name: 'Display Name Full' + bundle_id: 'apple.app.12345' + app_store_id: '12345' + team_id: '9987654321' + api_key_name: 'api-key' + test_env_vars: + project_id: 'PROJECT_NAME' + test_vars_overrides: + 'app_store_id': '12345' + 'team_id': '9987654321' + 'display_name': '"tf-test Display Name Full"' + ignore_read_extra: + - 'project' + - 'deletion_policy' +virtual_fields: + - name: 'deletion_policy' + description: | + (Optional) Set to `ABANDON` to allow the Apple to be untracked from terraform state + rather than deleted upon `terraform destroy`. This is useful because the Apple may be + serving traffic. Set to `DELETE` to delete the Apple. Defaults to `DELETE`. + type: Enum + default_value: "DELETE" +parameters: +properties: + - name: 'name' + type: String + description: | + The fully qualified resource name of the App, for example: + projects/projectId/iosApps/appId + min_version: 'beta' + output: true + - name: 'displayName' + type: String + description: | + The user-assigned display name of the App. + min_version: 'beta' + required: true + - name: 'appId' + type: String + description: | + The globally unique, Firebase-assigned identifier of the App. + This identifier should be treated as an opaque token, as the data format is not specified. + min_version: 'beta' + output: true + - name: 'bundleId' + type: String + description: | + The canonical bundle ID of the Apple app as it would appear in the Apple AppStore. + min_version: 'beta' + required: true + immutable: true + - name: 'appStoreId' + type: String + description: | + The automatically generated Apple ID assigned to the Apple app by Apple in the Apple App Store. + min_version: 'beta' + - name: 'teamId' + type: String + description: | + The Apple Developer Team ID associated with the App in the App Store. + min_version: 'beta' + - name: 'apiKeyId' + type: String + description: | + The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AppleApp. + If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AppleApp. + This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned. + min_version: 'beta' + default_from_api: true diff --git a/mmv1/products/firebase/go_Project.yaml b/mmv1/products/firebase/go_Project.yaml new file mode 100644 index 000000000000..4b6205e60221 --- /dev/null +++ b/mmv1/products/firebase/go_Project.yaml @@ -0,0 +1,80 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Project' +description: | + A Google Cloud Firebase instance. This enables Firebase resources on a given google project. + Since a FirebaseProject is actually also a GCP Project, a FirebaseProject uses underlying GCP + identifiers (most importantly, the projectId) as its own for easy interop with GCP APIs. + Once Firebase has been added to a Google Project it cannot be removed. +min_version: 'beta' +references: + guides: + 'Official Documentation': 'https://firebase.google.com/' + api: 'https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects' +docs: +base_url: 'projects/{{project}}' +self_link: 'projects/{{project}}' +create_url: 'projects/{{project}}:addFirebase' +skip_delete: true +immutable: true +import_format: + - 'projects/{{project}}' + - '{{project}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +autogen_async: true +async: + actions: ['create', 'delete', 'update'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +custom_code: + constants: 'templates/terraform/constants/go/firebase_project.go.tmpl' + pre_create: 'templates/terraform/pre_create/go/firebase_project.go.tmpl' +skip_sweeper: true +examples: + - name: 'firebase_project_basic' + primary_resource_id: 'default' + min_version: 'beta' + vars: + instance_name: 'memory-cache' + project_name: 'my-project' + test_env_vars: + org_id: 'ORG_ID' +parameters: +properties: + - name: 'projectNumber' + type: String + description: | + The number of the google project that firebase is enabled on. + min_version: 'beta' + output: true + - name: 'displayName' + type: String + description: | + The GCP project display name + min_version: 'beta' + output: true diff --git a/mmv1/products/firebase/go_WebApp.yaml b/mmv1/products/firebase/go_WebApp.yaml new file mode 100644 index 000000000000..06a345c22482 --- /dev/null +++ b/mmv1/products/firebase/go_WebApp.yaml @@ -0,0 +1,131 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'WebApp' +description: | + A Google Cloud Firebase web application instance +min_version: 'beta' +references: + guides: + 'Official Documentation': 'https://firebase.google.com/' + api: 'https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps' +docs: +base_url: 'projects/{{project}}/webApps' +self_link: 'projects/{{project}}/webApps/{{app_id}}' +update_verb: 'PATCH' +update_mask: true +delete_url: 'projects/{{project}}/webApps/{{app_id}}:remove' +delete_verb: 'POST' +import_format: + - '{{project}} projects/{{project}}/webApps/{{app_id}}' + - 'projects/{{project}}/webApps/{{app_id}}' + - 'webApps/{{app_id}}' + - '{{app_id}}' +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 +autogen_async: true +async: + actions: ['create', 'delete'] + type: 'OpAsync' + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' +identity: + - appId + - name +custom_code: + custom_delete: 'templates/terraform/custom_delete/go/firebase_app_deletion_policy.tmpl' +skip_sweeper: true +examples: + - name: 'firebase_web_app_basic' + primary_resource_id: 'basic' + min_version: 'beta' + vars: + display_name: 'Display Name Basic' + bucket_name: 'fb-webapp-' + test_env_vars: + project_id: 'PROJECT_NAME' + test_vars_overrides: + 'display_name': '"tf-test Display Name Basic"' + ignore_read_extra: + - 'project' + - 'deletion_policy' + skip_vcr: true + - name: 'firebase_web_app_custom_api_key' + primary_resource_id: 'default' + min_version: 'beta' + vars: + display_name: 'Display Name' + api_key_name: 'api-key' + test_env_vars: + project_id: 'PROJECT_NAME' + ignore_read_extra: + - 'project' + - 'deletion_policy' +virtual_fields: + - name: 'deletion_policy' + description: | + Set to `ABANDON` to allow the WebApp to be untracked from terraform state + rather than deleted upon `terraform destroy`. This is useful becaue the WebApp may be + serving traffic. Set to `DELETE` to delete the WebApp. Default to `DELETE` + type: Enum + default_value: "DELETE" +parameters: +properties: + - name: 'name' + type: String + description: | + The fully qualified resource name of the App, for example: + projects/projectId/webApps/appId + min_version: 'beta' + output: true + - name: 'displayName' + type: String + description: | + The user-assigned display name of the App. + min_version: 'beta' + required: true + - name: 'appId' + type: String + description: | + The globally unique, Firebase-assigned identifier of the App. + This identifier should be treated as an opaque token, as the data format is not specified. + min_version: 'beta' + output: true + - name: 'appUrls' + type: Array + description: | + The URLs where the `WebApp` is hosted. + min_version: 'beta' + output: true + item_type: + type: String + - name: 'apiKeyId' + type: String + description: | + The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the WebApp. + If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the WebApp. + This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned. + min_version: 'beta' + default_from_api: true diff --git a/mmv1/products/firebase/go_product.yaml b/mmv1/products/firebase/go_product.yaml new file mode 100644 index 000000000000..82430fbbb18e --- /dev/null +++ b/mmv1/products/firebase/go_product.yaml @@ -0,0 +1,34 @@ +# Copyright 2024 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. + +# Warning: This is a temporary file, and should not be edited directly +--- +name: 'Firebase' +display_name: 'Firebase' +versions: + - name: 'beta' + base_url: 'https://firebase.googleapis.com/v1beta1/' +scopes: + - 'https://www.googleapis.com/auth/cloud-platform' +async: + type: "OpAsync" + operation: + base_url: '{{op_id}}' + path: 'name' + wait_ms: 1000 + result: + path: 'response' + resource_inside_response: true + error: + path: 'error' + message: 'message' diff --git a/mmv1/templates/terraform/yaml_conversion_field.erb b/mmv1/templates/terraform/yaml_conversion_field.erb index b01805064f0f..386ddcd7932e 100644 --- a/mmv1/templates/terraform/yaml_conversion_field.erb +++ b/mmv1/templates/terraform/yaml_conversion_field.erb @@ -43,7 +43,12 @@ <% unless property.required.nil? -%> required: <%= property.required %> <% end -%> -<% unless property.immutable.nil? -%> +<% if property.name == "labels" && (property.is_a?(Api::Type::KeyValueLabels) || property.is_a?(Api::Type::KeyValueAnnotations)) && property.parent.nil? -%> +<% effective_labels = property.__resource.properties.find{ |p| p.is_a?(Api::Type::KeyValueEffectiveLabels) } -%> +<% unless effective_labels.immutable.nil? -%> + immutable: <%= effective_labels.immutable %> +<% end -%> +<% elsif !property.immutable.nil? -%> immutable: <%= property.immutable %> <% end -%> <% unless property.ignore_read.nil? -%>