diff --git a/mmv1/products/beyondcorp/AppConnection.yaml b/mmv1/products/beyondcorp/AppConnection.yaml index 0fc220e4fe87..9afafa0ebb96 100644 --- a/mmv1/products/beyondcorp/AppConnection.yaml +++ b/mmv1/products/beyondcorp/AppConnection.yaml @@ -12,133 +12,133 @@ # limitations under the License. --- -name: 'AppConnection' -description: - "A BeyondCorp AppConnection resource represents a BeyondCorp protected - AppConnection to a remote application.\nIt creates all the necessary GCP - components needed for creating a BeyondCorp protected AppConnection. - \nMultiple connectors can be authorised for a single AppConnection.\n" +name: AppConnection +description: "A BeyondCorp AppConnection resource represents a BeyondCorp protected AppConnection to a remote application.\nIt creates all the necessary GCP components needed for creating a BeyondCorp protected AppConnection. \nMultiple connectors can be authorised for a single AppConnection.\n" references: guides: - 'Official Documentation': 'https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector' - api: 'https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appconnections' + Official Documentation: https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector + api: https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appconnections docs: -base_url: 'projects/{{project}}/locations/{{region}}/appConnections' -self_link: 'projects/{{project}}/locations/{{region}}/appConnections/{{name}}' -create_url: 'projects/{{project}}/locations/{{region}}/appConnections?app_connection_id={{name}}' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{region}}/appConnections +self_link: projects/{{project}}/locations/{{region}}/appConnections/{{name}} +create_url: projects/{{project}}/locations/{{region}}/appConnections?app_connection_id={{name}} update_mask: true +update_verb: PATCH timeouts: insert_minutes: 30 update_minutes: 30 delete_minutes: 30 -autogen_async: true async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' + type: OpAsync operation: - base_url: '{{op_id}}' timeouts: insert_minutes: 30 update_minutes: 30 delete_minutes: 30 + base_url: '{{op_id}}' + actions: [create, delete, update] result: resource_inside_response: true -custom_code: +autogen_async: true include_in_tgc_next: true -examples: - - name: 'beyondcorp_app_connection_basic' - primary_resource_id: 'app_connection' - vars: - account_id: 'my-account' - app_connector_name: 'my-app-connector' - app_connection_name: 'my-app-connection' - - name: 'beyondcorp_app_connection_full' - primary_resource_id: 'app_connection' - vars: - account_id: 'my-account' - app_gateway_name: 'my-app-gateway' - app_connector_name: 'my-app-connector' - app_connection_name: 'my-app-connection' - display_name: 'some display name' - test_vars_overrides: - # for backward compatible - display_name: '"some display name" + randomSuffix' +custom_code: +samples: + - name: beyondcorp_app_connection_basic + primary_resource_id: app_connection + steps: + - name: beyondcorp_app_connection_basic + resource_id_vars: + account_id: my-account + app_connector_name: my-app-connector + app_connection_name: my-app-connection + - name: beyondcorp_app_connection_full + primary_resource_id: app_connection + steps: + - name: beyondcorp_app_connection_full + resource_id_vars: + account_id: my-account + app_gateway_name: my-app-gateway + app_connector_name: my-app-connector + app_connection_name: my-app-connection + display_name: some display name + test_vars_overrides: + # for backward compatible + display_name: '"some display name" + randomSuffix' parameters: properties: - - name: 'name' + - name: name type: String description: | ID of the AppConnection. url_param_only: true required: true immutable: true - - name: 'region' + - name: region type: String description: | The region of the AppConnection. url_param_only: true immutable: true - - name: 'displayName' + - name: displayName type: String description: | An arbitrary user-provided name for the AppConnection. - - name: 'labels' + - name: labels type: KeyValueLabels description: | Resource labels to represent user provided metadata. - - name: 'type' + - name: type type: String description: | The type of network connectivity used by the AppConnection. Refer to https://cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appConnections#type for a list of possible values. immutable: true - - name: 'applicationEndpoint' + - name: applicationEndpoint type: NestedObject description: | Address of the remote application endpoint for the BeyondCorp AppConnection. required: true properties: - - name: 'host' + - name: host type: String description: | Hostname or IP address of the remote application endpoint. required: true - - name: 'port' + - name: port type: Integer description: | Port of the remote application endpoint. required: true - - name: 'connectors' + - name: connectors type: Array description: | List of AppConnectors that are authorised to be associated with this AppConnection item_type: type: String - - name: 'gateway' + - name: gateway type: NestedObject description: | Gateway used by the AppConnection. default_from_api: true properties: - - name: 'appGateway' + - name: appGateway type: String description: | AppGateway name in following format: projects/{project_id}/locations/{locationId}/appgateways/{gateway_id}. required: true - - name: 'type' + - name: type type: String description: | The type of hosting used by the gateway. Refer to https://cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appConnections#Type_1 for a list of possible values. - - name: 'uri' + - name: uri type: String description: | Server-defined URI for this resource. output: true - - name: 'ingressPort' + - name: ingressPort type: Integer description: | Ingress port reserved on the gateways for this AppConnection, if not specified or zero, the default port is 19443. diff --git a/mmv1/products/beyondcorp/AppConnector.yaml b/mmv1/products/beyondcorp/AppConnector.yaml index d547e657fcc9..004ed86fcd19 100644 --- a/mmv1/products/beyondcorp/AppConnector.yaml +++ b/mmv1/products/beyondcorp/AppConnector.yaml @@ -12,101 +12,100 @@ # limitations under the License. --- -name: 'AppConnector' -description: - "A BeyondCorp AppConnector resource represents an application facing component - deployed proximal to \nand with direct access to the application instances. It - is used to establish connectivity between the \nremote enterprise environment - and GCP. It initiates connections to the applications and can proxy the \ndata - from users over the connection.\n" +name: AppConnector +description: "A BeyondCorp AppConnector resource represents an application facing component deployed proximal to \nand with direct access to the application instances. It is used to establish connectivity between the \nremote enterprise environment and GCP. It initiates connections to the applications and can proxy the \ndata from users over the connection.\n" references: guides: - 'Official Documentation': 'https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector' - api: 'https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appconnectors' + Official Documentation: https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector + api: https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appconnectors docs: -base_url: 'projects/{{project}}/locations/{{region}}/appConnectors' -self_link: 'projects/{{project}}/locations/{{region}}/appConnectors/{{name}}' -create_url: 'projects/{{project}}/locations/{{region}}/appConnectors?app_connector_id={{name}}' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{region}}/appConnectors +self_link: projects/{{project}}/locations/{{region}}/appConnectors/{{name}} +create_url: projects/{{project}}/locations/{{region}}/appConnectors?app_connector_id={{name}} update_mask: true +update_verb: PATCH timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -autogen_async: true async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' + type: OpAsync operation: base_url: '{{op_id}}' + actions: [create, delete, update] result: resource_inside_response: true -custom_code: +autogen_async: true include_in_tgc_next: true -examples: - - name: 'beyondcorp_app_connector_basic' - primary_resource_id: 'app_connector' - vars: - app_connector_name: 'my-app-connector' - account_id: 'my-account' - - name: 'beyondcorp_app_connector_full' - primary_resource_id: 'app_connector' - vars: - app_connector_name: 'my-app-connector' - account_id: 'my-account' - display_name: 'some display name' - test_vars_overrides: - # for backward compatible - display_name: '"some display name" + randomSuffix' +custom_code: +samples: + - name: beyondcorp_app_connector_basic + primary_resource_id: app_connector + steps: + - name: beyondcorp_app_connector_basic + resource_id_vars: + app_connector_name: my-app-connector + account_id: my-account + - name: beyondcorp_app_connector_full + primary_resource_id: app_connector + steps: + - name: beyondcorp_app_connector_full + resource_id_vars: + app_connector_name: my-app-connector + account_id: my-account + display_name: some display name + test_vars_overrides: + # for backward compatible + display_name: '"some display name" + randomSuffix' parameters: properties: - - name: 'name' + - name: name type: String description: | ID of the AppConnector. url_param_only: true required: true immutable: true - - name: 'region' + - name: region type: String description: | The region of the AppConnector. url_param_only: true immutable: true - - name: 'displayName' + - name: displayName type: String description: | An arbitrary user-provided name for the AppConnector. - - name: 'labels' + - name: labels type: KeyValueLabels description: | Resource labels to represent user provided metadata. - - name: 'principalInfo' + - name: principalInfo type: NestedObject description: | Principal information about the Identity of the AppConnector. required: true properties: - - name: 'serviceAccount' + - name: serviceAccount type: NestedObject description: | ServiceAccount represents a GCP service account. required: true properties: - - name: 'email' + - name: email type: String description: | Email address of the service account. required: true - - name: 'state' + - name: state type: Enum description: | Represents the different states of a AppConnector. output: true enum_values: - - 'STATE_UNSPECIFIED' - - 'CREATING' - - 'CREATED' - - 'UPDATING' - - 'DELETING' - - 'DOWN' + - STATE_UNSPECIFIED + - CREATING + - CREATED + - UPDATING + - DELETING + - DOWN diff --git a/mmv1/products/beyondcorp/AppGateway.yaml b/mmv1/products/beyondcorp/AppGateway.yaml index 556192cbe44b..ae798cc290ef 100644 --- a/mmv1/products/beyondcorp/AppGateway.yaml +++ b/mmv1/products/beyondcorp/AppGateway.yaml @@ -12,122 +12,122 @@ # limitations under the License. --- -name: 'AppGateway' -description: "A BeyondCorp AppGateway resource represents a BeyondCorp protected - AppGateway to a remote application. It creates \nall the necessary GCP - components needed for creating a BeyondCorp protected AppGateway. Multiple - connectors can be \n\ - authorised for a single AppGateway.\n" +name: AppGateway +description: "A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates \nall the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be \nauthorised for a single AppGateway.\n" references: guides: - 'Official Documentation': 'https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector' - api: 'https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appgateways' + Official Documentation: https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector + api: https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appgateways docs: -base_url: 'projects/{{project}}/locations/{{region}}/appGateways' -self_link: 'projects/{{project}}/locations/{{region}}/appGateways/{{name}}' -create_url: 'projects/{{project}}/locations/{{region}}/appGateways?app_gateway_id={{name}}' +base_url: projects/{{project}}/locations/{{region}}/appGateways # This resources is not updatable immutable: true +self_link: projects/{{project}}/locations/{{region}}/appGateways/{{name}} +create_url: projects/{{project}}/locations/{{region}}/appGateways?app_gateway_id={{name}} timeouts: insert_minutes: 40 update_minutes: 40 delete_minutes: 40 -autogen_async: true async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' + type: OpAsync operation: - base_url: '{{op_id}}' timeouts: insert_minutes: 40 update_minutes: 40 delete_minutes: 40 + base_url: '{{op_id}}' + actions: [create, delete, update] result: resource_inside_response: true -custom_code: -include_in_tgc_next: true schema_version: 1 state_upgraders: true -examples: - - name: 'beyondcorp_app_gateway_basic' - primary_resource_id: 'app_gateway' - vars: - app_gateway_name: 'my-app-gateway' - - name: 'beyondcorp_app_gateway_full' - primary_resource_id: 'app_gateway' - vars: - app_gateway_name: 'my-app-gateway' - display_name: 'some display name' - test_vars_overrides: - # for backward compatible - display_name: '"some display name" + randomSuffix' +autogen_async: true +include_in_tgc_next: true +custom_code: +samples: + - name: beyondcorp_app_gateway_basic + primary_resource_id: app_gateway + steps: + - name: beyondcorp_app_gateway_basic + resource_id_vars: + app_gateway_name: my-app-gateway + - name: beyondcorp_app_gateway_full + primary_resource_id: app_gateway + steps: + - name: beyondcorp_app_gateway_full + resource_id_vars: + app_gateway_name: my-app-gateway + display_name: some display name + test_vars_overrides: + # for backward compatible + display_name: '"some display name" + randomSuffix' parameters: properties: - - name: 'name' + - name: name type: String description: | ID of the AppGateway. url_param_only: true required: true immutable: true - - name: 'region' + - name: region type: String description: | The region of the AppGateway. url_param_only: true immutable: true - - name: 'type' + - name: type type: Enum description: | The type of network connectivity used by the AppGateway. - default_value: "TYPE_UNSPECIFIED" + default_value: TYPE_UNSPECIFIED enum_values: - - 'TYPE_UNSPECIFIED' - - 'TCP_PROXY' - - name: 'hostType' + - TYPE_UNSPECIFIED + - TCP_PROXY + - name: hostType type: Enum description: | The type of hosting used by the AppGateway. - default_value: "HOST_TYPE_UNSPECIFIED" + default_value: HOST_TYPE_UNSPECIFIED enum_values: - - 'HOST_TYPE_UNSPECIFIED' - - 'GCP_REGIONAL_MIG' - - name: 'displayName' + - HOST_TYPE_UNSPECIFIED + - GCP_REGIONAL_MIG + - name: displayName type: String description: | An arbitrary user-provided name for the AppGateway. - - name: 'labels' + - name: labels type: KeyValueLabels description: | Resource labels to represent user provided metadata. - - name: 'state' + - name: state type: Enum description: | Represents the different states of a AppGateway. output: true enum_values: - - 'STATE_UNSPECIFIED' - - 'CREATING' - - 'CREATED' - - 'UPDATING' - - 'DELETING' - - 'DOWN' - - name: 'uri' + - STATE_UNSPECIFIED + - CREATING + - CREATED + - UPDATING + - DELETING + - DOWN + - name: uri type: String description: | Server-defined URI for this resource. output: true - - name: 'allocatedConnections' + - name: allocatedConnections type: NestedObject description: | A list of connections allocated for the Gateway. output: true properties: - - name: 'pscUri' + - name: pscUri type: String description: | The PSC uri of an allocated connection. - - name: 'ingressPort' + - name: ingressPort type: Integer description: | The ingress port of an allocated connection. diff --git a/mmv1/products/beyondcorp/SecurityGateway.yaml b/mmv1/products/beyondcorp/SecurityGateway.yaml index c8e415ef1585..99af7586bbfc 100644 --- a/mmv1/products/beyondcorp/SecurityGateway.yaml +++ b/mmv1/products/beyondcorp/SecurityGateway.yaml @@ -15,42 +15,23 @@ name: SecurityGateway description: Deployment of Security Gateway. base_url: projects/{{project}}/locations/{{location}}/securityGateways -update_mask: true self_link: projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} create_url: projects/{{project}}/locations/{{location}}/securityGateways?securityGatewayId={{security_gateway_id}} +update_mask: true update_verb: PATCH -id_format: projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} -import_format: - - projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} iam_policy: method_name_separator: ':' - iam_conditions_request_type: 'QUERY_PARAM_NESTED' - allowed_iam_role: 'roles/beyondcorp.securityGatewayUser' - parent_resource_attribute: 'security_gateway_id' + allowed_iam_role: roles/beyondcorp.securityGatewayUser + parent_resource_attribute: security_gateway_id + iam_conditions_request_type: QUERY_PARAM_NESTED import_format: - - 'projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}}' + - projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} - '{{security_gateway_id}}' -examples: - - name: beyondcorp_security_gateway_basic - primary_resource_id: example - region_override: 'global' - vars: - security_gateway_name: default - test_vars_overrides: - # for backward compatible - security_gateway_name: '"default" + randomSuffix' - - name: beyondcorp_security_gateway_logging - primary_resource_id: example-logging - region_override: 'global' - vars: - security_gateway_name: default-logging - - name: beyondcorp_security_gateway_spa - primary_resource_id: example-spa - region_override: 'global' - vars: - security_gateway_name: default-spa -autogen_async: true +id_format: projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} +import_format: + - projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}} async: + type: OpAsync operation: timeouts: insert_minutes: 20 @@ -61,13 +42,38 @@ async: - create - delete - update - type: OpAsync result: resource_inside_response: true include_project: false autogen_status: U2VjdXJpdHlHYXRld2F5 +autogen_async: true custom_code: - constants: 'templates/terraform/constants/beyondcorp_security_gateway.go.tmpl' + constants: templates/terraform/constants/beyondcorp_security_gateway.go.tmpl +samples: + - name: beyondcorp_security_gateway_basic + primary_resource_id: example + region_override: global + steps: + - name: beyondcorp_security_gateway_basic + resource_id_vars: + security_gateway_name: default + test_vars_overrides: + # for backward compatible + security_gateway_name: '"default" + randomSuffix' + - name: beyondcorp_security_gateway_logging + primary_resource_id: example-logging + region_override: global + steps: + - name: beyondcorp_security_gateway_logging + resource_id_vars: + security_gateway_name: default-logging + - name: beyondcorp_security_gateway_spa + primary_resource_id: example-spa + region_override: global + steps: + - name: beyondcorp_security_gateway_spa + resource_id_vars: + security_gateway_name: default-spa parameters: - name: location type: String @@ -75,9 +81,9 @@ parameters: deprecation_message: '`location` is deprecated and will be removed in a future major release.' immutable: true url_param_only: true - default_value: 'global' + default_value: global validation: - regex: '^global$' + regex: ^global$ required: false - name: securityGatewayId type: String @@ -117,7 +123,7 @@ properties: Optional. Map of Hubs that represents regional data path deployment with GCP region as a key. key_name: region - set_hash_func: 'beyondcorpSecurityGatewayHubsHash' + set_hash_func: beyondcorpSecurityGatewayHubsHash value_type: type: NestedObject properties: @@ -151,8 +157,7 @@ properties: output: true - name: delegatingServiceAccount type: String - description: |- - Service account used for operations that involve resources in consumer projects. + description: Service account used for operations that involve resources in consumer projects. output: true - name: proxyProtocolConfig type: NestedObject @@ -175,9 +180,9 @@ properties: type: Enum description: The output type of the delegated user info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: groupInfo type: NestedObject description: Group info configuration. @@ -186,9 +191,9 @@ properties: type: Enum description: The output type of the delegated group info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: deviceInfo type: NestedObject description: Device info configuration. @@ -197,16 +202,16 @@ properties: type: Enum description: The output type of the delegated device info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: outputType type: Enum description: Default output type for all enabled headers. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: metadataHeaders type: KeyValuePairs description: |- @@ -219,7 +224,7 @@ properties: type: Enum description: Gateway identity configuration. enum_values: - - 'RESOURCE_NAME' + - RESOURCE_NAME - name: clientIp type: Boolean description: Client IP configuration. The client IP address is included if true. @@ -245,5 +250,4 @@ properties: send_empty_value: true allow_empty_object: true description: Settings related to Cloud Logging. - properties: - [] # Meant to be an empty object with no properties for now. + properties: [] # Meant to be an empty object with no properties for now. diff --git a/mmv1/products/beyondcorp/SecurityGatewayApplication.yaml b/mmv1/products/beyondcorp/SecurityGatewayApplication.yaml index d35ff9b9f568..0437c46de345 100644 --- a/mmv1/products/beyondcorp/SecurityGatewayApplication.yaml +++ b/mmv1/products/beyondcorp/SecurityGatewayApplication.yaml @@ -15,44 +15,23 @@ name: SecurityGatewayApplication description: Specifies application endpoint(s) to protect behind a Security Gateway. base_url: projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications -update_mask: true self_link: projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} create_url: projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications?applicationId={{application_id}} +update_mask: true update_verb: PATCH -id_format: projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} -import_format: - - projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} iam_policy: method_name_separator: ':' - iam_conditions_request_type: 'QUERY_PARAM_NESTED' - allowed_iam_role: 'roles/beyondcorp.securityGatewayUser' - parent_resource_attribute: 'application_id' + allowed_iam_role: roles/beyondcorp.securityGatewayUser + parent_resource_attribute: application_id + iam_conditions_request_type: QUERY_PARAM_NESTED import_format: - - 'projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}}' + - projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} - '{{application_id}}' -examples: - - name: beyondcorp_security_gateway_application_basic - primary_resource_id: example - vars: - security_gateway_name: default-sg - application_name: google-sga - - name: beyondcorp_security_gateway_application_vpc - primary_resource_id: example - vars: - security_gateway_name: default-sg - application_name: my-vm-service2 - - name: beyondcorp_security_gateway_application_spa_api - primary_resource_id: example-spa - vars: - security_gateway_name: default-sg-spa-api - application_discovery_name: app-discovery - - name: beyondcorp_security_gateway_application_spa_proxy - primary_resource_id: example-spa - vars: - security_gateway_name: default-sg-spa-proxy - application_proxy_name: app-proxy -autogen_async: true +id_format: projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} +import_format: + - projects/{{project}}/locations/global/securityGateways/{{security_gateway_id}}/applications/{{application_id}} async: + type: OpAsync operation: timeouts: insert_minutes: 20 @@ -63,11 +42,40 @@ async: - create - delete - update - type: OpAsync result: resource_inside_response: true include_project: false autogen_status: QXBwbGljYXRpb24= +autogen_async: true +samples: + - name: beyondcorp_security_gateway_application_basic + primary_resource_id: example + steps: + - name: beyondcorp_security_gateway_application_basic + resource_id_vars: + security_gateway_name: default-sg + application_name: google-sga + - name: beyondcorp_security_gateway_application_vpc + primary_resource_id: example + steps: + - name: beyondcorp_security_gateway_application_vpc + resource_id_vars: + security_gateway_name: default-sg + application_name: my-vm-service2 + - name: beyondcorp_security_gateway_application_spa_api + primary_resource_id: example-spa + steps: + - name: beyondcorp_security_gateway_application_spa_api + resource_id_vars: + security_gateway_name: default-sg-spa-api + application_discovery_name: app-discovery + - name: beyondcorp_security_gateway_application_spa_proxy + primary_resource_id: example-spa + steps: + - name: beyondcorp_security_gateway_application_spa_proxy + resource_id_vars: + security_gateway_name: default-sg-spa-proxy + application_proxy_name: app-proxy parameters: - name: securityGatewayId type: String @@ -191,9 +199,9 @@ properties: type: Enum description: The output type of the delegated user info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: groupInfo type: NestedObject send_empty_value: true @@ -204,9 +212,9 @@ properties: type: Enum description: The output type of the delegated group info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: deviceInfo type: NestedObject send_empty_value: true @@ -217,16 +225,16 @@ properties: type: Enum description: The output type of the delegated device info. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: outputType type: Enum description: Default output type for all enabled headers. enum_values: - - 'PROTOBUF' - - 'JSON' - - 'NONE' + - PROTOBUF + - JSON + - NONE - name: metadataHeaders type: KeyValuePairs description: |- @@ -239,7 +247,7 @@ properties: type: Enum description: Gateway identity configuration. enum_values: - - 'RESOURCE_NAME' + - RESOURCE_NAME - name: clientIp type: Boolean description: Client IP configuration. The client IP address is included if true. @@ -247,8 +255,8 @@ properties: type: Enum description: Type of the external application. enum_values: - - 'PROXY_GATEWAY' - - 'API_GATEWAY' + - PROXY_GATEWAY + - API_GATEWAY - name: name type: String description: Identifier. Name of the resource. diff --git a/mmv1/products/biglake/Catalog.yaml b/mmv1/products/biglake/Catalog.yaml index 4ed53a7ee5af..dde80a54e5a9 100644 --- a/mmv1/products/biglake/Catalog.yaml +++ b/mmv1/products/biglake/Catalog.yaml @@ -12,40 +12,42 @@ # limitations under the License. --- -name: 'Catalog' +name: Catalog description: | Catalogs are top-level containers for Databases and Tables. references: guides: - 'Manage open source metadata with BigLake Metastore': 'https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_catalogs' - api: 'https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs' + Manage open source metadata with BigLake Metastore: https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_catalogs + api: https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs docs: -base_url: 'projects/{{project}}/locations/{{location}}/catalogs' -self_link: 'projects/{{project}}/locations/{{location}}/catalogs/{{name}}' -create_url: 'projects/{{project}}/locations/{{location}}/catalogs?catalogId={{name}}' +base_url: projects/{{project}}/locations/{{location}}/catalogs immutable: true +self_link: projects/{{project}}/locations/{{location}}/catalogs/{{name}} +create_url: projects/{{project}}/locations/{{location}}/catalogs?catalogId={{name}} timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -custom_code: sweeper: url_substitutions: - - region: "US" -examples: - - name: 'bigquery_biglake_catalog' - primary_resource_id: 'default' - vars: - name: 'my_catalog' + - region: US +custom_code: +samples: + - name: bigquery_biglake_catalog + primary_resource_id: default + steps: + - name: bigquery_biglake_catalog + resource_id_vars: + name: my_catalog parameters: - - name: 'location' + - name: location type: String description: | The geographic location where the Catalog should reside. url_param_only: true required: true immutable: true - - name: 'name' + - name: name type: String description: | The name of the Catalog. Format: @@ -54,28 +56,28 @@ parameters: required: true immutable: true properties: - - name: 'createTime' + - name: createTime type: String description: | Output only. The creation time of the catalog. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. output: true - - name: 'updateTime' + - name: updateTime type: String description: | Output only. The last modification time of the catalog. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. output: true - - name: 'deleteTime' + - name: deleteTime type: String description: | Output only. The deletion time of the catalog. Only set after the catalog is deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. output: true - - name: 'expireTime' + - name: expireTime type: String description: | Output only. The time when this catalog is considered expired. Only set diff --git a/mmv1/products/biglake/Database.yaml b/mmv1/products/biglake/Database.yaml index 911f9f52a8c5..c1ceb80d9621 100644 --- a/mmv1/products/biglake/Database.yaml +++ b/mmv1/products/biglake/Database.yaml @@ -12,20 +12,20 @@ # limitations under the License. --- -name: 'Database' +name: Database description: | Databases are containers of tables. references: guides: - 'Manage open source metadata with BigLake Metastore': 'https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_databases' - api: 'https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs.databases' + Manage open source metadata with BigLake Metastore: https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_databases + api: https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs.databases docs: -id_format: '{{catalog}}/databases/{{name}}' base_url: '{{catalog}}/databases' self_link: '{{catalog}}/databases/{{name}}' create_url: '{{catalog}}/databases?databaseId={{name}}' -update_verb: 'PATCH' update_mask: true +update_verb: PATCH +id_format: '{{catalog}}/databases/{{name}}' import_format: - '{{%catalog}}/databases/{{name}}' timeouts: @@ -33,22 +33,24 @@ timeouts: update_minutes: 20 delete_minutes: 20 custom_code: -examples: - - name: 'biglake_database' - primary_resource_id: 'database' - vars: - name: 'my_database' - catalog_id: 'my_catalog' - bucket_id: 'my_bucket' +samples: + - name: biglake_database + primary_resource_id: database + steps: + - name: biglake_database + resource_id_vars: + name: my_database + catalog_id: my_catalog + bucket_id: my_bucket parameters: - - name: 'catalog' + - name: catalog type: String description: | The parent catalog. url_param_only: true required: true immutable: true - - name: 'name' + - name: name type: String description: | The name of the database. @@ -56,7 +58,7 @@ parameters: required: true immutable: true properties: - - name: 'createTime' + - name: createTime type: String description: | Output only. The creation time of the database. A timestamp in RFC3339 @@ -64,7 +66,7 @@ properties: digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'updateTime' + - name: updateTime type: String description: | Output only. The last modification time of the database. A timestamp in @@ -72,7 +74,7 @@ properties: fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'deleteTime' + - name: deleteTime type: String description: | Output only. The deletion time of the database. Only set after the @@ -80,7 +82,7 @@ properties: nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'expireTime' + - name: expireTime type: String description: | Output only. The time when this database is considered expired. Only set @@ -88,22 +90,22 @@ properties: 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: 'type' + - name: type type: String description: | The database type. required: true - - name: 'hiveOptions' + - name: hiveOptions type: NestedObject description: | Options of a Hive database. required: true properties: - - name: 'locationUri' + - name: locationUri type: String description: | Cloud Storage folder URI where the database data is stored, starting with "gs://". - - name: 'parameters' + - name: parameters type: KeyValuePairs description: | Stores user supplied Hive database parameters. An object containing a diff --git a/mmv1/products/biglake/Table.yaml b/mmv1/products/biglake/Table.yaml index cd8376bddf49..30a416df57f6 100644 --- a/mmv1/products/biglake/Table.yaml +++ b/mmv1/products/biglake/Table.yaml @@ -12,20 +12,20 @@ # limitations under the License. --- -name: 'Table' +name: Table description: | Represents a table. references: guides: - 'Manage open source metadata with BigLake Metastore': 'https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_tables' - api: 'https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs.databases.tables' + Manage open source metadata with BigLake Metastore: https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_tables + api: https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs.databases.tables docs: -id_format: '{{database}}/tables/{{name}}' base_url: '{{database}}/tables' self_link: '{{database}}/tables/{{name}}' create_url: '{{database}}/tables?tableId={{name}}' -update_verb: 'PATCH' update_mask: true +update_verb: PATCH +id_format: '{{database}}/tables/{{name}}' import_format: - '{{%database}}/tables/{{name}}' timeouts: @@ -33,16 +33,18 @@ timeouts: update_minutes: 20 delete_minutes: 20 custom_code: -examples: - - name: 'biglake_table' - primary_resource_id: 'table' - vars: - name: 'my_table' - catalog: 'my_catalog' - database: 'my_database' - bucket: 'my_bucket' +samples: + - name: biglake_table + primary_resource_id: table + steps: + - name: biglake_table + resource_id_vars: + name: my_table + catalog: my_catalog + database: my_database + bucket: my_bucket parameters: - - name: 'name' + - name: name type: String description: | Output only. The name of the Table. Format: @@ -50,14 +52,14 @@ parameters: url_param_only: true required: true immutable: true - - name: 'database' + - name: database type: String description: | The id of the parent database. url_param_only: true immutable: true properties: - - name: 'createTime' + - name: createTime type: String description: | Output only. The creation time of the table. A timestamp in RFC3339 UTC @@ -65,7 +67,7 @@ properties: digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'updateTime' + - name: updateTime type: String description: | Output only. The last modification time of the table. A timestamp in @@ -73,7 +75,7 @@ properties: fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'deleteTime' + - name: deleteTime type: String description: | Output only. The deletion time of the table. Only set after the @@ -81,7 +83,7 @@ properties: nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". output: true - - name: 'expireTime' + - name: expireTime type: String description: | Output only. The time when this table is considered expired. Only set @@ -89,7 +91,7 @@ properties: 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: 'etag' + - name: etag type: String description: | The checksum of a table object computed by the server based on the value @@ -97,41 +99,41 @@ properties: has an up-to-date value before proceeding. It is only checked for update table operations. output: true - - name: 'type' + - name: type type: Enum description: | The database type. enum_values: - - 'HIVE' - - name: 'hiveOptions' + - HIVE + - name: hiveOptions type: NestedObject description: | Options of a Hive table. properties: - - name: 'parameters' + - name: parameters type: KeyValuePairs description: | Stores user supplied Hive table parameters. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - - name: 'tableType' + - name: tableType type: String description: | Hive table type. For example, MANAGED_TABLE, EXTERNAL_TABLE. - - name: 'storageDescriptor' + - name: storageDescriptor type: NestedObject description: | Stores physical storage information on the data. properties: - - name: 'locationUri' + - name: locationUri type: String description: | Cloud Storage folder URI where the table data is stored, starting with "gs://". - - name: 'inputFormat' + - name: inputFormat type: String description: | The fully qualified Java class name of the input format. - - name: 'outputFormat' + - name: outputFormat type: String description: | The fully qualified Java class name of the output format. diff --git a/mmv1/products/biglakeiceberg/IcebergCatalog.yaml b/mmv1/products/biglakeiceberg/IcebergCatalog.yaml index 9ad088953350..7c6b7ea8f8ff 100644 --- a/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +++ b/mmv1/products/biglakeiceberg/IcebergCatalog.yaml @@ -12,12 +12,12 @@ # limitations under the License. --- -name: 'IcebergCatalog' +name: IcebergCatalog description: | IcebergCatalogs are top-level containers for Apache Iceberg REST Catalog served Namespaces and Tables. references: guides: - 'Use the BigLake metastore Iceberg REST catalog': 'https://docs.cloud.google.com/biglake/docs/blms-rest-catalog' + Use the BigLake metastore Iceberg REST catalog: https://docs.cloud.google.com/biglake/docs/blms-rest-catalog docs: warning: | If you are using User ADCs (Application Default Credentials) with this resource's IAM, @@ -25,40 +25,43 @@ docs: in the provider configuration. Otherwise the IAM API will return 403s. Your account must have the `serviceusage.services.use` permission on the `billing_project` you defined. -supports_indirect_user_project_override: true -base_url: 'iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs' -self_link: 'iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}' +base_url: iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs immutable: false -create_url: 'iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs?iceberg-catalog-id={{name}}&primary_location={{primary_location}}' -custom_code: - custom_update: - templates/terraform/custom_update/biglake_iceberg_catalog_update.go.tmpl +self_link: iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}} +create_url: iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs?iceberg-catalog-id={{name}}&primary_location={{primary_location}} iam_policy: - base_url: 'v1/projects/{{project}}/catalogs/{{name}}' - parent_resource_attribute: 'name' - method_name_separator: ":" - fetch_iam_policy_verb: 'GET' + method_name_separator: ':' + fetch_iam_policy_verb: GET + allowed_iam_role: roles/biglake.editor + parent_resource_attribute: name + base_url: v1/projects/{{project}}/catalogs/{{name}} import_format: - - 'projects/{{project}}/catalogs/{{name}}' + - projects/{{project}}/catalogs/{{name}} - '{{name}}' - allowed_iam_role: 'roles/biglake.editor' -examples: - - name: 'biglake_iceberg_catalog' - primary_resource_id: 'my_iceberg_catalog' - vars: - name: 'my_iceberg_catalog' - test_env_vars: - GOOGLE_BILLING_PROJECT: 'PROJECT' - USER_PROJECT_OVERRIDE: 'true' - - name: 'biglake_iceberg_catalog_primary_location' - primary_resource_id: 'my_iceberg_catalog' - vars: - name: 'my_iceberg_catalog' - test_env_vars: - GOOGLE_BILLING_PROJECT: 'PROJECT' - USER_PROJECT_OVERRIDE: 'true' +supports_indirect_user_project_override: true +custom_code: + custom_update: templates/terraform/custom_update/biglake_iceberg_catalog_update.go.tmpl +samples: + - name: biglake_iceberg_catalog + primary_resource_id: my_iceberg_catalog + steps: + - name: biglake_iceberg_catalog + resource_id_vars: + name: my_iceberg_catalog + test_env_vars: + GOOGLE_BILLING_PROJECT: PROJECT + USER_PROJECT_OVERRIDE: "true" + - name: biglake_iceberg_catalog_primary_location + primary_resource_id: my_iceberg_catalog + steps: + - name: biglake_iceberg_catalog_primary_location + resource_id_vars: + name: my_iceberg_catalog + test_env_vars: + GOOGLE_BILLING_PROJECT: PROJECT + USER_PROJECT_OVERRIDE: "true" parameters: - - name: 'name' + - name: name type: String required: true immutable: true @@ -68,7 +71,7 @@ parameters: For CATALOG_TYPE_GCS_BUCKET typed catalogs, the name needs to be the exact same value of the GCS bucket's name. For example, for a bucket: gs://bucket-name, the catalog name will be exactly "bucket-name". - - name: 'primaryLocation' + - name: primaryLocation type: String url_param_only: true immutable: true @@ -77,90 +80,70 @@ parameters: a BigLake-supported location, and it should be proximate to the remote catalog's location. properties: - - name: 'credential_mode' - api_name: 'credential-mode' + - name: credential_mode + api_name: credential-mode type: Enum - description: The credential mode used for the catalog. - CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating - user must have access to the catalog resources and the corresponding Google - Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential - vending. The authenticating user must have access to the catalog resources - and the system will provide the caller with downscoped credentials to access - the Google Cloud Storage files. All table operations in this mode would - require `X-Iceberg-Access-Delegation` header with `vended-credentials` value - included. System will generate a service account and the catalog - administrator must grant the service account appropriate permissions. + description: The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require `X-Iceberg-Access-Delegation` header with `vended-credentials` value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions. required: false immutable: false output: false enum_values: - - 'CREDENTIAL_MODE_END_USER' - - 'CREDENTIAL_MODE_VENDED_CREDENTIALS' + - CREDENTIAL_MODE_END_USER + - CREDENTIAL_MODE_VENDED_CREDENTIALS default_from_api: true - - name: 'biglake_service_account' - api_name: 'biglake-service-account' + - name: biglake_service_account + api_name: biglake-service-account type: String - description: Output only. The service account used for credential vending. It - might be empty if credential vending was never enabled for the catalog. + description: Output only. The service account used for credential vending. It might be empty if credential vending was never enabled for the catalog. output: true - - name: 'catalog_type' - api_name: 'catalog-type' + - name: catalog_type + api_name: catalog-type type: Enum - description: The catalog type of the IcebergCatalog. Currently only supports - the type for Google Cloud Storage Buckets. + description: The catalog type of the IcebergCatalog. Currently only supports the type for Google Cloud Storage Buckets. required: true immutable: true output: false enum_values: - - 'CATALOG_TYPE_GCS_BUCKET' - - name: 'default_location' - api_name: 'default-location' + - CATALOG_TYPE_GCS_BUCKET + - name: default_location + api_name: default-location type: String - description: Output only. The default storage location for the catalog, e.g., - `gs://my-bucket`. + description: Output only. The default storage location for the catalog, e.g., `gs://my-bucket`. output: true - - name: 'storage_regions' - api_name: 'storage-regions' + - name: storage_regions + api_name: storage-regions type: Array item_type: type: String - description: Output only. The GCP region(s) where the physical metadata for - the tables is stored, e.g. `us-central1`, `nam4` or `us`. This will contain - one value for all locations, except for the catalogs that are configured to - use custom dual region buckets. + description: Output only. The GCP region(s) where the physical metadata for the tables is stored, e.g. `us-central1`, `nam4` or `us`. This will contain one value for all locations, except for the catalogs that are configured to use custom dual region buckets. output: true - - name: 'create_time' - api_name: 'create-time' + - name: create_time + api_name: create-time type: String description: Output only. The creation time of the IcebergCatalog. output: true - - name: 'update_time' - api_name: 'update-time' + - name: update_time + api_name: update-time type: String description: Output only. The last modification time of the IcebergCatalog. output: true - - name: 'replicas' + - name: replicas type: Array item_type: type: NestedObject properties: - - name: 'region' + - name: region type: String description: The region of the replica, e.g., `us-east1`. output: true - - name: 'state' + - name: state type: Enum - description: If the IcebergCatalog is replicated to multiple regions, this - describes the current state of the replica. STATE_UNKNOWN - The replica - state is unknown. STATE_PRIMARY - The replica is the writable primary. - STATE_PRIMARY_IN_PROGRESS - The replica has been recently assigned as - the primary, but not all namespaces are writeable yet. STATE_SECONDARY - - The replica is a read-only secondary replica. + description: If the IcebergCatalog is replicated to multiple regions, this describes the current state of the replica. STATE_UNKNOWN - The replica state is unknown. STATE_PRIMARY - The replica is the writable primary. STATE_PRIMARY_IN_PROGRESS - The replica has been recently assigned as the primary, but not all namespaces are writeable yet. STATE_SECONDARY - The replica is a read-only secondary replica. output: true enum_values: - - 'STATE_UNKNOWN' - - 'STATE_PRIMARY' - - 'STATE_PRIMARY_IN_PROGRESS' - - 'STATE_SECONDARY' + - STATE_UNKNOWN + - STATE_PRIMARY + - STATE_PRIMARY_IN_PROGRESS + - STATE_SECONDARY description: Output only. The replicas for the catalog metadata. output: true diff --git a/mmv1/products/biglakeiceberg/IcebergNamespace.yaml b/mmv1/products/biglakeiceberg/IcebergNamespace.yaml index 8c94083fb38b..238ca35a3b98 100644 --- a/mmv1/products/biglakeiceberg/IcebergNamespace.yaml +++ b/mmv1/products/biglakeiceberg/IcebergNamespace.yaml @@ -12,23 +12,45 @@ # limitations under the License. --- -name: 'IcebergNamespace' +name: IcebergNamespace description: | IcebergNamespaces are containers for Apache Iceberg Tables within an IcebergCatalog. -supports_indirect_user_project_override: true -base_url: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces' -self_link: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}' -id_format: 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}' +base_url: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces +immutable: false +self_link: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}} +update_url: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}/properties +update_verb: POST +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: GET + allowed_iam_role: roles/biglake.editor + parent_resource_attribute: namespace_id + sample_config_body: templates/terraform/iam/example_config_body/biglake_iceberg_namespace.tf.tmpl + base_url: v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}} + import_format: + - projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}} + - '{{namespace_id}}' +id_format: projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}} import_format: - - 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}' + - projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}} - '{{project}}/{{catalog}}/{{namespace_id}}' - '{{catalog}}/{{namespace_id}}' -immutable: false +supports_indirect_user_project_override: true custom_code: - constants: 'templates/terraform/constants/biglake_iceberg_namespace.go.tmpl' - update_encoder: 'templates/terraform/encoders/biglake_iceberg_namespace.go.tmpl' + update_encoder: templates/terraform/encoders/biglake_iceberg_namespace.go.tmpl + constants: templates/terraform/constants/biglake_iceberg_namespace.go.tmpl +samples: + - name: biglake_iceberg_namespace + primary_resource_id: my_iceberg_namespace + steps: + - name: biglake_iceberg_namespace + resource_id_vars: + bucket_name: example-bucket + test_env_vars: + GOOGLE_BILLING_PROJECT: PROJECT_NAME + USER_PROJECT_OVERRIDE: "true" parameters: - - name: 'catalog' + - name: catalog type: String required: true immutable: true @@ -36,39 +58,19 @@ parameters: description: | The name of the IcebergCatalog. properties: - - name: 'namespace_id' - api_name: 'namespace' + - name: namespace_id + api_name: namespace type: String description: | The unique identifier of the namespace. required: true immutable: true - custom_expand: 'templates/terraform/custom_expand/biglake_iceberg_namespace_id.go.tmpl' - custom_flatten: 'templates/terraform/custom_flatten/biglake_iceberg_namespace_id.go.tmpl' - - name: 'properties' + custom_expand: templates/terraform/custom_expand/biglake_iceberg_namespace_id.go.tmpl + custom_flatten: templates/terraform/custom_flatten/biglake_iceberg_namespace_id.go.tmpl + - name: properties type: KeyValuePairs description: | User-defined properties for the namespace. required: false default_from_api: true - diff_suppress_func: 'icebergNamespacePropertiesDiffSuppress' -update_verb: 'POST' -update_url: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}/properties' -iam_policy: - base_url: 'v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}' - parent_resource_attribute: 'namespace_id' - method_name_separator: ":" - fetch_iam_policy_verb: 'GET' - import_format: - - 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace_id}}' - - '{{namespace_id}}' - allowed_iam_role: 'roles/biglake.editor' - example_config_body: 'templates/terraform/iam/example_config_body/biglake_iceberg_namespace.tf.tmpl' -examples: - - name: 'biglake_iceberg_namespace' - primary_resource_id: 'my_iceberg_namespace' - vars: - bucket_name: 'example-bucket' - test_env_vars: - GOOGLE_BILLING_PROJECT: 'PROJECT_NAME' - USER_PROJECT_OVERRIDE: 'true' + diff_suppress_func: icebergNamespacePropertiesDiffSuppress diff --git a/mmv1/products/biglakeiceberg/IcebergTable.yaml b/mmv1/products/biglakeiceberg/IcebergTable.yaml index e01be8c9a0fa..ca9b5759d91c 100644 --- a/mmv1/products/biglakeiceberg/IcebergTable.yaml +++ b/mmv1/products/biglakeiceberg/IcebergTable.yaml @@ -12,187 +12,183 @@ # limitations under the License. --- -name: 'IcebergTable' +name: IcebergTable description: | IcebergTables are the primary objects in an IcebergCatalog. -supports_indirect_user_project_override: true -base_url: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables' -self_link: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' -id_format: 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' +base_url: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables +self_link: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} +update_url: iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} +update_verb: POST +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: GET + allowed_iam_role: roles/biglake.editor + parent_resource_attribute: name + sample_config_body: templates/terraform/iam/example_config_body/biglake_iceberg_table.tf.tmpl + base_url: v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} + import_format: + - projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} + - '{{name}}' + additional_parent_resource_attributes: + - catalog + - namespace +id_format: projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} import_format: - - 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' + - projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}} - '{{project}}/{{catalog}}/{{namespace}}/{{name}}' - '{{catalog}}/{{namespace}}/{{name}}' - +supports_indirect_user_project_override: true custom_code: - post_read: 'templates/terraform/post_read/biglake_iceberg_table.go.tmpl' - constants: 'templates/terraform/constants/biglake_iceberg_table.go.tmpl' - update_encoder: 'templates/terraform/encoders/biglake_iceberg_table.go.tmpl' - -update_verb: 'POST' -update_url: 'iceberg/v1/restcatalog/v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' - -iam_policy: - base_url: 'v1/projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' - parent_resource_attribute: 'name' - - - additional_parent_resource_attributes: - - 'catalog' - - 'namespace' - method_name_separator: ":" - fetch_iam_policy_verb: 'GET' - import_format: - - 'projects/{{project}}/catalogs/{{catalog}}/namespaces/{{namespace}}/tables/{{name}}' - - '{{name}}' - allowed_iam_role: 'roles/biglake.editor' - example_config_body: 'templates/terraform/iam/example_config_body/biglake_iceberg_table.tf.tmpl' - -examples: - - name: 'biglake_iceberg_table_basic' - primary_resource_id: 'my_iceberg_table' - vars: - bucket_name: 'my-bucket' - namespace_id: 'my_namespace' - table_name: 'my_table' - - name: 'biglake_iceberg_table_update' - primary_resource_id: 'my_iceberg_table' + update_encoder: templates/terraform/encoders/biglake_iceberg_table.go.tmpl + constants: templates/terraform/constants/biglake_iceberg_table.go.tmpl + post_read: templates/terraform/post_read/biglake_iceberg_table.go.tmpl +samples: + - name: biglake_iceberg_table_basic + primary_resource_id: my_iceberg_table + steps: + - name: biglake_iceberg_table_basic + resource_id_vars: + bucket_name: my-bucket + namespace_id: my_namespace + table_name: my_table + - name: biglake_iceberg_table_update + primary_resource_id: my_iceberg_table skip_test: true - vars: - bucket_name: 'my-bucket' - namespace_id: 'my_namespace' - table_name: 'my_table' - + steps: + - name: biglake_iceberg_table_update + resource_id_vars: + bucket_name: my-bucket + namespace_id: my_namespace + table_name: my_table parameters: - - name: 'catalog' + - name: catalog type: String required: true immutable: true url_param_only: true description: | The name of the IcebergCatalog. - - name: 'namespace' + - name: namespace type: String required: true immutable: true url_param_only: true description: | The parent namespace of the table. - properties: - - name: 'name' + - name: name type: String description: | The name of the table. required: true immutable: true - - name: 'location' + - name: location type: String description: | The location of the table. immutable: true default_from_api: true - - name: 'schema' + - name: schema type: NestedObject required: true description: | The schema of the table. properties: - - name: 'type' + - name: type type: String description: | The type of the schema. - default_value: 'struct' - - name: 'schema_id' - api_name: 'schema-id' + default_value: struct + - name: schema_id + api_name: schema-id type: Integer output: true description: | The unique identifier of the schema. - - name: 'identifier_field_ids' - api_name: 'identifier-field-ids' + - name: identifier_field_ids + api_name: identifier-field-ids type: Array item_type: type: Integer default_from_api: true description: | The field IDs that make up the identifier for the table. - - name: 'fields' + - name: fields type: Array required: true item_type: type: NestedObject properties: - - name: 'id' + - name: id type: Integer required: true description: | The unique identifier of the field. - - name: 'name' + - name: name type: String required: true description: | The name of the field. - - name: 'type' + - name: type type: String required: true description: | The type of the field. - - name: 'required' + - name: required type: Boolean required: true send_empty_value: true description: | Whether the field is required. - - name: 'doc' + - name: doc type: String description: | A description of the field. - - name: 'partition_spec' - api_name: 'partition-spec' + - name: partition_spec + api_name: partition-spec type: NestedObject default_from_api: true description: | The partition spec of the table. properties: - - name: 'spec_id' - api_name: 'spec-id' + - name: spec_id + api_name: spec-id type: Integer output: true description: | The unique identifier of the partition spec. - - name: 'fields' + - name: fields type: Array required: true item_type: type: NestedObject properties: - - name: 'field_id' - api_name: 'field-id' + - name: field_id + api_name: field-id type: Integer output: true description: | The unique identifier of the partition field. - - name: 'source_id' - api_name: 'source-id' + - name: source_id + api_name: source-id type: Integer required: true description: | The source field ID for the partition field. - - name: 'name' + - name: name type: String required: true description: | The name of the partition field. - - name: 'transform' + - name: transform type: String required: true description: | The transform to apply to the source field. - - name: 'properties' + - name: properties type: KeyValuePairs description: | User-defined properties for the table. required: false default_from_api: true - diff_suppress_func: 'icebergTablePropertiesDiffSuppress' + diff_suppress_func: icebergTablePropertiesDiffSuppress diff --git a/mmv1/products/bigqueryanalyticshub/DataExchange.yaml b/mmv1/products/bigqueryanalyticshub/DataExchange.yaml index 11e668b8b298..e1cc85b7b4b7 100644 --- a/mmv1/products/bigqueryanalyticshub/DataExchange.yaml +++ b/mmv1/products/bigqueryanalyticshub/DataExchange.yaml @@ -12,123 +12,124 @@ # limitations under the License. --- -name: 'DataExchange' +name: DataExchange description: A Bigquery Analytics Hub data exchange references: guides: - 'Official Documentation': 'https://cloud.google.com/bigquery/docs/analytics-hub-introduction' - api: 'https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges' + Official Documentation: https://cloud.google.com/bigquery/docs/analytics-hub-introduction + api: https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges docs: -id_format: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/dataExchanges' -self_link: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/dataExchanges?data_exchange_id={{data_exchange_id}}' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{location}}/dataExchanges +self_link: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}} +create_url: projects/{{project}}/locations/{{location}}/dataExchanges?data_exchange_id={{data_exchange_id}} update_mask: true +update_verb: PATCH +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: POST + parent_resource_attribute: data_exchange_id + import_format: + - projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}} + - '{{data_exchange_id}}' +id_format: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}' + - projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}} - '{{data_exchange_id}}' timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -iam_policy: - method_name_separator: ':' - fetch_iam_policy_verb: 'POST' - parent_resource_attribute: 'data_exchange_id' - import_format: - - 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}' - - '{{data_exchange_id}}' -custom_code: sweeper: url_substitutions: - - region: "US" -examples: - - name: 'bigquery_analyticshub_data_exchange_basic' - primary_resource_id: 'data_exchange' - region_override: 'US' - vars: - data_exchange_id: 'my_data_exchange' - desc: 'example data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_data_exchange_dcr' - primary_resource_id: 'data_exchange' - region_override: 'US' - vars: - data_exchange_id: 'dcr_data_exchange' - desc: 'example dcr data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example dcr data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_data_exchange_log_linked_dataset_query_user' - primary_resource_id: 'data_exchange' - region_override: 'US' - vars: - data_exchange_id: 'tf_test_log_email_data_exchange' - description: 'Example for log email test for data exchange' - test_vars_overrides: - # for backward compatible - description: '"Example for log email test for data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_public_data_exchange' - primary_resource_id: 'data_exchange' - region_override: 'US' - vars: - data_exchange_id: 'public_data_exchange' - desc: 'Example for public data exchange' - test_vars_overrides: - # for backward compatible - desc: '"Example for public data exchange" + randomSuffix' + - region: US +custom_code: +samples: + - name: bigquery_analyticshub_data_exchange_basic + primary_resource_id: data_exchange + region_override: US + steps: + - name: bigquery_analyticshub_data_exchange_basic + resource_id_vars: + data_exchange_id: my_data_exchange + desc: example data exchange + test_vars_overrides: + # for backward compatible + desc: '"example data exchange" + randomSuffix' + - name: bigquery_analyticshub_data_exchange_dcr + primary_resource_id: data_exchange + region_override: US + steps: + - name: bigquery_analyticshub_data_exchange_dcr + resource_id_vars: + data_exchange_id: dcr_data_exchange + desc: example dcr data exchange + test_vars_overrides: + # for backward compatible + desc: '"example dcr data exchange" + randomSuffix' + - name: bigquery_analyticshub_data_exchange_log_linked_dataset_query_user + primary_resource_id: data_exchange + region_override: US + steps: + - name: bigquery_analyticshub_data_exchange_log_linked_dataset_query_user + resource_id_vars: + data_exchange_id: tf_test_log_email_data_exchange + description: Example for log email test for data exchange + test_vars_overrides: + # for backward compatible + description: '"Example for log email test for data exchange" + randomSuffix' + - name: bigquery_analyticshub_public_data_exchange + primary_resource_id: data_exchange + region_override: US + steps: + - name: bigquery_analyticshub_public_data_exchange + resource_id_vars: + data_exchange_id: public_data_exchange + desc: Example for public data exchange + test_vars_overrides: + # for backward compatible + desc: '"Example for public data exchange" + randomSuffix' parameters: properties: - - name: 'name' + - name: name type: String description: |- The resource name of the data exchange, for example: "projects/myproject/locations/US/dataExchanges/123" output: true - - name: 'data_exchange_id' + - name: data_exchange_id type: String - description: |- - The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true immutable: true - - name: 'location' + - name: location type: String description: | The name of the location this data exchange. url_param_only: true required: true immutable: true - - name: 'displayName' + - name: displayName type: String - description: |- - Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces. + description: Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces. required: true - - name: 'description' + - name: description type: String - description: |- - Description of the data exchange. - - name: 'primaryContact' + description: Description of the data exchange. + - name: primaryContact type: String - description: |- - Email or URL of the primary point of contact of the data exchange. - - name: 'documentation' + description: Email or URL of the primary point of contact of the data exchange. + - name: documentation type: String - description: |- - Documentation describing the data exchange. - - name: 'listingCount' + description: Documentation describing the data exchange. + - name: listingCount type: Integer - description: |- - Number of listings contained in the data exchange. + description: Number of listings contained in the data exchange. output: true - - name: 'icon' + - name: icon type: String - description: |- - Base64 encoded image representing the data exchange. - - name: 'sharingEnvironmentConfig' + description: Base64 encoded image representing the data exchange. + - name: sharingEnvironmentConfig type: NestedObject description: | Configurable data sharing environment option for a data exchange. @@ -136,7 +137,7 @@ properties: immutable: true default_from_api: true properties: - - name: 'defaultExchangeConfig' + - name: defaultExchangeConfig type: NestedObject description: | Default Analytics Hub data exchange, used for secured data sharing. @@ -144,11 +145,10 @@ properties: send_empty_value: true allow_empty_object: true exactly_one_of: - - 'sharing_environment_config.0.default_exchange_config' - - 'sharing_environment_config.0.dcr_exchange_config' - properties: - [] - - name: 'dcrExchangeConfig' + - sharing_environment_config.0.default_exchange_config + - sharing_environment_config.0.dcr_exchange_config + properties: [] + - name: dcrExchangeConfig type: NestedObject description: | Data Clean Room (DCR), used for privacy-safe and secured data sharing. @@ -156,18 +156,16 @@ properties: send_empty_value: true allow_empty_object: true exactly_one_of: - - 'sharing_environment_config.0.default_exchange_config' - - 'sharing_environment_config.0.dcr_exchange_config' - properties: - [] - - name: 'discoveryType' + - sharing_environment_config.0.default_exchange_config + - sharing_environment_config.0.dcr_exchange_config + properties: [] + - name: discoveryType type: Enum enum_values: - - 'DISCOVERY_TYPE_PRIVATE' - - 'DISCOVERY_TYPE_PUBLIC' + - DISCOVERY_TYPE_PRIVATE + - DISCOVERY_TYPE_PUBLIC default_from_api: true description: Type of discovery on the discovery page for all the listings under this exchange. Cannot be set for a Data Clean Room. Updating this field also updates (overwrites) the discoveryType field for all the listings under this exchange. - - name: 'logLinkedDatasetQueryUserEmail' + - name: logLinkedDatasetQueryUserEmail type: Boolean - description: - If true, subscriber email logging is enabled and all queries on the linked dataset will log the email address of the querying user. Once enabled, this setting cannot be turned off. + description: If true, subscriber email logging is enabled and all queries on the linked dataset will log the email address of the querying user. Once enabled, this setting cannot be turned off. diff --git a/mmv1/products/bigqueryanalyticshub/DataExchangeSubscription.yaml b/mmv1/products/bigqueryanalyticshub/DataExchangeSubscription.yaml index bc965f172b43..ae204845006e 100644 --- a/mmv1/products/bigqueryanalyticshub/DataExchangeSubscription.yaml +++ b/mmv1/products/bigqueryanalyticshub/DataExchangeSubscription.yaml @@ -12,92 +12,91 @@ # limitations under the License. --- -name: 'DataExchangeSubscription' -min_version: beta +name: DataExchangeSubscription api_resource_type_kind: Subscription description: A Bigquery Analytics Hub Data Exchange subscription references: guides: - 'Official Documentation': 'https://cloud.google.com/bigquery/docs/analytics-hub-introduction' - api: 'https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions' + Official Documentation: https://cloud.google.com/bigquery/docs/analytics-hub-introduction + api: https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions docs: note: |- When importing the resource with `terraform import`, provide the destination/subscriber's project and location in the format projects/{{subscriber_project}}/locations/{{subscriber_location}}/subscriptions/{{subscription_id}} -base_url: 'projects/{{project}}/locations/{{location}}/subscriptions' -self_link: 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' -create_url: 'projects/{{data_exchange_project}}/locations/{{data_exchange_location}}/dataExchanges/{{data_exchange_id}}:subscribe' +base_url: projects/{{project}}/locations/{{location}}/subscriptions +min_version: beta +self_link: projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}} +create_url: projects/{{data_exchange_project}}/locations/{{data_exchange_location}}/dataExchanges/{{data_exchange_id}}:subscribe import_format: - - 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' -custom_code: - decoder: 'templates/terraform/decoders/bigqueryanalyticshub_data_exchange_subscription.go.tmpl' - encoder: 'templates/terraform/encoders/bigqueryanalyticshub_data_exchange_subscription.go.tmpl' - post_read: 'templates/terraform/post_read/bigqueryanalyticshub_data_exchange_subscription.go.tmpl' - custom_update: 'templates/terraform/custom_update/bigqueryanalyticshub_data_exchange_subscription.go.tmpl' + - projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}} sweeper: url_substitutions: - - region: "us" -examples: - - name: 'bigquery_analyticshub_dataexchange_subscription_basic' - primary_resource_id: 'subscription' - region_override: 'us' - ignore_read_extra: - - 'last_modify_time' - - 'state' - - 'linked_dataset_map' - - 'linked_resources' - vars: - data_exchange_id: 'my_test_dataexchange' - listing_dataset_id: 'listing_src_dataset' - listing_table_id: 'listing_src_table' - listing_id: 'my_test_listing' - subscription_id: 'my_subscription_id' - subscriber_contact_email: 'testuser@example.com' - # Variables for the Destination Dataset created by the Subscription - destination_dataset_id: 'subscribed_dest_dataset' - destination_dataset_friendly_name: 'Subscribed Destination Dataset' - test_vars_overrides: - # for backward compatible - subscriber_contact_email: '"testuser@example.com" + randomSuffix' - # for backward compatible - destination_dataset_friendly_name: '"Subscribed Destination Dataset" + randomSuffix' + - region: us +custom_code: + encoder: templates/terraform/encoders/bigqueryanalyticshub_data_exchange_subscription.go.tmpl + decoder: templates/terraform/decoders/bigqueryanalyticshub_data_exchange_subscription.go.tmpl + post_read: templates/terraform/post_read/bigqueryanalyticshub_data_exchange_subscription.go.tmpl + custom_update: templates/terraform/custom_update/bigqueryanalyticshub_data_exchange_subscription.go.tmpl +samples: + - name: bigquery_analyticshub_dataexchange_subscription_basic + primary_resource_id: subscription + region_override: us + steps: + - name: bigquery_analyticshub_dataexchange_subscription_basic + ignore_read_extra: + - last_modify_time + - state + - linked_dataset_map + - linked_resources + resource_id_vars: + data_exchange_id: my_test_dataexchange + listing_dataset_id: listing_src_dataset + listing_table_id: listing_src_table + listing_id: my_test_listing + subscription_id: my_subscription_id + subscriber_contact_email: testuser@example.com + # Variables for the Destination Dataset created by the Subscription + destination_dataset_id: subscribed_dest_dataset + destination_dataset_friendly_name: Subscribed Destination Dataset + test_vars_overrides: + # for backward compatible + subscriber_contact_email: '"testuser@example.com" + randomSuffix' + # for backward compatible + destination_dataset_friendly_name: '"Subscribed Destination Dataset" + randomSuffix' virtual_fields: - - name: 'refresh_policy' + - name: refresh_policy type: Enum description: |- - Controls when the subscription is automatically refreshed by the provider. - * `ON_READ`: Default value if not specified. The subscription will be refreshed every time Terraform performs a read operation (e.g., `terraform plan`, `terraform apply`, `terraform refresh`). This ensures the state is always up-to-date. - * `ON_STALE`: The subscription will only be refreshed when its reported `state` (an output-only field from the API) is `STATE_STALE` during a Terraform read operation. - * `NEVER`: The provider will not automatically refresh the subscription. - default_value: 'ON_READ' + Controls when the subscription is automatically refreshed by the provider. + * `ON_READ`: Default value if not specified. The subscription will be refreshed every time Terraform performs a read operation (e.g., `terraform plan`, `terraform apply`, `terraform refresh`). This ensures the state is always up-to-date. + * `ON_STALE`: The subscription will only be refreshed when its reported `state` (an output-only field from the API) is `STATE_STALE` during a Terraform read operation. + * `NEVER`: The provider will not automatically refresh the subscription. + default_value: ON_READ enum_values: - - 'ON_READ' - - 'ON_STALE' - - 'NEVER' + - ON_READ + - ON_STALE + - NEVER parameters: - - name: 'dataExchangeId' + - name: dataExchangeId type: String immutable: true - description: |- - The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true - - name: 'dataExchangeProject' + - name: dataExchangeProject type: String immutable: true - description: |- - The ID of the Google Cloud project where the Data Exchange is located. + description: The ID of the Google Cloud project where the Data Exchange is located. url_param_only: true required: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' - - name: 'dataExchangeLocation' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress + - name: dataExchangeLocation type: String immutable: true - description: |- - The name of the location of the Data Exchange. + description: The name of the location of the Data Exchange. url_param_only: true required: true - - name: 'location' + - name: location type: String immutable: true description: | @@ -106,104 +105,94 @@ parameters: See https://cloud.google.com/bigquery/docs/locations for supported locations. url_param_only: true required: true - custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'subscriptionId' + custom_flatten: templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: subscriptionId type: String immutable: true - description: |- - Name of the subscription to create. + description: Name of the subscription to create. required: true - custom_flatten: 'templates/terraform/custom_flatten/id_from_name.tmpl' - - name: 'subscriberContact' + custom_flatten: templates/terraform/custom_flatten/id_from_name.tmpl + - name: subscriberContact type: String immutable: true - description: |- - Email of the subscriber. - - name: 'destinationDataset' + description: Email of the subscriber. + - name: destinationDataset type: NestedObject immutable: true - description: - BigQuery destination dataset to create for the subscriber. + description: BigQuery destination dataset to create for the subscriber. ignore_read: true properties: - - name: 'location' + - name: location type: String immutable: true description: | The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations. required: true - custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'datasetReference' + custom_flatten: templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: datasetReference type: NestedObject immutable: true required: true description: A reference that identifies the destination dataset. properties: - - name: 'datasetId' + - name: datasetId type: String immutable: true description: A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. required: true - - name: 'projectId' + - name: projectId type: String immutable: true description: The ID of the project containing this dataset. required: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' - - name: 'friendlyName' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress + - name: friendlyName type: String immutable: true description: A descriptive name for the dataset. - - name: 'description' + - name: description type: String immutable: true description: A user-friendly description of the dataset. - - name: 'labels' + - name: labels type: KeyValuePairs immutable: true description: | The labels associated with this dataset. You can use these to organize and group your datasets. properties: - - name: 'name' + - name: name type: String - description: |- - The resource name of the subscription. e.g. "projects/myproject/locations/us/subscriptions/123" + description: The resource name of the subscription. e.g. "projects/myproject/locations/us/subscriptions/123" output: true - - name: 'creationTime' + - name: creationTime type: Time - description: |- - Timestamp when the subscription was created. + description: Timestamp when the subscription was created. output: true - - name: 'lastModifyTime' + - name: lastModifyTime type: Time - description: |- - Timestamp when the subscription was last modified. + description: Timestamp when the subscription was last modified. output: true - - name: 'organizationId' + - name: organizationId type: String - description: |- - Organization of the project this subscription belongs to. + description: Organization of the project this subscription belongs to. output: true - - name: 'organizationDisplayName' + - name: organizationDisplayName type: String - description: |- - Display name of the project of this subscription. + description: Display name of the project of this subscription. output: true - - name: 'state' + - name: state type: String - description: |- - Current state of the subscription. + description: Current state of the subscription. output: true - - name: 'resourceType' + - name: resourceType type: String - description: |- - Listing shared asset type. + description: Listing shared asset type. output: true - - name: 'linkedDatasetMap' + - name: linkedDatasetMap output: true type: Map description: |- @@ -214,25 +203,25 @@ properties: value_type: type: NestedObject properties: - - name: 'listing' + - name: listing type: String description: Output only. Listing for which linked resource is created. output: true - - name: 'linkedDataset' + - name: linkedDataset type: String description: Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linkedDataset output: true exactly_one_of: - - 'linkedDataset' - - 'linkedPubsubSubscription' - - name: 'linkedPubsubSubscription' + - linkedDataset + - linkedPubsubSubscription + - name: linkedPubsubSubscription type: String description: Output only. Name of the Pub/Sub subscription, e.g. projects/subscriberproject/subscriptions/subscriptions/sub_id output: true exactly_one_of: - - 'linkedDataset' - - 'linkedPubsubSubscription' - - name: 'linkedResources' + - linkedDataset + - linkedPubsubSubscription + - name: linkedResources type: Array description: | Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. @@ -240,20 +229,19 @@ properties: item_type: type: NestedObject properties: - - name: 'listing' + - name: listing type: String description: Output only. Listing for which linked resource is created. output: true - - name: 'linkedDataset' + - name: linkedDataset type: String description: Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linkedDataset output: true - - name: 'dataExchange' + - name: dataExchange type: String - description: |- - Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456 + description: Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456 output: true - - name: 'logLinkedDatasetQueryUserEmail' + - name: logLinkedDatasetQueryUserEmail type: Boolean - description: 'Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing.' + description: Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing. output: true diff --git a/mmv1/products/bigqueryanalyticshub/Listing.yaml b/mmv1/products/bigqueryanalyticshub/Listing.yaml index 583fb0d6221f..b6e323e9265a 100644 --- a/mmv1/products/bigqueryanalyticshub/Listing.yaml +++ b/mmv1/products/bigqueryanalyticshub/Listing.yaml @@ -12,273 +12,277 @@ # limitations under the License. --- -name: 'Listing' +name: Listing description: A Bigquery Analytics Hub data exchange listing references: guides: - 'Official Documentation': 'https://cloud.google.com/bigquery/docs/analytics-hub-introduction' - api: 'https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges.listings' + Official Documentation: https://cloud.google.com/bigquery/docs/analytics-hub-introduction + api: https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges.listings docs: -id_format: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings' -self_link: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings?listing_id={{listing_id}}' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings +self_link: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}} +create_url: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings?listing_id={{listing_id}} update_mask: true +update_verb: PATCH +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: POST + parent_resource_attribute: listing_id + import_format: + - projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}} + - '{{listing_id}}' +id_format: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}' + - projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}} timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -iam_policy: - method_name_separator: ':' - fetch_iam_policy_verb: 'POST' - parent_resource_attribute: 'listing_id' - import_format: - - 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}' - - '{{listing_id}}' -custom_code: - pre_update: 'templates/terraform/pre_update/bigqueryanalyticshub_listing.go.tmpl' - pre_delete: 'templates/terraform/pre_delete/bigquery_analytics_hub_listing.go.tmpl' # Skipping the sweeper due to the non-standard base_url exclude_sweeper: true -examples: - - name: 'bigquery_analyticshub_listing_basic' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - desc: 'example data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_listing_restricted' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - desc: 'example data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_listing_dcr' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'dcr_data_exchange' - listing_id: 'dcr_listing' - desc: 'example dcr data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example dcr data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_listing_log_linked_dataset_query_user' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'tf_test_log_email_de' - listing_id: 'tf_test_log_email_listing' - dataset_id: 'tf_test_log_email_ds' - description: 'Example for log email test' - test_vars_overrides: - # for backward compatible - description: '"Example for log email test" + randomSuffix' - - name: 'bigquery_analyticshub_listing_pubsub' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'tf_test_pubsub_data_exchange' - listing_id: 'tf_test_pubsub_listing' - pubsub_topic_name: 'test_pubsub' - description: 'Example for pubsub topic source' - test_vars_overrides: - # for backward compatible - description: '"Example for pubsub topic source" + randomSuffix' - - name: 'bigquery_analyticshub_listing_dcr_routine' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'tf_test_data_exchange' - listing_id: 'tf_test_listing_routine' - dataset_id: 'tf_test_dataset' - routine_id: 'tf_test_routine' - desc: 'Example for listing with routine' - test_vars_overrides: - # for backward compatible - desc: '"Example for listing with routine" + randomSuffix' - - name: 'bigquery_analyticshub_public_listing' - primary_resource_id: 'listing' - region_override: 'US' - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - desc: 'example public listing' - test_vars_overrides: - # for backward compatible - desc: '"example public listing" + randomSuffix' - - name: 'bigquery_analyticshub_listing_marketplace' - primary_resource_id: 'listing' - region_override: 'us' - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - desc: 'example data exchange' - test_vars_overrides: - # for backward compatible - desc: '"example data exchange" + randomSuffix' - ignore_read_extra: - - 'delete_commercial' - - name: 'bigquery_analyticshub_listing_multiregion' - primary_resource_id: 'listing' +custom_code: + pre_update: templates/terraform/pre_update/bigqueryanalyticshub_listing.go.tmpl + pre_delete: templates/terraform/pre_delete/bigquery_analytics_hub_listing.go.tmpl +samples: + - name: bigquery_analyticshub_listing_basic + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_basic + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + desc: example data exchange + test_vars_overrides: + # for backward compatible + desc: '"example data exchange" + randomSuffix' + - name: bigquery_analyticshub_listing_restricted + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_restricted + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + desc: example data exchange + test_vars_overrides: + # for backward compatible + desc: '"example data exchange" + randomSuffix' + - name: bigquery_analyticshub_listing_dcr + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_dcr + resource_id_vars: + data_exchange_id: dcr_data_exchange + listing_id: dcr_listing + desc: example dcr data exchange + test_vars_overrides: + # for backward compatible + desc: '"example dcr data exchange" + randomSuffix' + - name: bigquery_analyticshub_listing_log_linked_dataset_query_user + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_log_linked_dataset_query_user + resource_id_vars: + data_exchange_id: tf_test_log_email_de + listing_id: tf_test_log_email_listing + dataset_id: tf_test_log_email_ds + description: Example for log email test + test_vars_overrides: + # for backward compatible + description: '"Example for log email test" + randomSuffix' + - name: bigquery_analyticshub_listing_pubsub + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_pubsub + resource_id_vars: + data_exchange_id: tf_test_pubsub_data_exchange + listing_id: tf_test_pubsub_listing + pubsub_topic_name: test_pubsub + description: Example for pubsub topic source + test_vars_overrides: + # for backward compatible + description: '"Example for pubsub topic source" + randomSuffix' + - name: bigquery_analyticshub_listing_dcr_routine + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_listing_dcr_routine + resource_id_vars: + data_exchange_id: tf_test_data_exchange + listing_id: tf_test_listing_routine + dataset_id: tf_test_dataset + routine_id: tf_test_routine + desc: Example for listing with routine + test_vars_overrides: + # for backward compatible + desc: '"Example for listing with routine" + randomSuffix' + - name: bigquery_analyticshub_public_listing + primary_resource_id: listing + region_override: US + steps: + - name: bigquery_analyticshub_public_listing + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + desc: example public listing + test_vars_overrides: + # for backward compatible + desc: '"example public listing" + randomSuffix' + - name: bigquery_analyticshub_listing_marketplace + primary_resource_id: listing + region_override: us + steps: + - name: bigquery_analyticshub_listing_marketplace + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + desc: example data exchange + test_vars_overrides: + # for backward compatible + desc: '"example data exchange" + randomSuffix' + ignore_read_extra: + - delete_commercial + - name: bigquery_analyticshub_listing_multiregion + primary_resource_id: listing exclude_test: true - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - description: 'example listing for multiregion' - test_vars_overrides: - # for backward compatible - description: '"example listing for multiregion" + randomSuffix' + steps: + - name: bigquery_analyticshub_listing_multiregion + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + description: example listing for multiregion + test_vars_overrides: + # for backward compatible + description: '"example listing for multiregion" + randomSuffix' virtual_fields: - - name: 'delete_commercial' + - name: delete_commercial type: Boolean - description: |- - If the listing is commercial then this field must be set to true, otherwise a failure is thrown. This acts as a safety guard to avoid deleting commercial listings accidentally. + description: If the listing is commercial then this field must be set to true, otherwise a failure is thrown. This acts as a safety guard to avoid deleting commercial listings accidentally. parameters: properties: - - name: 'name' + - name: name type: String - description: |- - The resource name of the listing. e.g. "projects/myproject/locations/US/dataExchanges/123/listings/456" + description: The resource name of the listing. e.g. "projects/myproject/locations/US/dataExchanges/123/listings/456" output: true - - name: 'data_exchange_id' + - name: data_exchange_id type: String - description: |- - The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true immutable: true - - name: 'listing_id' + - name: listing_id type: String - description: |- - The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true immutable: true - - name: 'location' + - name: location type: String description: | The name of the location this data exchange listing. url_param_only: true required: true immutable: true - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'displayName' + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: displayName type: String - description: |- - Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. + description: Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. required: true - - name: 'description' + - name: description type: String - description: |- - Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - - name: 'primaryContact' + description: Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + - name: primaryContact type: String - description: |- - Email or URL of the primary point of contact of the listing. - - name: 'documentation' + description: Email or URL of the primary point of contact of the listing. + - name: documentation type: String - description: |- - Documentation describing the listing. - - name: 'icon' + description: Documentation describing the listing. + - name: icon type: String - description: |- - Base64 encoded image representing the listing. - - name: 'requestAccess' + description: Base64 encoded image representing the listing. + - name: requestAccess type: String - description: |- - Email or URL of the request access of the listing. Subscribers can use this reference to request access. - - name: 'dataProvider' + description: Email or URL of the request access of the listing. Subscribers can use this reference to request access. + - name: dataProvider type: NestedObject description: Details of the data provider who owns the source data. properties: - - name: 'name' + - name: name type: String description: Name of the data provider. required: true - - name: 'primaryContact' + - name: primaryContact type: String description: Email or URL of the data provider. - - name: 'publisher' + - name: publisher type: NestedObject - description: - Details of the publisher who owns the listing and who can share the source - data. + description: Details of the publisher who owns the listing and who can share the source data. properties: - - name: 'name' + - name: name type: String description: Name of the listing publisher. required: true - - name: 'primaryContact' + - name: primaryContact type: String description: Email or URL of the listing publisher. - - name: 'categories' + - name: categories type: Array description: | Categories of the listing. Up to two categories are allowed. item_type: type: String - - name: 'bigqueryDataset' + - name: bigqueryDataset type: NestedObject description: Shared dataset i.e. BigQuery dataset source. exactly_one_of: - - 'pubsubTopic' - - 'bigqueryDataset' + - pubsubTopic + - bigqueryDataset properties: - - name: 'dataset' + - name: dataset type: String - description: - Resource name of the dataset source for this listing. e.g. - projects/myproject/datasets/123 + description: Resource name of the dataset source for this listing. e.g. projects/myproject/datasets/123 required: true immutable: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' - - name: 'selectedResources' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress + - name: selectedResources type: Array description: Resource in this dataset that is selectively shared. This field is required for data clean room exchanges. immutable: true item_type: type: NestedObject properties: - - name: 'table' + - name: table type: String description: | Format: For table: projects/{projectId}/datasets/{datasetId}/tables/{tableId} Example:"projects/test_project/datasets/test_dataset/tables/test_table" immutable: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress exactly_one_of: - - 'table' - - 'routine' - - name: 'routine' + - table + - routine + - name: routine type: String description: | Format: For routine: projects/{projectId}/datasets/{datasetId}/routines/{routineId} Example:"projects/test_project/datasets/test_dataset/routines/test_routine" immutable: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress exactly_one_of: - - 'table' - - 'routine' - - name: 'replicaLocations' + - table + - routine + - name: replicaLocations type: Array is_set: true - set_hash_func: 'tpgresource.CaseInsensitiveHash' + set_hash_func: tpgresource.CaseInsensitiveHash description: | A list of regions where the publisher has created shared dataset replicas. item_type: type: String - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'effectiveReplicas' + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: effectiveReplicas type: Array description: | Server owned effective state of replicas. Contains both primary and secondary replicas. @@ -287,38 +291,37 @@ properties: item_type: type: NestedObject properties: - - name: 'location' + - name: location type: String description: | The geographic location where the replica resides. output: true - - name: 'replicaState' + - name: replicaState type: String description: | Output-only. Assigned by Analytics Hub based on real BigQuery replication state. Possible values: REPLICA_STATE_UNSPECIFIED, READY_TO_USE, UNAVAILABLE output: true - - name: 'primaryState' + - name: primaryState type: String description: | Output-only. Indicates that this replica is the primary replica. Possible values: PRIMARY_STATE_UNSPECIFIED, PRIMARY_REPLICA output: true - - name: 'pubsubTopic' + - name: pubsubTopic type: NestedObject description: Pub/Sub topic source. exactly_one_of: - - 'pubsubTopic' - - 'bigqueryDataset' + - pubsubTopic + - bigqueryDataset properties: - - name: 'topic' + - name: topic type: String - description: |- - Resource name of the Pub/Sub topic source for this listing. e.g. projects/myproject/topics/topicId + description: Resource name of the Pub/Sub topic source for this listing. e.g. projects/myproject/topics/topicId required: true immutable: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' - - name: 'dataAffinityRegions' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress + - name: dataAffinityRegions type: Array is_set: true description: |- @@ -326,60 +329,55 @@ properties: See https://cloud.google.com/about/locations for full listing of possible Cloud regions. item_type: type: String - - name: 'restrictedExportConfig' + - name: restrictedExportConfig type: NestedObject description: If set, restricted export configuration will be propagated and enforced on the linked dataset. properties: - - name: 'enabled' + - name: enabled type: Boolean - description: - If true, enable restricted export. - - name: 'restrictDirectTableAccess' + description: If true, enable restricted export. + - name: restrictDirectTableAccess type: Boolean - description: - If true, restrict direct table access(read api/tabledata.list) on linked table. + description: If true, restrict direct table access(read api/tabledata.list) on linked table. output: true - - name: 'restrictQueryResult' + - name: restrictQueryResult type: Boolean - description: - If true, restrict export of query result derived from restricted linked dataset table. - - name: 'logLinkedDatasetQueryUserEmail' + description: If true, restrict export of query result derived from restricted linked dataset table. + - name: logLinkedDatasetQueryUserEmail type: Boolean - description: - If true, subscriber email logging is enabled and all queries on the linked dataset will log the email address of the querying user. Once enabled, this setting cannot be turned off. - - name: 'state' + description: If true, subscriber email logging is enabled and all queries on the linked dataset will log the email address of the querying user. Once enabled, this setting cannot be turned off. + - name: state type: String - description: |- - Current state of the listing. + description: Current state of the listing. output: true - - name: 'discoveryType' + - name: discoveryType type: Enum enum_values: - - 'DISCOVERY_TYPE_PRIVATE' - - 'DISCOVERY_TYPE_PUBLIC' + - DISCOVERY_TYPE_PRIVATE + - DISCOVERY_TYPE_PUBLIC default_from_api: true description: Specifies the type of discovery on the discovery page. Cannot be set for a restricted listing. Note that this does not control the visibility of the exchange/listing which is defined by IAM permission. - - name: 'allowOnlyMetadataSharing' + - name: allowOnlyMetadataSharing type: Boolean immutable: true description: If true, the listing is only available to get the resource metadata. Listing is non subscribable. - - name: 'commercialInfo' + - name: commercialInfo type: NestedObject description: | Commercial info contains the information about the commercial data products associated with the listing. output: true properties: - - name: 'cloudMarketplace' + - name: cloudMarketplace type: NestedObject description: Details of the Marketplace Data Product associated with the Listing. output: true properties: - - name: 'service' + - name: service type: String description: | Resource name of the commercial service associated with the Marketplace Data Product. e.g. example.com output: true - - name: 'commercialState' + - name: commercialState type: String description: | Commercial state of the Marketplace Data Product. diff --git a/mmv1/products/bigqueryanalyticshub/ListingSubscription.yaml b/mmv1/products/bigqueryanalyticshub/ListingSubscription.yaml index e9b68a3ee1c9..92cdbb03d1c4 100644 --- a/mmv1/products/bigqueryanalyticshub/ListingSubscription.yaml +++ b/mmv1/products/bigqueryanalyticshub/ListingSubscription.yaml @@ -12,172 +12,164 @@ # limitations under the License. --- -name: 'ListingSubscription' +name: ListingSubscription api_resource_type_kind: Subscription description: A Bigquery Analytics Hub listing subscription references: guides: - 'Official Documentation': 'https://cloud.google.com/bigquery/docs/analytics-hub-introduction' - api: 'https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions' + Official Documentation: https://cloud.google.com/bigquery/docs/analytics-hub-introduction + api: https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions docs: note: |- When importing the resource with `terraform import`, provide the destination project and location in the format projects/{{destination_project}}/locations/{{destination_location}}/subscriptions/{{subscription_id}} -base_url: 'projects/{{project}}/locations/{{location}}/subscriptions' -self_link: 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}:subscribe' +base_url: projects/{{project}}/locations/{{location}}/subscriptions immutable: true +self_link: projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}} +create_url: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}:subscribe import_format: - - 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' + - projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}} +sweeper: + url_substitutions: + - region: US custom_code: + decoder: templates/terraform/decoders/bigqueryanalyticshub_listing_subscription.go.tmpl constants: templates/terraform/constants/bigqueryanalyticshub_listing_subscription.go.tmpl - decoder: 'templates/terraform/decoders/bigqueryanalyticshub_listing_subscription.go.tmpl' - pre_read: 'templates/terraform/pre_read/bigqueryanalyticshub_listing_subscription.tmpl' - post_read: 'templates/terraform/post_read/bigqueryanalyticshub_listing_subscription.go.tmpl' - pre_delete: 'templates/terraform/pre_read/bigqueryanalyticshub_listing_subscription.tmpl' + pre_read: templates/terraform/pre_read/bigqueryanalyticshub_listing_subscription.tmpl + post_read: templates/terraform/post_read/bigqueryanalyticshub_listing_subscription.go.tmpl + pre_delete: templates/terraform/pre_read/bigqueryanalyticshub_listing_subscription.tmpl post_import: templates/terraform/post_import/analytics_hub_subscription.go.tmpl -sweeper: - url_substitutions: - - region: "US" -examples: - - name: 'bigquery_analyticshub_listing_subscription_basic' - primary_resource_id: 'subscription' - region_override: 'US' - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - destination_dataset_id: 'destination_dataset' - description: 'example data exchange' - test_vars_overrides: - # for backward compatible - description: '"example data exchange" + randomSuffix' - - name: 'bigquery_analyticshub_listing_subscription_multiregion' - primary_resource_id: 'subscription' +samples: + - name: bigquery_analyticshub_listing_subscription_basic + primary_resource_id: subscription + region_override: US + steps: + - name: bigquery_analyticshub_listing_subscription_basic + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + destination_dataset_id: destination_dataset + description: example data exchange + test_vars_overrides: + # for backward compatible + description: '"example data exchange" + randomSuffix' + - name: bigquery_analyticshub_listing_subscription_multiregion + primary_resource_id: subscription exclude_test: true - vars: - data_exchange_id: 'my_data_exchange' - listing_id: 'my_listing' - destination_dataset_id: 'destination_dataset' - description: 'example listing multiregion subscription' - test_vars_overrides: - # for backward compatible - description: '"example listing multiregion subscription" + randomSuffix' + steps: + - name: bigquery_analyticshub_listing_subscription_multiregion + resource_id_vars: + data_exchange_id: my_data_exchange + listing_id: my_listing + destination_dataset_id: destination_dataset + description: example listing multiregion subscription + test_vars_overrides: + # for backward compatible + description: '"example listing multiregion subscription" + randomSuffix' parameters: - - name: 'dataExchangeId' + - name: dataExchangeId type: String - description: |- - The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true - - name: 'listingId' + - name: listingId type: String - description: |- - The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. + description: The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. url_param_only: true required: true - - name: 'location' + - name: location type: String description: | The name of the location of the data exchange. Distinct from the location of the destination data set. url_param_only: true required: true - custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' - diff_suppress_func: 'tpgresource.CaseDiffSuppress' + custom_flatten: templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl + diff_suppress_func: tpgresource.CaseDiffSuppress properties: - - name: 'destinationDataset' + - name: destinationDataset type: NestedObject required: true - description: - The destination dataset for this subscription. + description: The destination dataset for this subscription. properties: - - name: 'location' + - name: location type: String description: | The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations. required: true - custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'datasetReference' + custom_flatten: templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: datasetReference type: NestedObject required: true description: A reference that identifies the destination dataset. properties: - - name: 'datasetId' + - name: datasetId type: String description: A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. required: true - - name: 'projectId' + - name: projectId type: String description: The ID of the project containing this dataset. required: true - - name: 'friendlyName' + - name: friendlyName type: String description: A descriptive name for the dataset. - - name: 'description' + - name: description type: String description: A user-friendly description of the dataset. - - name: 'labels' + - name: labels type: KeyValuePairs description: | The labels associated with this dataset. You can use these to organize and group your datasets. - - name: 'replicaLocations' + - name: replicaLocations is_set: true type: Array - set_hash_func: 'tpgresource.CaseInsensitiveHash' + set_hash_func: tpgresource.CaseInsensitiveHash description: | List of regions where the subscriber wants dataset replicas. item_type: type: String - diff_suppress_func: 'tpgresource.CaseDiffSuppress' - - name: 'name' + diff_suppress_func: tpgresource.CaseDiffSuppress + - name: name type: String - description: |- - The resource name of the subscription. e.g. "projects/myproject/locations/US/subscriptions/123" + description: The resource name of the subscription. e.g. "projects/myproject/locations/US/subscriptions/123" output: true - - name: 'subscriptionId' + - name: subscriptionId type: String - description: |- - The subscription id used to reference the subscription. + description: The subscription id used to reference the subscription. output: true - custom_flatten: 'templates/terraform/custom_flatten/id_from_name.tmpl' - - name: 'creationTime' + custom_flatten: templates/terraform/custom_flatten/id_from_name.tmpl + - name: creationTime type: Time - description: |- - Timestamp when the subscription was created. + description: Timestamp when the subscription was created. output: true - - name: 'lastModifyTime' + - name: lastModifyTime type: Time - description: |- - Timestamp when the subscription was last modified. + description: Timestamp when the subscription was last modified. output: true - - name: 'organizationId' + - name: organizationId type: String - description: |- - Organization of the project this subscription belongs to. + description: Organization of the project this subscription belongs to. output: true - - name: 'organizationDisplayName' + - name: organizationDisplayName type: String - description: |- - Display name of the project of this subscription. + description: Display name of the project of this subscription. output: true - - name: 'state' + - name: state type: String - description: |- - Current state of the subscription. + description: Current state of the subscription. output: true - - name: 'subscriberContact' + - name: subscriberContact type: String - description: |- - Email of the subscriber. + description: Email of the subscriber. output: true - - name: 'resourceType' + - name: resourceType type: String - description: |- - Listing shared asset type. + description: Listing shared asset type. output: true - - name: 'linkedDatasetMap' + - name: linkedDatasetMap output: true type: Map description: |- @@ -211,22 +203,22 @@ properties: type: String description: Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linkedDataset output: true - - name: 'logLinkedDatasetQueryUserEmail' + - name: logLinkedDatasetQueryUserEmail type: Boolean - description: 'Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for Listing.' + description: Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for Listing. output: true - - name: 'commercialInfo' + - name: commercialInfo type: NestedObject description: | Commercial info metadata for this subscription. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. output: true properties: - - name: 'cloudMarketplace' + - name: cloudMarketplace type: NestedObject description: Cloud Marketplace commercial metadata for this subscription. output: true properties: - - name: 'order' + - name: order type: String description: | Resource name of the Marketplace Order. diff --git a/mmv1/products/bigqueryconnection/Connection.yaml b/mmv1/products/bigqueryconnection/Connection.yaml index 59fb9078945a..c7f513ba0cef 100644 --- a/mmv1/products/bigqueryconnection/Connection.yaml +++ b/mmv1/products/bigqueryconnection/Connection.yaml @@ -12,180 +12,200 @@ # limitations under the License. --- -name: 'Connection' +name: Connection description: | A connection allows BigQuery connections to external data sources.. references: guides: - 'Cloud SQL federated queries': 'https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries' - api: 'https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest/v1/projects.locations.connections/create' + Cloud SQL federated queries: https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries + api: https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest/v1/projects.locations.connections/create docs: -id_format: 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/connections' -self_link: 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/connections?connectionId={{connection_id}}' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{location}}/connections +self_link: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} +create_url: projects/{{project}}/locations/{{location}}/connections?connectionId={{connection_id}} update_mask: true +update_verb: PATCH +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: POST + parent_resource_attribute: connection_id + import_format: + - projects/{{project}}/locations/{{location}}/connections/{{connection_id}} + - '{{connection_id}}' +id_format: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' + - projects/{{project}}/locations/{{location}}/connections/{{connection_id}} - '{{project}}/{{location}}/{{connection_id}}' - '{{location}}/{{connection_id}}' timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -iam_policy: - method_name_separator: ':' - fetch_iam_policy_verb: 'POST' - parent_resource_attribute: 'connection_id' - import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' - - '{{connection_id}}' -custom_code: - encoder: 'templates/terraform/encoders/bigquery_connection.go.tmpl' sweeper: url_substitutions: - - region: "US" - - region: "EU" - - region: "azure-eastus2" - - region: "aws-us-east-1" -examples: - - name: 'bigquery_connection_cloud_resource' - primary_resource_id: 'connection' - region_override: 'US' - vars: - connection_id: 'my-connection' - external_providers: ["random", "time"] - - name: 'bigquery_connection_basic' - primary_resource_id: 'connection' - vars: - database_instance_name: 'my-database-instance' - username: 'user' - deletion_protection: 'true' - test_vars_overrides: - 'deletion_protection': 'false' - # for backward compatible - username: '"user" + randomSuffix' - oics_vars_overrides: - 'deletion_protection': 'false' - ignore_read_extra: - # password removed - - 'cloud_sql.0.credential' - external_providers: ["random", "time"] + - region: US + - region: EU + - region: azure-eastus2 + - region: aws-us-east-1 +custom_code: + encoder: templates/terraform/encoders/bigquery_connection.go.tmpl +samples: + - name: bigquery_connection_cloud_resource + primary_resource_id: connection + region_override: US + external_providers: [random, time] + steps: + - name: bigquery_connection_cloud_resource + resource_id_vars: + connection_id: my-connection + - name: bigquery_connection_basic + primary_resource_id: connection + external_providers: [random, time] # Random provider skip_vcr: true - - name: 'bigquery_connection_full' - primary_resource_id: 'connection' - vars: - database_instance_name: 'my-database-instance' - username: 'user' - connection_id: 'my-connection' - deletion_protection: 'true' - test_vars_overrides: - 'deletion_protection': 'false' - # for backward compatible - username: '"user" + randomSuffix' - oics_vars_overrides: - 'deletion_protection': 'false' - ignore_read_extra: - # password removed - - 'cloud_sql.0.credential' - external_providers: ["random", "time"] + steps: + - name: bigquery_connection_basic + resource_id_vars: + database_instance_name: my-database-instance + username: user + deletion_protection: "true" + test_vars_overrides: + deletion_protection: "false" + # for backward compatible + username: '"user" + randomSuffix' + oics_vars_overrides: + deletion_protection: "false" + ignore_read_extra: + # password removed + - cloud_sql.0.credential + - name: bigquery_connection_full + primary_resource_id: connection + external_providers: [random, time] # Random provider skip_vcr: true - - name: 'bigquery_connection_aws' - primary_resource_id: 'connection' - vars: - connection_id: 'my-connection' - iam_role_id: 'arn:aws:iam::999999999999:role/omnirole' - test_vars_overrides: - # for backward compatible - iam_role_id: '"arn:aws:iam::999999999999:role/omnirole" + randomSuffix' - external_providers: ["random", "time"] - - name: 'bigquery_connection_azure' - primary_resource_id: 'connection' - vars: - connection_id: 'my-connection' - customer_tenant_id: 'customer-tenant-id' - federated_application_client_id: 'b43eeeee-eeee-eeee-eeee-a480155501ce' - external_providers: ["random", "time"] - - name: 'bigquery_connection_cloudspanner' - primary_resource_id: 'connection' - vars: - connection_id: 'my-connection' - database: 'projects/project/instances/instance/databases/database' - database_role: 'database_role' - test_vars_overrides: - # for backward compatible - database: '"projects/project/instances/instance/databases/database" + randomSuffix' - external_providers: ["random", "time"] - - name: 'bigquery_connection_cloudspanner_databoost' - primary_resource_id: 'connection' - vars: - connection_id: 'my-connection' - database: 'projects/project/instances/instance/databases/database' - test_vars_overrides: - # for backward compatible - database: '"projects/project/instances/instance/databases/database" + randomSuffix' - external_providers: ["random", "time"] - - name: 'bigquery_connection_spark' - primary_resource_id: 'connection' - region_override: 'US' - vars: - connection_id: 'my-connection' - - name: 'bigquery_connection_sql_with_cmek' - primary_resource_id: 'bq-connection-cmek' + steps: + - name: bigquery_connection_full + resource_id_vars: + database_instance_name: my-database-instance + username: user + connection_id: my-connection + deletion_protection: "true" + test_vars_overrides: + deletion_protection: "false" + # for backward compatible + username: '"user" + randomSuffix' + oics_vars_overrides: + deletion_protection: "false" + ignore_read_extra: + # password removed + - cloud_sql.0.credential + - name: bigquery_connection_aws + primary_resource_id: connection + external_providers: [random, time] + steps: + - name: bigquery_connection_aws + resource_id_vars: + connection_id: my-connection + iam_role_id: arn:aws:iam::999999999999:role/omnirole + test_vars_overrides: + # for backward compatible + iam_role_id: '"arn:aws:iam::999999999999:role/omnirole" + randomSuffix' + - name: bigquery_connection_azure + primary_resource_id: connection + external_providers: [random, time] + steps: + - name: bigquery_connection_azure + resource_id_vars: + connection_id: my-connection + customer_tenant_id: customer-tenant-id + federated_application_client_id: b43eeeee-eeee-eeee-eeee-a480155501ce + - name: bigquery_connection_cloudspanner + primary_resource_id: connection + external_providers: [random, time] + steps: + - name: bigquery_connection_cloudspanner + resource_id_vars: + connection_id: my-connection + database: projects/project/instances/instance/databases/database + database_role: database_role + test_vars_overrides: + # for backward compatible + database: '"projects/project/instances/instance/databases/database" + randomSuffix' + - name: bigquery_connection_cloudspanner_databoost + primary_resource_id: connection + external_providers: [random, time] + steps: + - name: bigquery_connection_cloudspanner_databoost + resource_id_vars: + connection_id: my-connection + database: projects/project/instances/instance/databases/database + test_vars_overrides: + # for backward compatible + database: '"projects/project/instances/instance/databases/database" + randomSuffix' + - name: bigquery_connection_spark + primary_resource_id: connection + region_override: US + steps: + - name: bigquery_connection_spark + resource_id_vars: + connection_id: my-connection + - name: bigquery_connection_sql_with_cmek + primary_resource_id: bq-connection-cmek bootstrap_iam: - - member: "serviceAccount:bq-{project_number}@bigquery-encryption.iam.gserviceaccount.com" - role: "roles/cloudkms.cryptoKeyEncrypterDecrypter" - vars: - database_instance_name: 'my-database-instance' - username: 'user' - deletion_protection: 'true' - kms_key_name: 'projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key' - test_vars_overrides: - 'deletion_protection': 'false' - 'kms_key_name': 'kms.BootstrapKMSKey(t).CryptoKey.Name' - # for backward compatible - username: '"user" + randomSuffix' - oics_vars_overrides: - 'deletion_protection': 'false' - ignore_read_extra: - # password removed - - 'cloud_sql.0.credential' - - name: 'bigquery_connection_connector_configuration' - primary_resource_id: 'connection' - vars: - connection_id: 'my-connection' - username: 'user' - password: 'password' - test_vars_overrides: - username: '"user" + randomSuffix' - password: '"password"' - ignore_read_extra: - # The plaintext password is redacted by the API on read, so it cannot - # be verified against the original config. - - 'configuration.0.authentication.0.username_password.0.password' - external_providers: ["random", "time"] + - member: serviceAccount:bq-{project_number}@bigquery-encryption.iam.gserviceaccount.com + role: roles/cloudkms.cryptoKeyEncrypterDecrypter + steps: + - name: bigquery_connection_sql_with_cmek + resource_id_vars: + database_instance_name: my-database-instance + username: user + deletion_protection: "true" + kms_key_name: projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key + test_vars_overrides: + deletion_protection: "false" + kms_key_name: kms.BootstrapKMSKey(t).CryptoKey.Name + # for backward compatible + username: '"user" + randomSuffix' + oics_vars_overrides: + deletion_protection: "false" + ignore_read_extra: + # password removed + - cloud_sql.0.credential + - name: bigquery_connection_connector_configuration + primary_resource_id: connection + external_providers: [random, time] # Random provider skip_vcr: true + steps: + - name: bigquery_connection_connector_configuration + resource_id_vars: + connection_id: my-connection + username: user + password: password + test_vars_overrides: + username: '"user" + randomSuffix' + password: '"password"' + ignore_read_extra: + # The plaintext password is redacted by the API on read, so it cannot + # be verified against the original config. + - configuration.0.authentication.0.username_password.0.password parameters: properties: - - name: 'name' + - name: name type: String description: |- The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}" output: true - - name: 'connectionId' + - name: connectionId type: String description: | Optional connection id that should be assigned to the created connection. required: false immutable: true default_from_api: true - custom_flatten: 'templates/terraform/custom_flatten/id_from_name.tmpl' - - name: 'location' + custom_flatten: templates/terraform/custom_flatten/id_from_name.tmpl + - name: location type: String description: |- The geographic location where the connection should reside. @@ -198,352 +218,312 @@ properties: url_param_only: true required: false immutable: true - - name: 'friendlyName' + - name: friendlyName type: String description: A descriptive name for the connection - - name: 'description' + - name: description type: String description: A descriptive description for the connection - - name: 'hasCredential' + - name: hasCredential type: Boolean description: | True if the connection has credential assigned. output: true - - name: 'kmsKeyName' + - name: kmsKeyName type: String description: | Optional. The Cloud KMS key that is used for encryption. Example: projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key] - - name: 'cloudSql' + - name: cloudSql type: NestedObject description: Connection properties specific to the Cloud SQL. exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'instanceId' + - name: instanceId type: String - description: - Cloud SQL instance ID in the form project:location:instance. + description: Cloud SQL instance ID in the form project:location:instance. required: true - - name: 'database' + - name: database type: String description: Database name. required: true - - name: 'credential' + - name: credential type: NestedObject description: Cloud SQL properties. required: true - custom_flatten: 'templates/terraform/custom_flatten/bigquery_connection_flatten.go.tmpl' + custom_flatten: templates/terraform/custom_flatten/bigquery_connection_flatten.go.tmpl properties: - - name: 'username' + - name: username type: String description: Username for database. required: true - - name: 'password' + - name: password type: String description: Password for database. required: true sensitive: true - - name: 'type' + - name: type type: Enum description: Type of the Cloud SQL database. required: true enum_values: - - 'DATABASE_TYPE_UNSPECIFIED' - - 'POSTGRES' - - 'MYSQL' - - name: 'serviceAccountId' + - DATABASE_TYPE_UNSPECIFIED + - POSTGRES + - MYSQL + - name: serviceAccountId type: String - description: - When the connection is used in the context of an operation in - BigQuery, this service account will serve as the identity being used - for connecting to the CloudSQL instance specified in this connection. + description: When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection. output: true - - name: 'aws' + - name: aws type: NestedObject description: Connection properties specific to Amazon Web Services. update_mask_fields: - - 'aws.access_role.iam_role_id' + - aws.access_role.iam_role_id exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'accessRole' + - name: accessRole type: NestedObject - description: - Authentication using Google owned service account to assume into - customer's AWS IAM Role. + description: Authentication using Google owned service account to assume into customer's AWS IAM Role. required: true properties: - - name: 'iamRoleId' + - name: iamRoleId type: String - description: - The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - Connection. + description: The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection. required: true - - name: 'identity' + - name: identity type: String - description: - A unique Google-owned and Google-generated identity for the - Connection. This identity will be used to access the user's AWS - IAM Role. + description: A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role. output: true - - name: 'azure' + - name: azure type: NestedObject description: Container for connection properties specific to Azure. update_mask_fields: - - 'azure.customer_tenant_id' - - 'azure.federated_application_client_id' + - azure.customer_tenant_id + - azure.federated_application_client_id exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'application' + - name: application type: String description: The name of the Azure Active Directory Application. output: true - - name: 'clientId' + - name: clientId type: String description: The client id of the Azure Active Directory Application. output: true - - name: 'objectId' + - name: objectId type: String description: The object id of the Azure Active Directory Application. output: true - - name: 'customerTenantId' + - name: customerTenantId type: String description: The id of customer's directory that host the data. required: true - - name: 'federatedApplicationClientId' + - name: federatedApplicationClientId type: String - description: - The Azure Application (client) ID where the federated credentials will - be hosted. - - name: 'redirectUri' + description: The Azure Application (client) ID where the federated credentials will be hosted. + - name: redirectUri type: String - description: - The URL user will be redirected to after granting consent during - connection setup. + description: The URL user will be redirected to after granting consent during connection setup. output: true - - name: 'identity' + - name: identity type: String - description: - A unique Google-owned and Google-generated identity for the - Connection. This identity will be used to access the user's Azure - Active Directory Application. + description: A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application. output: true - - name: 'cloudSpanner' + - name: cloudSpanner type: NestedObject description: Connection properties specific to Cloud Spanner exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'database' + - name: database type: String - description: - Cloud Spanner database in the form `project/instance/database'. + description: Cloud Spanner database in the form `project/instance/database'. required: true - - name: 'useParallelism' + - name: useParallelism type: Boolean - description: - If parallelism should be used when reading from Cloud Spanner. - - name: 'maxParallelism' + description: If parallelism should be used when reading from Cloud Spanner. + - name: maxParallelism type: Integer - description: - Allows setting max parallelism per query when executing on Spanner independent compute - resources. If unspecified, default values of parallelism are chosen that are dependent on - the Cloud Spanner instance configuration. `useParallelism` and `useDataBoost` must be set - when setting max parallelism. + description: Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. `useParallelism` and `useDataBoost` must be set when setting max parallelism. required_with: - - 'cloudSpanner.0.useDataBoost' - - 'cloudSpanner.0.useParallelism' - - name: 'useDataBoost' + - cloudSpanner.0.useDataBoost + - cloudSpanner.0.useParallelism + - name: useDataBoost type: Boolean - description: - If set, the request will be executed via Spanner independent compute resources. - `use_parallelism` must be set when using data boost. + description: If set, the request will be executed via Spanner independent compute resources. `use_parallelism` must be set when using data boost. required_with: - - 'cloudSpanner.0.useParallelism' - - name: 'databaseRole' + - cloudSpanner.0.useParallelism + - name: databaseRole type: String - description: - Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin - should have provisioned the database role with appropriate permissions, such as `SELECT` - and `INSERT`. Other users should only use roles provided by their Cloud Spanner admins. - The database role name must start with a letter, and can only contain letters, numbers, - and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about. + description: Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as `SELECT` and `INSERT`. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about. validation: - regex: '^[a-zA-Z][a-zA-Z0-9_]*$' - - name: 'useServerlessAnalytics' + regex: ^[a-zA-Z][a-zA-Z0-9_]*$ + - name: useServerlessAnalytics type: Boolean - description: - If the serverless analytics service should be used to read data from - Cloud Spanner. `useParallelism` must be set when using serverless - analytics. + description: If the serverless analytics service should be used to read data from Cloud Spanner. `useParallelism` must be set when using serverless analytics. deprecation_message: '`useServerlessAnalytics` is deprecated and will be removed in a future major release. Use `useDataBoost` instead.' - - name: 'cloudResource' + - name: cloudResource type: NestedObject - description: - Container for connection properties for delegation of access to GCP - resources. + description: Container for connection properties for delegation of access to GCP resources. send_empty_value: true exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'serviceAccountId' + - name: serviceAccountId type: String - description: - The account ID of the service created for the purpose of this - connection. + description: The account ID of the service created for the purpose of this connection. output: true - - name: 'spark' + - name: spark type: NestedObject - description: Container for connection properties to execute stored procedures for Apache Spark. - resources. + description: Container for connection properties to execute stored procedures for Apache Spark. resources. send_empty_value: true exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'serviceAccountId' + - name: serviceAccountId type: String - description: The account ID of the service created for the purpose of this - connection. + description: The account ID of the service created for the purpose of this connection. output: true - - name: 'metastoreServiceConfig' + - name: metastoreServiceConfig type: NestedObject description: Dataproc Metastore Service configuration for the connection. properties: - - name: 'metastoreService' + - name: metastoreService type: String description: Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId]. - - name: 'sparkHistoryServerConfig' + - name: sparkHistoryServerConfig type: NestedObject description: Spark History Server configuration for the connection. properties: - - name: 'dataprocCluster' + - name: dataprocCluster type: String description: Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[cluster_name]. - - name: 'configuration' + - name: configuration type: NestedObject description: | Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. exactly_one_of: - - 'cloud_sql' - - 'aws' - - 'azure' - - 'cloud_spanner' - - 'cloud_resource' - - 'spark' - - 'configuration' + - cloud_sql + - aws + - azure + - cloud_spanner + - cloud_resource + - spark + - configuration properties: - - name: 'connectorId' + - name: connectorId type: String description: | The ID of the connector. Possible values include `google-alloydb`, `google-cloudsql-mysql`, `google-cloudsql-postgres`, and other connector IDs supported by the BigQuery Connector framework. required: true immutable: true - - name: 'endpoint' + - name: endpoint type: NestedObject description: Endpoint configuration for the connector. properties: - - name: 'hostPort' + - name: hostPort type: String description: | Host and port in the format of `host:port` for the connector endpoint. - - name: 'authentication' + - name: authentication type: NestedObject description: Authentication configuration for the connector. properties: - - name: 'usernamePassword' + - name: usernamePassword type: NestedObject description: Username/password authentication configuration. - custom_flatten: 'templates/terraform/custom_flatten/bigquery_connection_configuration_authentication_flatten.go.tmpl' + custom_flatten: templates/terraform/custom_flatten/bigquery_connection_configuration_authentication_flatten.go.tmpl properties: - - name: 'username' + - name: username type: String description: Username for the connector. required: true - - name: 'password' + - name: password type: NestedObject description: Password configuration for the connector. required: true properties: - - name: 'plaintext' + - name: plaintext type: String description: The plaintext password. required: true sensitive: true - - name: 'secretType' + - name: secretType type: String description: | Output only. The type of the secret. output: true - - name: 'serviceAccount' + - name: serviceAccount type: String description: | Output only. The service account used for authenticating with the connector. output: true - - name: 'network' + - name: network type: NestedObject description: Network configuration for the connector. properties: - - name: 'privateServiceConnect' + - name: privateServiceConnect type: NestedObject description: Private Service Connect configuration for the connector. properties: - - name: 'networkAttachment' + - name: networkAttachment type: String description: | The resource name of a network attachment in the format of `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. required: true - - name: 'asset' + - name: asset type: NestedObject description: Asset configuration for the connector. required: true properties: - - name: 'database' + - name: database type: String description: The name of the database. - - name: 'googleCloudResource' + - name: googleCloudResource type: String description: | The full resource name of the Google Cloud resource. diff --git a/mmv1/products/bigquerydatapolicy/DataPolicy.yaml b/mmv1/products/bigquerydatapolicy/DataPolicy.yaml index 499cf9e6a32c..9148a5fbf2ec 100644 --- a/mmv1/products/bigquerydatapolicy/DataPolicy.yaml +++ b/mmv1/products/bigquerydatapolicy/DataPolicy.yaml @@ -12,113 +12,112 @@ # limitations under the License. --- -name: 'DataPolicy' +name: DataPolicy description: A BigQuery Data Policy references: guides: - 'Official Documentation': 'https://cloud.google.com/bigquery/docs/column-data-masking-intro' - api: 'https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest/v1beta1/projects.locations.dataPolicies/create' + Official Documentation: https://cloud.google.com/bigquery/docs/column-data-masking-intro + api: https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest/v1beta1/projects.locations.dataPolicies/create docs: -id_format: 'projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/dataPolicies' -self_link: 'projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/dataPolicies' -update_verb: 'PATCH' +base_url: projects/{{project}}/locations/{{location}}/dataPolicies +self_link: projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}} +create_url: projects/{{project}}/locations/{{location}}/dataPolicies update_mask: true +update_verb: PATCH +iam_policy: + method_name_separator: ':' + fetch_iam_policy_verb: POST + parent_resource_attribute: data_policy_id + import_format: + - projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}} + - '{{data_policy_id}}' +id_format: projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}' + - projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}} - '{{project}}/{{location}}/{{data_policy_id}}' - '{{location}}/{{data_policy_id}}' timeouts: insert_minutes: 20 update_minutes: 20 delete_minutes: 20 -iam_policy: - method_name_separator: ':' - fetch_iam_policy_verb: 'POST' - parent_resource_attribute: 'data_policy_id' - import_format: - - 'projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}' - - '{{data_policy_id}}' custom_code: -examples: - - name: 'bigquery_datapolicy_data_policy_basic' - primary_resource_id: 'data_policy' - vars: - data_policy_id: 'data_policy' - taxonomy: 'taxonomy' - test_vars_overrides: - # for backward compatible - taxonomy: '"taxonomy" + randomSuffix' - - name: 'bigquery_datapolicy_data_policy_routine' - primary_resource_id: 'data_policy' - vars: - data_policy_id: 'data_policy' - taxonomy: 'taxonomy' - dataset_id: 'dataset_id' - test_vars_overrides: - # for backward compatible - taxonomy: '"taxonomy" + randomSuffix' +samples: + - name: bigquery_datapolicy_data_policy_basic + primary_resource_id: data_policy + steps: + - name: bigquery_datapolicy_data_policy_basic + resource_id_vars: + data_policy_id: data_policy + taxonomy: taxonomy + test_vars_overrides: + # for backward compatible + taxonomy: '"taxonomy" + randomSuffix' + - name: bigquery_datapolicy_data_policy_routine + primary_resource_id: data_policy + steps: + - name: bigquery_datapolicy_data_policy_routine + resource_id_vars: + data_policy_id: data_policy + taxonomy: taxonomy + dataset_id: dataset_id + test_vars_overrides: + # for backward compatible + taxonomy: '"taxonomy" + randomSuffix' parameters: properties: - - name: 'name' + - name: name type: String - description: |- - Resource name of this data policy, in the format of projects/{project_number}/locations/{locationId}/dataPolicies/{dataPolicyId}. + description: Resource name of this data policy, in the format of projects/{project_number}/locations/{locationId}/dataPolicies/{dataPolicyId}. output: true - - name: 'dataPolicyId' + - name: dataPolicyId type: String - description: |- - User-assigned (human readable) ID of the data policy that needs to be unique within a project. Used as {dataPolicyId} in part of the resource name. + description: User-assigned (human readable) ID of the data policy that needs to be unique within a project. Used as {dataPolicyId} in part of the resource name. required: true immutable: true - - name: 'location' + - name: location type: String description: | The name of the location of the data policy. url_param_only: true required: true immutable: true - - name: 'policyTag' + - name: policyTag type: String - description: |- - Policy tag resource name, in the format of projects/{project_number}/locations/{locationId}/taxonomies/{taxonomyId}/policyTags/{policyTag_id}. + description: Policy tag resource name, in the format of projects/{project_number}/locations/{locationId}/taxonomies/{taxonomyId}/policyTags/{policyTag_id}. required: true - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' - custom_flatten: 'templates/terraform/custom_flatten/bigquery_datapolicy_policy_tag_location_to_lower_case.go.tmpl' - - name: 'dataPolicyType' + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress + custom_flatten: templates/terraform/custom_flatten/bigquery_datapolicy_policy_tag_location_to_lower_case.go.tmpl + - name: dataPolicyType type: Enum description: | The enrollment level of the service. required: true enum_values: - - 'COLUMN_LEVEL_SECURITY_POLICY' - - 'DATA_MASKING_POLICY' - - name: 'dataMaskingPolicy' + - COLUMN_LEVEL_SECURITY_POLICY + - DATA_MASKING_POLICY + - name: dataMaskingPolicy type: NestedObject description: | The data masking policy that specifies the data masking rule to use. properties: - - name: 'predefinedExpression' + - name: predefinedExpression type: Enum - description: |- - The available masking rules. Learn more here: https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. + description: 'The available masking rules. Learn more here: https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.' exactly_one_of: - - 'data_masking_policy.0.predefined_expression' - - 'data_masking_policy.0.routine' + - data_masking_policy.0.predefined_expression + - data_masking_policy.0.routine enum_values: - - 'SHA256' - - 'ALWAYS_NULL' - - 'DEFAULT_MASKING_VALUE' - - 'LAST_FOUR_CHARACTERS' - - 'FIRST_FOUR_CHARACTERS' - - 'EMAIL_MASK' - - 'DATE_YEAR_MASK' - - name: 'routine' + - SHA256 + - ALWAYS_NULL + - DEFAULT_MASKING_VALUE + - LAST_FOUR_CHARACTERS + - FIRST_FOUR_CHARACTERS + - EMAIL_MASK + - DATE_YEAR_MASK + - name: routine type: String - description: |- - The name of the BigQuery routine that contains the custom masking routine, in the format of projects/{projectNumber}/datasets/{dataset_id}/routines/{routine_id}. + description: The name of the BigQuery routine that contains the custom masking routine, in the format of projects/{projectNumber}/datasets/{dataset_id}/routines/{routine_id}. exactly_one_of: - - 'data_masking_policy.0.predefined_expression' - - 'data_masking_policy.0.routine' - diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' + - data_masking_policy.0.predefined_expression + - data_masking_policy.0.routine + diff_suppress_func: tpgresource.ProjectNumberDiffSuppress diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_basic.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_basic.tf.tmpl deleted file mode 100644 index 54cb026c6177..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_basic.tf.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "desc"}}" -} diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_dcr.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_dcr.tf.tmpl deleted file mode 100644 index bc26d58a9a52..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_dcr.tf.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "desc"}}" - sharing_environment_config { - dcr_exchange_config {} - } -} diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl deleted file mode 100644 index a1d37d294881..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "description"}}" - log_linked_dataset_query_user_email = true -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_basic.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_basic.tf.tmpl deleted file mode 100644 index b9900df469f8..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_basic.tf.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "desc"}}" -} - -resource "google_bigquery_analytics_hub_listing" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = google_bigquery_analytics_hub_data_exchange.{{$.PrimaryResourceId}}.data_exchange_id - listing_id = "{{index $.Vars "listing_id"}}" - display_name = "{{index $.Vars "listing_id"}}" - description = "{{index $.Vars "desc"}}" - - bigquery_dataset { - dataset = google_bigquery_dataset.{{$.PrimaryResourceId}}.id - } -} - -resource "google_bigquery_dataset" "{{$.PrimaryResourceId}}" { - dataset_id = "{{index $.Vars "listing_id"}}" - friendly_name = "{{index $.Vars "listing_id"}}" - description = "{{index $.Vars "desc"}}" - location = "US" -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_log_linked_dataset_query_user.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_log_linked_dataset_query_user.tf.tmpl deleted file mode 100644 index 8eec9b5459ef..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_log_linked_dataset_query_user.tf.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}_log_email" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "description"}}" -} - -resource "google_bigquery_analytics_hub_listing" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = google_bigquery_analytics_hub_data_exchange.{{$.PrimaryResourceId}}_log_email.data_exchange_id - listing_id = "{{index $.Vars "listing_id"}}" - display_name = "{{index $.Vars "listing_id"}}" - description = "{{index $.Vars "description"}}" - log_linked_dataset_query_user_email = true - - bigquery_dataset { - dataset = google_bigquery_dataset.{{$.PrimaryResourceId}}_log_email.id - } -} - -resource "google_bigquery_dataset" "{{$.PrimaryResourceId}}_log_email" { - dataset_id = "{{index $.Vars "dataset_id"}}" - friendly_name = "{{index $.Vars "dataset_id"}}" - description = "{{index $.Vars "description"}}" - location = "US" -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_marketplace.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_marketplace.tf.tmpl deleted file mode 100644 index fe475b47a1db..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_listing_marketplace.tf.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "desc"}}" -} - -resource "google_bigquery_analytics_hub_listing" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = google_bigquery_analytics_hub_data_exchange.{{$.PrimaryResourceId}}.data_exchange_id - listing_id = "{{index $.Vars "listing_id"}}" - display_name = "{{index $.Vars "listing_id"}}" - description = "{{index $.Vars "desc"}}" - delete_commercial = true - - bigquery_dataset { - dataset = google_bigquery_dataset.{{$.PrimaryResourceId}}.id - } - -} - -resource "google_bigquery_dataset" "{{$.PrimaryResourceId}}" { - dataset_id = "{{index $.Vars "listing_id"}}" - friendly_name = "{{index $.Vars "listing_id"}}" - description = "{{index $.Vars "desc"}}" - location = "US" -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_public_data_exchange.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_analyticshub_public_data_exchange.tf.tmpl deleted file mode 100644 index ace1b471ce57..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_public_data_exchange.tf.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { - location = "US" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" - description = "{{index $.Vars "desc"}}" - discovery_type = "DISCOVERY_TYPE_PUBLIC" -} diff --git a/mmv1/templates/terraform/examples/bigquery_connection_azure.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_connection_azure.tf.tmpl deleted file mode 100644 index bc8efa75e904..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_connection_azure.tf.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -resource "google_bigquery_connection" "{{$.PrimaryResourceId}}" { - connection_id = "{{index $.Vars "connection_id"}}" - location = "azure-eastus2" - friendly_name = "👋" - description = "a riveting description" - azure { - customer_tenant_id = "{{index $.Vars "customer_tenant_id"}}" - federated_application_client_id = "{{index $.Vars "federated_application_client_id"}}" - } -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_connection_cloudspanner.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_connection_cloudspanner.tf.tmpl deleted file mode 100644 index 13f25c226444..000000000000 --- a/mmv1/templates/terraform/examples/bigquery_connection_cloudspanner.tf.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -resource "google_bigquery_connection" "{{$.PrimaryResourceId}}" { - connection_id = "{{index $.Vars "connection_id"}}" - location = "US" - friendly_name = "👋" - description = "a riveting description" - cloud_spanner { - database = "{{index $.Vars "database"}}" - database_role = "{{index $.Vars "database_role"}}" - } -} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_connection_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_basic.tf.tmpl similarity index 73% rename from mmv1/templates/terraform/examples/beyondcorp_app_connection_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_basic.tf.tmpl index 1a995efb4be7..c4dae4446ea5 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_connection_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_basic.tf.tmpl @@ -1,10 +1,10 @@ resource "google_service_account" "service_account" { - account_id = "{{index $.Vars "account_id"}}" + account_id = "{{index $.ResourceIdVars "account_id"}}" display_name = "Test Service Account" } resource "google_beyondcorp_app_connector" "app_connector" { - name = "{{index $.Vars "app_connector_name"}}" + name = "{{index $.ResourceIdVars "app_connector_name"}}" principal_info { service_account { email = google_service_account.service_account.email @@ -13,7 +13,7 @@ resource "google_beyondcorp_app_connector" "app_connector" { } resource "google_beyondcorp_app_connection" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_connection_name"}}" + name = "{{index $.ResourceIdVars "app_connection_name"}}" type = "TCP_PROXY" application_endpoint { host = "foo-host" diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_connection_full.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_full.tf.tmpl similarity index 71% rename from mmv1/templates/terraform/examples/beyondcorp_app_connection_full.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_full.tf.tmpl index 9224d30b34ef..ed8aca294df3 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_connection_full.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connection_full.tf.tmpl @@ -1,16 +1,16 @@ resource "google_service_account" "service_account" { - account_id = "{{index $.Vars "account_id"}}" + account_id = "{{index $.ResourceIdVars "account_id"}}" display_name = "Test Service Account" } resource "google_beyondcorp_app_gateway" "app_gateway" { - name = "{{index $.Vars "app_gateway_name"}}" + name = "{{index $.ResourceIdVars "app_gateway_name"}}" type = "TCP_PROXY" host_type = "GCP_REGIONAL_MIG" } resource "google_beyondcorp_app_connector" "app_connector" { - name = "{{index $.Vars "app_connector_name"}}" + name = "{{index $.ResourceIdVars "app_connector_name"}}" principal_info { service_account { email = google_service_account.service_account.email @@ -19,9 +19,9 @@ resource "google_beyondcorp_app_connector" "app_connector" { } resource "google_beyondcorp_app_connection" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_connection_name"}}" + name = "{{index $.ResourceIdVars "app_connection_name"}}" type = "TCP_PROXY" - display_name = "{{index $.Vars "display_name"}}" + display_name = "{{index $.ResourceIdVars "display_name"}}" application_endpoint { host = "foo-host" port = 8080 diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_connector_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_basic.tf.tmpl similarity index 70% rename from mmv1/templates/terraform/examples/beyondcorp_app_connector_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_basic.tf.tmpl index c789654397f2..5ed440975a08 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_connector_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_basic.tf.tmpl @@ -1,10 +1,10 @@ resource "google_service_account" "service_account" { - account_id = "{{index $.Vars "account_id"}}" + account_id = "{{index $.ResourceIdVars "account_id"}}" display_name = "Test Service Account" } resource "google_beyondcorp_app_connector" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_connector_name"}}" + name = "{{index $.ResourceIdVars "app_connector_name"}}" principal_info { service_account { email = google_service_account.service_account.email diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_connector_full.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_full.tf.tmpl similarity index 66% rename from mmv1/templates/terraform/examples/beyondcorp_app_connector_full.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_full.tf.tmpl index 2db536b85952..7fae19a0d6d9 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_connector_full.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_connector_full.tf.tmpl @@ -1,12 +1,12 @@ resource "google_service_account" "service_account" { - account_id = "{{index $.Vars "account_id"}}" + account_id = "{{index $.ResourceIdVars "account_id"}}" display_name = "Test Service Account" } resource "google_beyondcorp_app_connector" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_connector_name"}}" + name = "{{index $.ResourceIdVars "app_connector_name"}}" region = "us-central1" - display_name = "{{index $.Vars "display_name"}}" + display_name = "{{index $.ResourceIdVars "display_name"}}" principal_info { service_account { email = google_service_account.service_account.email diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_gateway_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_basic.tf.tmpl similarity index 72% rename from mmv1/templates/terraform/examples/beyondcorp_app_gateway_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_basic.tf.tmpl index cd1efb307100..49ed21362cf8 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_gateway_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_basic.tf.tmpl @@ -1,5 +1,5 @@ resource "google_beyondcorp_app_gateway" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_gateway_name"}}" + name = "{{index $.ResourceIdVars "app_gateway_name"}}" type = "TCP_PROXY" region = "us-central1" host_type = "GCP_REGIONAL_MIG" diff --git a/mmv1/templates/terraform/examples/beyondcorp_app_gateway_full.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_full.tf.tmpl similarity index 62% rename from mmv1/templates/terraform/examples/beyondcorp_app_gateway_full.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_full.tf.tmpl index 64ab719c2693..dd75fb6c4c73 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_app_gateway_full.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_app_gateway_full.tf.tmpl @@ -1,8 +1,8 @@ resource "google_beyondcorp_app_gateway" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "app_gateway_name"}}" + name = "{{index $.ResourceIdVars "app_gateway_name"}}" type = "TCP_PROXY" region = "us-central1" - display_name = "{{index $.Vars "display_name"}}" + display_name = "{{index $.ResourceIdVars "display_name"}}" labels = { foo = "bar" bar = "baz" diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_basic.tf.tmpl similarity index 73% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_basic.tf.tmpl index 64e5f6179515..5702ffd5f3e6 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_basic.tf.tmpl @@ -1,12 +1,12 @@ resource "google_beyondcorp_security_gateway" "default" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My Security Gateway resource" hubs { region = "us-central1" } } resource "google_beyondcorp_security_gateway_application" "{{$.PrimaryResourceId}}" { security_gateway_id = google_beyondcorp_security_gateway.default.security_gateway_id - application_id = "{{index $.Vars "application_name"}}" + application_id = "{{index $.ResourceIdVars "application_name"}}" endpoint_matchers { hostname = "google.com" ports = [80, 443] diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_api.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_api.tf.tmpl similarity index 76% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_api.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_api.tf.tmpl index 086d8ff9f656..aaaa83004a0f 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_api.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_api.tf.tmpl @@ -1,11 +1,11 @@ resource "google_beyondcorp_security_gateway" "default" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My SPA Security Gateway resource" } resource "google_beyondcorp_security_gateway_application" "{{$.PrimaryResourceId}}" { security_gateway_id = google_beyondcorp_security_gateway.default.security_gateway_id - application_id = "{{index $.Vars "application_discovery_name"}}" + application_id = "{{index $.ResourceIdVars "application_discovery_name"}}" upstreams { external { endpoints { diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl similarity index 87% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl index fedf730662a4..1d3728f128a1 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_spa_proxy.tf.tmpl @@ -1,11 +1,11 @@ resource "google_beyondcorp_security_gateway" "default" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My SPA Security Gateway resource" } resource "google_beyondcorp_security_gateway_application" "{{$.PrimaryResourceId}}" { security_gateway_id = google_beyondcorp_security_gateway.default.security_gateway_id - application_id = "{{index $.Vars "application_proxy_name"}}" + application_id = "{{index $.ResourceIdVars "application_proxy_name"}}" endpoint_matchers { hostname = "a.site.com" ports = [443] diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_vpc.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_vpc.tf.tmpl similarity index 81% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_vpc.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_vpc.tf.tmpl index d6823a6f24b7..bb9c421ebda6 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_application_vpc.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_application_vpc.tf.tmpl @@ -1,14 +1,14 @@ data "google_project" "project" {} resource "google_beyondcorp_security_gateway" "default" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My Security Gateway resource" hubs { region = "us-central1" } } resource "google_beyondcorp_security_gateway_application" "{{$.PrimaryResourceId}}" { security_gateway_id = google_beyondcorp_security_gateway.default.security_gateway_id - application_id = "{{index $.Vars "application_name"}}" + application_id = "{{index $.ResourceIdVars "application_name"}}" endpoint_matchers { hostname = "my-vm-service.com" ports = [80, 443] diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_basic.tf.tmpl similarity index 67% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_basic.tf.tmpl index 66a12bfeb24b..3ecee6e25a72 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_basic.tf.tmpl @@ -1,5 +1,5 @@ resource "google_beyondcorp_security_gateway" "{{$.PrimaryResourceId}}" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My Security Gateway resource" hubs { region = "us-central1" } } \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_logging.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_logging.tf.tmpl similarity index 71% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_logging.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_logging.tf.tmpl index cb4e0cc85ea3..c06338d74b17 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_logging.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_logging.tf.tmpl @@ -1,5 +1,5 @@ resource "google_beyondcorp_security_gateway" "{{$.PrimaryResourceId}}" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My Security Gateway resource with logging enabled" hubs { region = "us-central1" } logging {} diff --git a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_spa.tf.tmpl b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_spa.tf.tmpl similarity index 90% rename from mmv1/templates/terraform/examples/beyondcorp_security_gateway_spa.tf.tmpl rename to mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_spa.tf.tmpl index ceaf6341b6a3..b4a96e09d399 100644 --- a/mmv1/templates/terraform/examples/beyondcorp_security_gateway_spa.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/beyondcorp/beyondcorp_security_gateway_spa.tf.tmpl @@ -1,5 +1,5 @@ resource "google_beyondcorp_security_gateway" "{{$.PrimaryResourceId}}" { - security_gateway_id = "{{index $.Vars "security_gateway_name"}}" + security_gateway_id = "{{index $.ResourceIdVars "security_gateway_name"}}" display_name = "My SPA Security Gateway resource" proxy_protocol_config { allowed_client_headers = ["header1", "header2"] diff --git a/mmv1/templates/terraform/examples/biglake_database.tf.tmpl b/mmv1/templates/terraform/samples/services/biglake/biglake_database.tf.tmpl similarity index 80% rename from mmv1/templates/terraform/examples/biglake_database.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglake/biglake_database.tf.tmpl index bfeed43c4997..358522f31403 100644 --- a/mmv1/templates/terraform/examples/biglake_database.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglake/biglake_database.tf.tmpl @@ -1,10 +1,10 @@ resource "google_biglake_catalog" "catalog" { - name = "{{index $.Vars "catalog_id"}}" + name = "{{index $.ResourceIdVars "catalog_id"}}" location = "US" } resource "google_storage_bucket" "bucket" { - name = "{{index $.Vars "bucket_id"}}" + name = "{{index $.ResourceIdVars "bucket_id"}}" location = "US" force_destroy = true uniform_bucket_level_access = true @@ -17,7 +17,7 @@ resource "google_storage_bucket_object" "metadata_folder" { } resource "google_biglake_database" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "name"}}" + name = "{{index $.ResourceIdVars "name"}}" catalog = google_biglake_catalog.catalog.id type = "HIVE" hive_options { diff --git a/mmv1/templates/terraform/examples/biglake_table.tf.tmpl b/mmv1/templates/terraform/samples/services/biglake/biglake_table.tf.tmpl similarity index 90% rename from mmv1/templates/terraform/examples/biglake_table.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglake/biglake_table.tf.tmpl index 69c554130d00..58afd2f95229 100644 --- a/mmv1/templates/terraform/examples/biglake_table.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglake/biglake_table.tf.tmpl @@ -1,10 +1,10 @@ resource "google_biglake_catalog" "catalog" { - name = "{{index $.Vars "catalog"}}" + name = "{{index $.ResourceIdVars "catalog"}}" location = "US" } resource "google_storage_bucket" "bucket" { - name = "{{index $.Vars "bucket"}}" + name = "{{index $.ResourceIdVars "bucket"}}" location = "US" force_destroy = true uniform_bucket_level_access = true @@ -24,7 +24,7 @@ resource "google_storage_bucket_object" "data_folder" { } resource "google_biglake_database" "database" { - name = "{{index $.Vars "database"}}" + name = "{{index $.ResourceIdVars "database"}}" catalog = google_biglake_catalog.catalog.id type = "HIVE" hive_options { @@ -36,7 +36,7 @@ resource "google_biglake_database" "database" { } resource "google_biglake_table" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "name"}}" + name = "{{index $.ResourceIdVars "name"}}" database = google_biglake_database.database.id type = "HIVE" hive_options { diff --git a/mmv1/templates/terraform/examples/bigquery_biglake_catalog.tf.tmpl b/mmv1/templates/terraform/samples/services/biglake/bigquery_biglake_catalog.tf.tmpl similarity index 64% rename from mmv1/templates/terraform/examples/bigquery_biglake_catalog.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglake/bigquery_biglake_catalog.tf.tmpl index 10fa62e152b1..b58200ac4368 100644 --- a/mmv1/templates/terraform/examples/bigquery_biglake_catalog.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglake/bigquery_biglake_catalog.tf.tmpl @@ -1,4 +1,4 @@ resource "google_biglake_catalog" "{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "name"}}" + name = "{{index $.ResourceIdVars "name"}}" location = "US" } diff --git a/mmv1/templates/terraform/examples/biglake_iceberg_catalog.tf.tmpl b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog.tf.tmpl similarity index 94% rename from mmv1/templates/terraform/examples/biglake_iceberg_catalog.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog.tf.tmpl index 8671e06db397..c121e831cf48 100644 --- a/mmv1/templates/terraform/examples/biglake_iceberg_catalog.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog.tf.tmpl @@ -1,5 +1,5 @@ resource "google_storage_bucket" "bucket_for_{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "name"}}" + name = "{{index $.ResourceIdVars "name"}}" location = "us-central1" force_destroy = true uniform_bucket_level_access = true diff --git a/mmv1/templates/terraform/examples/biglake_iceberg_catalog_primary_location.tf.tmpl b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog_primary_location.tf.tmpl similarity index 90% rename from mmv1/templates/terraform/examples/biglake_iceberg_catalog_primary_location.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog_primary_location.tf.tmpl index d78c432d9974..8dc10ce89ca6 100644 --- a/mmv1/templates/terraform/examples/biglake_iceberg_catalog_primary_location.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_catalog_primary_location.tf.tmpl @@ -1,5 +1,5 @@ resource "google_storage_bucket" "bucket_for_{{$.PrimaryResourceId}}" { - name = "{{index $.Vars "name"}}" + name = "{{index $.ResourceIdVars "name"}}" location = "us-central1" force_destroy = true uniform_bucket_level_access = true diff --git a/mmv1/templates/terraform/examples/biglake_iceberg_namespace.tf.tmpl b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_namespace.tf.tmpl similarity index 89% rename from mmv1/templates/terraform/examples/biglake_iceberg_namespace.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_namespace.tf.tmpl index d578e0a22343..87c66ccefd47 100644 --- a/mmv1/templates/terraform/examples/biglake_iceberg_namespace.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_namespace.tf.tmpl @@ -1,5 +1,5 @@ resource "google_storage_bucket" "bucket" { - name = "{{index $.Vars "bucket_name"}}" + name = "{{index $.ResourceIdVars "bucket_name"}}" location = "us-central1" force_destroy = true uniform_bucket_level_access = true diff --git a/mmv1/templates/terraform/examples/biglake_iceberg_table_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_basic.tf.tmpl similarity index 80% rename from mmv1/templates/terraform/examples/biglake_iceberg_table_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_basic.tf.tmpl index 5a24418a15bb..a77e0b6b7056 100644 --- a/mmv1/templates/terraform/examples/biglake_iceberg_table_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_basic.tf.tmpl @@ -1,5 +1,5 @@ resource "google_storage_bucket" "bucket" { - name = "{{index $.Vars "bucket_name"}}" + name = "{{index $.ResourceIdVars "bucket_name"}}" location = "us-central1" force_destroy = true uniform_bucket_level_access = true @@ -12,14 +12,14 @@ resource "google_biglake_iceberg_catalog" "catalog" { resource "google_biglake_iceberg_namespace" "namespace" { catalog = google_biglake_iceberg_catalog.catalog.name - namespace_id = "{{index $.Vars "namespace_id"}}" + namespace_id = "{{index $.ResourceIdVars "namespace_id"}}" } resource "google_biglake_iceberg_table" "my_iceberg_table" { catalog = google_biglake_iceberg_catalog.catalog.name namespace = google_biglake_iceberg_namespace.namespace.namespace_id - name = "{{index $.Vars "table_name"}}" - location = "gs://${google_storage_bucket.bucket.name}/${google_biglake_iceberg_namespace.namespace.namespace_id}/{{index $.Vars "table_name"}}" + name = "{{index $.ResourceIdVars "table_name"}}" + location = "gs://${google_storage_bucket.bucket.name}/${google_biglake_iceberg_namespace.namespace.namespace_id}/{{index $.ResourceIdVars "table_name"}}" schema { type = "struct" fields { diff --git a/mmv1/templates/terraform/examples/biglake_iceberg_table_update.tf.tmpl b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_update.tf.tmpl similarity index 81% rename from mmv1/templates/terraform/examples/biglake_iceberg_table_update.tf.tmpl rename to mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_update.tf.tmpl index 01e28afa1a49..db38e8c17399 100644 --- a/mmv1/templates/terraform/examples/biglake_iceberg_table_update.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/biglakeiceberg/biglake_iceberg_table_update.tf.tmpl @@ -1,5 +1,5 @@ resource "google_storage_bucket" "bucket" { - name = "{{index $.Vars "bucket_name"}}" + name = "{{index $.ResourceIdVars "bucket_name"}}" location = "us-central1" force_destroy = true uniform_bucket_level_access = true @@ -12,13 +12,13 @@ resource "google_biglake_iceberg_catalog" "catalog" { resource "google_biglake_iceberg_namespace" "namespace" { catalog = google_biglake_iceberg_catalog.catalog.name - namespace_id = "{{index $.Vars "namespace_id"}}" + namespace_id = "{{index $.ResourceIdVars "namespace_id"}}" } resource "google_biglake_iceberg_table" "my_iceberg_table" { catalog = google_biglake_iceberg_catalog.catalog.name namespace = google_biglake_iceberg_namespace.namespace.namespace_id - name = "{{index $.Vars "table_name"}}" + name = "{{index $.ResourceIdVars "table_name"}}" schema { type = "struct" fields { diff --git a/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_basic.tf.tmpl new file mode 100644 index 000000000000..535f5e9a041c --- /dev/null +++ b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_basic.tf.tmpl @@ -0,0 +1,6 @@ +resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { + location = "US" + data_exchange_id = "{{index $.ResourceIdVars "data_exchange_id"}}" + display_name = "{{index $.ResourceIdVars "data_exchange_id"}}" + description = "{{index $.ResourceIdVars "desc"}}" +} diff --git a/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_dcr.tf.tmpl b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_dcr.tf.tmpl new file mode 100644 index 000000000000..5d99ddf50e8c --- /dev/null +++ b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_dcr.tf.tmpl @@ -0,0 +1,9 @@ +resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { + location = "US" + data_exchange_id = "{{index $.ResourceIdVars "data_exchange_id"}}" + display_name = "{{index $.ResourceIdVars "data_exchange_id"}}" + description = "{{index $.ResourceIdVars "desc"}}" + sharing_environment_config { + dcr_exchange_config {} + } +} diff --git a/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl new file mode 100644 index 000000000000..fa65aebf0371 --- /dev/null +++ b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_data_exchange_log_linked_dataset_query_user.tf.tmpl @@ -0,0 +1,7 @@ +resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { + location = "US" + data_exchange_id = "{{index $.ResourceIdVars "data_exchange_id"}}" + display_name = "{{index $.ResourceIdVars "data_exchange_id"}}" + description = "{{index $.ResourceIdVars "description"}}" + log_linked_dataset_query_user_email = true +} \ No newline at end of file diff --git a/mmv1/templates/terraform/examples/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl similarity index 74% rename from mmv1/templates/terraform/examples/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl rename to mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl index c50103d3cb2f..3eeca8a459ea 100644 --- a/mmv1/templates/terraform/examples/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/bigqueryanalyticshub/bigquery_analyticshub_dataexchange_subscription_basic.tf.tmpl @@ -1,8 +1,8 @@ resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" { provider = google-beta location = "us" - data_exchange_id = "{{index $.Vars "data_exchange_id"}}" - display_name = "{{index $.Vars "data_exchange_id"}}" + data_exchange_id = "{{index $.ResourceIdVars "data_exchange_id"}}" + display_name = "{{index $.ResourceIdVars "data_exchange_id"}}" description = "Test Data Exchange" sharing_environment_config { dcr_exchange_config {} @@ -11,8 +11,8 @@ resource "google_bigquery_analytics_hub_data_exchange" "{{$.PrimaryResourceId}}" resource "google_bigquery_dataset" "{{$.PrimaryResourceId}}" { provider = google-beta - dataset_id = "{{index $.Vars "listing_dataset_id"}}" - friendly_name = "{{index $.Vars "listing_dataset_id"}}" + dataset_id = "{{index $.ResourceIdVars "listing_dataset_id"}}" + friendly_name = "{{index $.ResourceIdVars "listing_dataset_id"}}" description = "Dataset for Listing" location = "us" } @@ -20,7 +20,7 @@ resource "google_bigquery_dataset" "{{$.PrimaryResourceId}}" { resource "google_bigquery_table" "{{$.PrimaryResourceId}}" { provider = google-beta deletion_protection = false - table_id = "{{index $.Vars "listing_table_id"}}" + table_id = "{{index $.ResourceIdVars "listing_table_id"}}" dataset_id = google_bigquery_dataset.{{$.PrimaryResourceId}}.dataset_id schema = <