diff --git a/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json b/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json new file mode 100644 index 000000000000..62ec56a8983c --- /dev/null +++ b/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json @@ -0,0 +1,3119 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Developer Connect API", + "description": "Connect third-party source code management to Google", + "version": "v1", + "x-google-revision": "0" + }, + "servers": [ + { + "url": "https://developerconnect.googleapis.com", + "description": "Global Endpoint" + }, + { + "url": "https://developerconnect.us-central1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-central1" + }, + { + "url": "https://developerconnect.europe-west1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "europe-west1" + }, + { + "url": "https://developerconnect.asia-east1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-east1" + }, + { + "url": "https://developerconnect.asia-east2.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-east2" + }, + { + "url": "https://developerconnect.europe-west4.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "europe-west4" + }, + { + "url": "https://developerconnect.us-east4.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-east4" + }, + { + "url": "https://developerconnect.us-east5.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-east5" + }, + { + "url": "https://developerconnect.asia-southeast1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-southeast1" + }, + { + "url": "https://developerconnect.us-west1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-west1" + }, + { + "url": "https://developerconnect.us-west2.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-west2" + } + ], + "paths": { + "/v1/projects/{project}/locations/{location}/operations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListOperations", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "The standard list filter.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "The standard list page size.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "The standard list page token.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOperationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/operations/{operation}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetOperation", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + }, + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteOperation", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/operations/{operation}:cancel": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "CancelOperation", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of `1`,\ncorresponding to `Code.CANCELLED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelOperationRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListConnections", + "description": "Lists Connections in a given project and location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. A token identifying a page of results the server should return.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "Optional. Filtering results", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "description": "Optional. Hint for how to order the results", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListConnectionsResponse" + } + } + } + } + } + }, + "post": { + "tags": ["developerconnect"], + "operationId": "CreateConnection", + "description": "Creates a new Connection in a given project and location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connectionId", + "description": "Required. Id of the requesting object\nIf auto-generating Id server-side, remove this field and\nconnection_id from the method_signature of Create RPC", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionOperation" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetConnection", + "description": "Gets details of a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + } + }, + "patch": { + "tags": ["developerconnect"], + "operationId": "UpdateConnection", + "description": "Updates the parameters of a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "updateMask", + "description": "Required. Field mask is used to specify the fields to be overwritten in the\nConnection resource by the update.\nThe fields specified in the update_mask are relative to the resource, not\nthe full request. A field will be overwritten if it is in the mask. If the\nuser does not provide a mask then all fields will be overwritten.", + "in": "query", + "required": true, + "schema": { + "type": "string", + "pattern": "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$", + "format": "google-fieldmask" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "allowMissing", + "description": "Optional. If set to true, and the connection is not found a new connection\nwill be created. In this situation `update_mask` is ignored.\nThe creation will succeed only if the input connection has all the\nnecessary information (e.g a github_config with both user_oauth_token and\ninstallation_id properties).", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionOperation" + } + } + } + } + } + }, + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteConnection", + "description": "Deletes a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "etag", + "description": "Optional. The current etag of the Connection.\nIf an etag is provided and does not match the current etag of the\nConnection, deletion will be blocked and an ABORTED error will be returned.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConnectionOperation" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "CreateGitRepositoryLink", + "description": "Creates a GitRepositoryLink. Upon linking a Git Repository, Developer\nConnect will configure the Git Repository to send webhook events to\nDeveloper Connect. Connections that use Firebase GitHub Application will\nhave events forwarded to the Firebase service. All other Connections will\nhave events forwarded to Cloud Build.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitRepositoryLinkId", + "description": "Required. The ID to use for the repository, which will become the final component of\nthe repository's resource name. This ID should be unique in the connection.\nAllows alphanumeric characters and any of -._~%!$&'()*+,;=@.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGitRepositoryLinkOperation" + } + } + } + } + } + }, + "get": { + "tags": ["developerconnect"], + "operationId": "ListGitRepositoryLinks", + "description": "Lists GitRepositoryLinks in a given project, location, and connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. A token identifying a page of results the server should return.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "Optional. Filtering results", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "description": "Optional. Hint for how to order the results", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListGitRepositoryLinksResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteGitRepositoryLink", + "description": "Deletes a single GitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "etag", + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteGitRepositoryLinkOperation" + } + } + } + } + } + }, + "get": { + "tags": ["developerconnect"], + "operationId": "GetGitRepositoryLink", + "description": "Gets details of a single GitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadWriteToken": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "FetchReadWriteToken", + "description": "Fetches read/write token of a given gitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadWriteTokenRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadWriteTokenResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadToken": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "FetchReadToken", + "description": "Fetches read token of a given gitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadTokenRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadTokenResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchLinkableGitRepositories": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchLinkableGitRepositories", + "description": "FetchLinkableGitRepositories returns a list of git repositories from an SCM\nthat are available to be added to a Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Number of results to return in the list. Defaults to 20.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. Page start.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLinkableGitRepositoriesResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchGitHubInstallations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchGitHubInstallations", + "description": "FetchGitHubInstallations returns the list of GitHub Installations that\nare available to be added to a Connection.\nFor github.com, only installations accessible to the authorizer token\nare returned. For GitHub Enterprise, all installations are returned.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchGitHubInstallationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchGitRefs": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchGitRefs", + "description": "Fetch the list of branches or tags for a given repository.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "refType", + "description": "Required. Type of refs to fetch.", + "in": "query", + "required": true, + "schema": { + "type": "string", + "x-google-enum-descriptions": [ + "No type specified.", + "To fetch tags.", + "To fetch branches." + ], + "enum": [ + "REF_TYPE_UNSPECIFIED", + "TAG", + "BRANCH" + ] + } + }, + { + "name": "pageSize", + "description": "Optional. Number of results to return in the list. Default to 20.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. Page start.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchGitRefsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections:processGitHubEnterpriseWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitHubEnterpriseWebhook", + "description": "ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise\ninstances for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitHubEnterpriseWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabEnterpriseWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitLabEnterpriseWebhook", + "description": "ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise\ninstances for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitLabEnterpriseWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitLabWebhook", + "description": "ProcessGitLabWebhook is called by the GitLab.com for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitLabWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListLocations", + "description": "Lists information about the supported locations for this service.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "A filter to narrow down results to a preferred subset.\nThe filtering language accepts strings like `\"displayName=tokyo\"`, and\nis documented in more detail in [AIP-160](https://google.aip.dev/160).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "The maximum number of results to return.\nIf not set, the service selects a default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "A page token received from the `next_page_token` field in the response.\nSend that page token to receive the subsequent page.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListLocationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetLocation", + "description": "Gets information about a location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + } + } + } + } + }, + "components": { + "parameters": { + "alt": { + "name": "$alt", + "description": "Data format for response.", + "schema": { + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "x-google-enum-descriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "type": "string" + }, + "in": "query" + }, + "callback": { + "name": "$callback", + "description": "JSONP", + "schema": { + "type": "string" + }, + "in": "query" + }, + "prettyPrint": { + "name": "$prettyPrint", + "description": "Returns response with indentations and line breaks.", + "schema": { + "default": "true", + "type": "boolean" + }, + "in": "query" + }, + "_.xgafv": { + "name": "$.xgafv", + "description": "V1 error format.", + "schema": { + "enum": [ + "1", + "2" + ], + "x-google-enum-descriptions": [ + "v1 error format", + "v2 error format" + ], + "type": "string" + }, + "in": "query" + } + }, + "securitySchemes": { + "google_oauth_implicit": { + "type": "oauth2", + "description": "Google Oauth 2.0 implicit authentication flow.", + "flows": { + "implicit": { + "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "google_oauth_code": { + "type": "oauth2", + "description": "Google Oauth 2.0 authorizationCode authentication flow.", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", + "tokenUrl": "https://oauth2.googleapis.com/token", + "refreshUrl": "https://oauth2.googleapis.com/token", + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "bearer_auth": { + "type": "http", + "description": "Http bearer authentication.", + "scheme": "bearer" + } + }, + "schemas": { + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer", + "format": "int32" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }", + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object" + }, + "ListConnectionsResponse": { + "description": "Message for response to listing Connections", + "type": "object", + "properties": { + "connections": { + "description": "The list of Connection", + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Connection": { + "description": "Message describing Connection object", + "type": "object", + "properties": { + "githubConfig": { + "description": "Configuration for connections to github.com.", + "allOf": [{ + "$ref": "#/components/schemas/GitHubConfig" + }] + }, + "githubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "allOf": [{ + "$ref": "#/components/schemas/GitHubEnterpriseConfig" + }] + }, + "gitlabConfig": { + "description": "Configuration for connections to gitlab.com.", + "allOf": [{ + "$ref": "#/components/schemas/GitLabConfig" + }] + }, + "gitlabEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitLab Enterprise.", + "allOf": [{ + "$ref": "#/components/schemas/GitLabEnterpriseConfig" + }] + }, + "bitbucketDataCenterConfig": { + "description": "Configuration for connections to an instance of Bitbucket Data Center.", + "allOf": [{ + "$ref": "#/components/schemas/BitbucketDataCenterConfig" + }] + }, + "bitbucketCloudConfig": { + "description": "Configuration for connections to an instance of Bitbucket Clouds.", + "allOf": [{ + "$ref": "#/components/schemas/BitbucketCloudConfig" + }] + }, + "name": { + "description": "Identifier. The resource name of the connection, in the format\n`projects/{project}/locations/{location}/connections/{connection_id}`.", + "x-google-identifier": true, + "type": "string" + }, + "createTime": { + "description": "Output only. [Output only] Create timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "updateTime": { + "description": "Output only. [Output only] Update timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "deleteTime": { + "description": "Output only. [Output only] Delete timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "labels": { + "description": "Optional. Labels as key value pairs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "installationState": { + "description": "Output only. Installation state of the Connection.", + "readOnly": true, + "allOf": [{ + "$ref": "#/components/schemas/InstallationState" + }] + }, + "disabled": { + "description": "Optional. If disabled is set to true, functionality is disabled for this connection.\nRepository based API methods and webhooks processing for repositories in\nthis connection will be disabled.", + "type": "boolean" + }, + "reconciling": { + "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", + "readOnly": true, + "type": "boolean" + }, + "annotations": { + "description": "Optional. Allows clients to store small amounts of arbitrary data.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for the Connection.", + "readOnly": true, + "type": "string" + }, + "cryptoKeyConfig": { + "description": "Optional. The crypto key configuration. This field is used by the Customer-Managed\nEncryption Keys (CMEK) feature.", + "allOf": [{ + "$ref": "#/components/schemas/CryptoKeyConfig" + }] + } + } + }, + "GitHubConfig": { + "description": "Configuration for connections to github.com.", + "type": "object", + "properties": { + "githubApp": { + "description": "Required. Immutable. The GitHub Application that was installed to the GitHub user or\norganization.", + "x-google-immutable": true, + "type": "string", + "x-google-enum-descriptions": [ + "GitHub App not specified.", + "The Developer Connect GitHub Application.", + "The Firebase GitHub Application." + ], + "enum": [ + "GIT_HUB_APP_UNSPECIFIED", + "DEVELOPER_CONNECT", + "FIREBASE" + ] + }, + "authorizerCredential": { + "description": "Optional. OAuth credential of the account that authorized the GitHub App.\nIt is recommended to use a robot account instead of a human user account.\nThe OAuth token must be tied to the GitHub App of this config.", + "allOf": [{ + "$ref": "#/components/schemas/OAuthCredential" + }] + }, + "appInstallationId": { + "description": "Optional. GitHub App installation id.", + "type": "string", + "format": "int64" + }, + "installationUri": { + "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubConfig.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "githubApp" + ] + }, + "OAuthCredential": { + "description": "Represents an OAuth token of the account that authorized the Connection,\nand associated metadata.", + "type": "object", + "properties": { + "oauthTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the OAuth token that authorizes\nthe connection. Format: `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated with this token.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "oauthTokenSecretVersion" + ] + }, + "GitHubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the GitHub Enterprise host this connection is for.", + "type": "string" + }, + "appId": { + "description": "Optional. ID of the GitHub App created from the manifest.", + "type": "string", + "format": "int64" + }, + "appSlug": { + "description": "Output only. The URL-friendly name of the GitHub App.", + "readOnly": true, + "type": "string" + }, + "privateKeySecretVersion": { + "description": "Optional. SecretManager resource containing the private key of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Optional. SecretManager resource containing the webhook secret of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "appInstallationId": { + "description": "Optional. ID of the installation of the GitHub App.", + "type": "string", + "format": "int64" + }, + "installationUri": { + "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubEnterpriseConfig.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a GitHub\nEnterprise server. This should only be set if the GitHub Enterprise server\nis hosted on-premises and not reachable by public internet. If this field\nis left empty, calls to the GitHub Enterprise server will be made over the\npublic internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "serverVersion": { + "description": "Output only. GitHub Enterprise version installed at the host_uri.", + "readOnly": true, + "type": "string" + }, + "sslCaCertificate": { + "description": "Optional. SSL certificate to use for requests to GitHub Enterprise.", + "type": "string" + } + }, + "required": [ + "hostUri" + ] + }, + "ServiceDirectoryConfig": { + "description": "ServiceDirectoryConfig represents Service Directory configuration for a\nconnection.", + "type": "object", + "properties": { + "service": { + "description": "Required. The Service Directory service name.\nFormat:\nprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", + "type": "string" + } + }, + "required": [ + "service" + ] + }, + "GitLabConfig": { + "description": "Configuration for connections to gitlab.com.", + "type": "object", + "properties": { + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + } + }, + "required": [ + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "UserCredential": { + "description": "Represents a personal access token that authorized the Connection,\nand associated metadata.", + "type": "object", + "properties": { + "userTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the user token that authorizes\nthe Developer Connect connection. Format:\n`projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated with this token.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "userTokenSecretVersion" + ] + }, + "GitLabEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitLab Enterprise.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the GitLab Enterprise host this connection is for.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a GitLab\nEnterprise instance. This should only be set if the GitLab Enterprise\nserver is hosted on-premises and not reachable by public internet. If this\nfield is left empty, calls to the GitLab Enterprise server will be made\nover the public internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "sslCaCertificate": { + "description": "Optional. SSL Certificate Authority certificate to use for requests to GitLab\nEnterprise instance.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. Version of the GitLab Enterprise server running on the `host_uri`.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "hostUri", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "BitbucketDataCenterConfig": { + "description": "Configuration for connections to an instance of Bitbucket Data Center.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the Bitbucket Data Center host this connection is for.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate webhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. An http access token with the minimum `Repository read` access.\nIt's recommended to use a system account to generate the credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. An http access token with the minimum `Repository admin` scope access. This\nis needed to create webhooks. It's recommended to use a system account to\ngenerate these credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a\nBitbucket Data Center instance. This should only be set if the Bitbucket\nData Center is hosted on-premises and not reachable by public internet. If\nthis field is left empty, calls to the Bitbucket Data Center will be made\nover the public internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "sslCaCertificate": { + "description": "Optional. SSL certificate authority to trust when making requests to Bitbucket Data\nCenter.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. Version of the Bitbucket Data Center server running on the `host_uri`.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "hostUri", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "BitbucketCloudConfig": { + "description": "Configuration for connections to an instance of Bitbucket Cloud.", + "type": "object", + "properties": { + "workspace": { + "description": "Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate and create webhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. An access token with the minimum `repository` access.\nIt can either be a workspace, project or repository access token.\nIt's recommended to use a system account to generate the credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. An access token with the minimum `repository`, `pullrequest` and `webhook`\nscope access. It can either be a workspace, project or repository access\ntoken. This is needed to create webhooks. It's recommended to use a system\naccount to generate these credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + } + }, + "required": [ + "workspace", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "InstallationState": { + "description": "Describes stage and necessary actions to be taken by the\nuser to complete the installation. Used for GitHub and GitHub Enterprise\nbased connections.", + "type": "object", + "properties": { + "stage": { + "description": "Output only. Current step of the installation process.", + "readOnly": true, + "type": "string", + "x-google-enum-descriptions": [ + "No stage specified.", + "Only for GitHub Enterprise. An App creation has been requested.\nThe user needs to confirm the creation in their GitHub enterprise host.", + "User needs to authorize the GitHub (or Enterprise) App via OAuth.", + "User needs to follow the link to install the GitHub (or Enterprise) App.", + "Installation process has been completed." + ], + "enum": [ + "STAGE_UNSPECIFIED", + "PENDING_CREATE_APP", + "PENDING_USER_OAUTH", + "PENDING_INSTALL_APP", + "COMPLETE" + ] + }, + "message": { + "description": "Output only. Message of what the user should do next to continue the installation.\nEmpty string if the installation is already complete.", + "readOnly": true, + "type": "string" + }, + "actionUri": { + "description": "Output only. Link to follow for next action. Empty string if the installation is already\ncomplete.", + "readOnly": true, + "type": "string" + } + } + }, + "CryptoKeyConfig": { + "description": "The crypto key configuration. This field is used by the Customer-managed\nencryption keys (CMEK) feature.", + "type": "object", + "properties": { + "keyReference": { + "description": "Required. The name of the key which is used to encrypt/decrypt customer data. For key\nin Cloud KMS, the key should be in the format of\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + } + }, + "required": [ + "keyReference" + ] + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "type": "object", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation\nof the operation. Operations that have been cancelled successfully\nhave google.longrunning.Operation.error value with a\ngoogle.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + } + } + }, + "GitRepositoryLink": { + "description": "Message describing the GitRepositoryLink object", + "type": "object", + "properties": { + "name": { + "description": "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`.", + "x-google-identifier": true, + "type": "string" + }, + "cloneUri": { + "description": "Required. Git Clone URI.", + "type": "string" + }, + "createTime": { + "description": "Output only. [Output only] Create timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "updateTime": { + "description": "Output only. [Output only] Update timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "deleteTime": { + "description": "Output only. [Output only] Delete timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "labels": { + "description": "Optional. Labels as key value pairs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", + "readOnly": true, + "type": "boolean" + }, + "annotations": { + "description": "Optional. Allows clients to store small amounts of arbitrary data.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for the GitRepositoryLink.", + "readOnly": true, + "type": "string" + }, + "webhookId": { + "description": "Output only. External ID of the webhook created for the repository.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "cloneUri" + ] + }, + "ListGitRepositoryLinksResponse": { + "description": "Message for response to listing GitRepositoryLinks", + "type": "object", + "properties": { + "gitRepositoryLinks": { + "description": "The list of GitRepositoryLinks", + "type": "array", + "items": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FetchReadWriteTokenRequest": { + "description": "Message for fetching SCM read/write token.", + "type": "object" + }, + "FetchReadWriteTokenResponse": { + "description": "Message for responding to get read/write token.", + "type": "object", + "properties": { + "token": { + "description": "The token content.", + "type": "string" + }, + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "type": "string", + "format": "date-time" + }, + "gitUsername": { + "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", + "type": "string" + } + } + }, + "FetchReadTokenRequest": { + "description": "Message for fetching SCM read token.", + "type": "object" + }, + "FetchReadTokenResponse": { + "description": "Message for responding to get read token.", + "type": "object", + "properties": { + "token": { + "description": "The token content.", + "type": "string" + }, + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "type": "string", + "format": "date-time" + }, + "gitUsername": { + "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", + "type": "string" + } + } + }, + "FetchLinkableGitRepositoriesResponse": { + "description": "Response message for FetchLinkableGitRepositories.", + "type": "object", + "properties": { + "linkableGitRepositories": { + "description": "The git repositories that can be linked to the connection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkableGitRepository" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + } + }, + "LinkableGitRepository": { + "description": "LinkableGitRepository represents a git repository that can be linked to a\nconnection.", + "type": "object", + "properties": { + "cloneUri": { + "description": "The clone uri of the repository.", + "type": "string" + } + } + }, + "FetchGitHubInstallationsResponse": { + "description": "Response of fetching github installations.", + "type": "object", + "properties": { + "installations": { + "description": "List of installations available to the OAuth user (for github.com)\nor all the installations (for GitHub enterprise).", + "type": "array", + "items": { + "$ref": "#/components/schemas/Installation" + } + } + } + }, + "Installation": { + "description": "Represents an installation of the GitHub App.", + "type": "object", + "properties": { + "id": { + "description": "ID of the installation in GitHub.", + "type": "string", + "format": "int64" + }, + "name": { + "description": "Name of the GitHub user or organization that owns this installation.", + "type": "string" + }, + "type": { + "description": "Either \"user\" or \"organization\".", + "type": "string" + } + } + }, + "FetchGitRefsResponse": { + "description": "Response for fetching git refs.", + "type": "object", + "properties": { + "refNames": { + "description": "Name of the refs fetched.", + "type": "array", + "items": { + "type": "string" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + } + }, + "ProcessGitHubEnterpriseWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitHubEnterpriseWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", + "type": "object", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "type": "string", + "format": "byte" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "ProcessGitLabEnterpriseWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitLabEnterpriseWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "ProcessGitLabWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitLabWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Location" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "displayName": { + "description": "The friendly name for this location, typically a nearby city name.\nFor example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + }, + "BaseOperation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "allOf": [{ + "$ref": "#/components/schemas/Status" + }] + } + } + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "response": { + "description": "The normal, successful response of the operation. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + ] + }, + "CreateConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Connection" + } + } + } + ] + }, + "UpdateConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Connection" + } + } + } + ] + }, + "DeleteConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Empty" + } + } + } + ] + }, + "CreateGitRepositoryLinkOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + ] + }, + "DeleteGitRepositoryLinkOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Empty" + } + } + } + ] + } + } + } + , + "externalDocs": { + "description": "Find more info here.", + "url": "http://cloud.google.com/developer-connect/docs/overview" + } +} diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 7fd9d60c8f18..1cdbb21ab02d 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -12,205 +12,521 @@ # limitations under the License. --- -name: 'Connection' -description: | - A connection to a GitHub App installation. -min_version: 'beta' -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' +name: Connection +description: A connection for GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. +base_url: projects/{{project}}/locations/{{location}}/connections update_mask: true +self_link: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} +create_url: projects/{{project}}/locations/{{location}}/connections?connectionId={{connection_id}} +update_verb: PATCH +id_format: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -timeouts: - insert_minutes: 20 - update_minutes: 20 - delete_minutes: 20 -autogen_async: true -async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' - operation: - base_url: '{{op_id}}' - result: - resource_inside_response: true -custom_code: + - projects/{{project}}/locations/{{location}}/connections/{{connection_id}} examples: - - name: 'developer_connect_connection_basic' + - name: 'developer_connect_connection_github' primary_resource_id: 'my-connection' primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' - min_version: 'beta' vars: connection_name: 'tf-test-connection' - name: 'developer_connect_connection_github_doc' - min_version: 'beta' exclude_test: true + - name: 'developer_connect_connection_github_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_github_enterprise_doc' + exclude_test: true + - name: 'developer_connect_connection_gitlab' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_gitlab_doc' + exclude_test: true + - name: 'developer_connect_connection_gitlab_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_gitlab_enterprise_doc' + exclude_test: true + - name: 'developer_connect_connection_bitbucket_cloud' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_bitbucket_cloud_doc' + exclude_test: true + - name: 'developer_connect_connection_bbdc' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_bbdc_doc' + exclude_test: true +autogen_async: true +async: + operation: + timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 + base_url: '{{op_id}}' + actions: + - create + - delete + - update + type: OpAsync + result: + resource_inside_response: true + error: {} + include_project: false +autogen_status: Q29ubmVjdGlvbg== parameters: - - name: 'location' + - name: location type: String - description: | - Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. - min_version: 'beta' + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true url_param_only: true required: true - immutable: true - - name: 'connectionId' + - name: connectionId type: String - description: | - Required. Id of the requesting object. If auto-generating Id server-side, - remove this field and connection_id from the method_signature of Create RPC. - min_version: 'beta' + description: |- + Required. Id of the requesting object + If auto-generating Id server-side, remove this field and + connection_id from the method_signature of Create RPC + immutable: true url_param_only: true required: true - immutable: true properties: - - name: 'githubConfig' + - name: githubConfig type: NestedObject - description: | - Configuration for connections to github.com. - min_version: 'beta' + description: Configuration for connections to github.com. properties: - - name: 'githubApp' + - name: installationUri type: String - description: | - Required. Immutable. The GitHub Application that was installed to - the GitHub user or organization. + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubConfig. + output: true + - name: githubApp + type: String + description: |- + Required. Immutable. The GitHub Application that was installed to the GitHub user or + organization. Possible values: - GIT_HUB_APP_UNSPECIFIED - DEVELOPER_CONNECT - FIREBASE" - min_version: 'beta' - required: true + GIT_HUB_APP_UNSPECIFIED + DEVELOPER_CONNECT + FIREBASE immutable: true - - name: 'authorizerCredential' + required: true + - name: authorizerCredential type: NestedObject - description: | - Represents an OAuth token of the account that authorized the Connection,and - associated metadata. - min_version: 'beta' + description: |- + Represents an OAuth token of the account that authorized the Connection, + and associated metadata. properties: - - name: 'oauthTokenSecretVersion' + - name: oauthTokenSecretVersion type: String - description: | - Required. A SecretManager resource containing the OAuth token - that authorizes the connection. - Format: `projects/*/secrets/*/versions/*`. - min_version: 'beta' + description: |- + Required. A SecretManager resource containing the OAuth token that authorizes + the connection. Format: `projects/*/secrets/*/versions/*`. required: true - - name: 'username' + - name: username type: String - description: | - Output only. The username associated with this token. - min_version: 'beta' + description: Output only. The username associated with this token. output: true - - name: 'appInstallationId' + - name: appInstallationId + type: String + description: Optional. GitHub App installation id. + - name: githubEnterpriseConfig + type: NestedObject + description: Configuration for connections to an instance of GitHub Enterprise. + properties: + - name: appSlug + type: String + description: Output only. The URL-friendly name of the GitHub App. + output: true + - name: privateKeySecretVersion type: String - description: | - Optional. GitHub App installation id. - min_version: 'beta' - - name: 'installationUri' + description: |- + Optional. SecretManager resource containing the private key of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: installationUri + type: String + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubEnterpriseConfig. + output: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: serverVersion type: String - description: | - Output only. The URI to navigate to in order to manage the installation - associated with this GitHubConfig. - min_version: 'beta' + description: Output only. GitHub Enterprise version installed at the host_uri. output: true - - name: 'name' + - name: sslCaCertificate + type: String + description: Optional. SSL certificate to use for requests to GitHub Enterprise. + - name: hostUri + type: String + description: Required. The URI of the GitHub Enterprise host this connection is for. + required: true + - name: appId + type: String + description: Optional. ID of the GitHub App created from the manifest. + - name: webhookSecretSecretVersion + type: String + description: |- + Optional. SecretManager resource containing the webhook secret of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: appInstallationId + type: String + description: Optional. ID of the installation of the GitHub App. + - name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs + - name: etag + type: String + description: |- + Optional. This checksum is computed by the server based on the value of other + fields, and may be sent on update and delete requests to ensure the + client has an up-to-date value before proceeding. + - name: uid + type: String + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. + output: true + - name: name type: String - description: | + description: |- Identifier. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`. - min_version: 'beta' output: true - - name: 'createTime' - type: String - description: | - Output only. [Output only] Create timestamp - min_version: 'beta' + - name: reconciling + type: Boolean + description: |- + Output only. Set to true when the connection is being set up or updated in the + background. output: true - - name: 'updateTime' + - name: gitlabEnterpriseConfig + type: NestedObject + description: Configuration for connections to an instance of GitLab Enterprise. + properties: + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: sslCaCertificate + type: String + description: |- + Optional. SSL Certificate Authority certificate to use for requests to GitLab + Enterprise instance. + - name: serverVersion + type: String + description: Output only. Version of the GitLab Enterprise server running on the `host_uri`. + output: true + - name: hostUri + type: String + description: Required. The URI of the GitLab Enterprise host this connection is for. + required: true + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: bitbucketCloudConfig + type: NestedObject + description: Configuration for connections to an instance of Bitbucket Cloud. + properties: + - name: workspace + type: String + description: Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform. + required: true + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook + events, formatted as `projects/*/secrets/*/versions/*`. This is used to + validate and create webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: bitbucketDataCenterConfig + type: NestedObject + description: Configuration for connections to an instance of Bitbucket Data Center. + properties: + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook + events, formatted as `projects/*/secrets/*/versions/*`. This is used to + validate webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: sslCaCertificate + type: String + description: |- + Optional. SSL certificate authority to trust when making requests to Bitbucket Data + Center. + - name: serverVersion + type: String + description: Output only. Version of the Bitbucket Data Center server running on the `host_uri`. + output: true + - name: hostUri + type: String + description: Required. The URI of the Bitbucket Data Center host this connection is for. + required: true + - name: updateTime type: String - description: | - Output only. [Output only] Update timestamp - min_version: 'beta' + description: Output only. [Output only] Update timestamp output: true - - name: 'deleteTime' + - name: deleteTime type: String - description: | - Output only. [Output only] Delete timestamp - min_version: 'beta' + description: Output only. [Output only] Delete timestamp output: true - - name: 'labels' - type: KeyValueLabels - description: | - Optional. Labels as key value pairs - min_version: 'beta' - - name: 'installationState' + - name: installationState type: NestedObject - description: | - Describes stage and necessary actions to be taken by the user to complete the installation. - Used for GitHub and GitHub Enterprise based connections. - min_version: 'beta' + description: |- + Describes stage and necessary actions to be taken by the + user to complete the installation. Used for GitHub and GitHub Enterprise + based connections. output: true properties: - - name: 'stage' + - name: message + type: String + description: |- + Output only. Message of what the user should do next to continue the installation. + Empty string if the installation is already complete. + - name: actionUri + type: String + description: |- + Output only. Link to follow for next action. Empty string if the installation is already + complete. + - name: stage type: String - description: | + description: |- Output only. Current step of the installation process. Possible values: - STAGE_UNSPECIFIED - PENDING_CREATE_APP - PENDING_USER_OAUTH - PENDING_INSTALL_APP - COMPLETE - min_version: 'beta' + STAGE_UNSPECIFIED + PENDING_CREATE_APP + PENDING_USER_OAUTH + PENDING_INSTALL_APP + COMPLETE output: true - - name: 'message' - type: String - description: | - Output only. Message of what the user should do next to continue - the installation.Empty string if the installation is already complete. - min_version: 'beta' - - name: 'actionUri' - type: String - description: | - Output only. Link to follow for next action. Empty string if the - installation is already complete. - min_version: 'beta' - - name: 'disabled' + - name: disabled type: Boolean - description: - Optional. If disabled is set to true, functionality is disabled for - this connection. Repository based API methods and webhooks processing - for repositories in this connection will be disabled. - min_version: 'beta' - - name: 'reconciling' - type: Boolean - description: | - Output only. Set to true when the connection is being set up or updated - in the background. - min_version: 'beta' - output: true - - name: 'annotations' + description: |- + Optional. If disabled is set to true, functionality is disabled for this connection. + Repository based API methods and webhooks processing for repositories in + this connection will be disabled. + - name: annotations type: KeyValueAnnotations - description: | - Optional. Allows clients to store small amounts of arbitrary data. - min_version: 'beta' - - name: 'etag' - type: String - description: | - Optional. This checksum is computed by the server based on the value - of other fields, and may be sent on update and delete requests to ensure the - client has an up-to-date value before proceeding. - min_version: 'beta' - - name: 'uid' + description: Optional. Allows clients to store small amounts of arbitrary data. + - name: gitlabConfig + type: NestedObject + description: Configuration for connections to gitlab.com. + properties: + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: createTime type: String - description: | - Output only. A system-assigned unique identifier for a the GitRepositoryLink. - min_version: 'beta' + description: Output only. [Output only] Create timestamp output: true + - name: cryptoKeyConfig + type: NestedObject + description: |- + The crypto key configuration. This field is used by the Customer-managed + encryption keys (CMEK) feature. + properties: + - name: keyReference + type: String + description: |- + Required. The name of the key which is used to encrypt/decrypt customer data. For key + in Cloud KMS, the key should be in the format of + `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + required: true diff --git a/mmv1/products/developerconnect/GitRepositoryLink.yaml b/mmv1/products/developerconnect/GitRepositoryLink.yaml index 7a0f083e3bf8..d65ae4f34f2c 100644 --- a/mmv1/products/developerconnect/GitRepositoryLink.yaml +++ b/mmv1/products/developerconnect/GitRepositoryLink.yaml @@ -12,124 +12,156 @@ # limitations under the License. --- -name: 'GitRepositoryLink' -description: "A git repository link to a parent connection." -min_version: 'beta' -docs: -id_format: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks' -self_link: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}}' +name: GitRepositoryLink +description: A git repository link to a parent connection. +base_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks immutable: true +self_link: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} +create_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}} +id_format: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -timeouts: - insert_minutes: 20 - update_minutes: 20 - delete_minutes: 20 -autogen_async: true -async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' - operation: - base_url: '{{op_id}}' - result: - resource_inside_response: true -custom_code: + - projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} examples: # These tests depend on secrets stored in a separate project, so we prefer not # to show them in the docs. - name: 'developer_connect_git_repository_link_github' primary_resource_id: 'primary' - min_version: 'beta' vars: connection_name: 'my-connection' git_repository_link_name: 'my-repository' exclude_docs: true - name: 'developer_connect_git_repository_link_github_doc' - min_version: 'beta' exclude_test: true + - name: 'developer_connect_git_repository_link_github_enterprise' + primary_resource_id: 'primary' + vars: + connection_name: 'my-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_github_enterprise_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_gitlab' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_gitlab_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_gitlab_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_gitlab_enterprise_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_bbdc' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud_doc' + exclude_test: true +autogen_async: true +async: + operation: + timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 + base_url: '{{op_id}}' + actions: + - create + - delete + - update + type: OpAsync + result: + resource_inside_response: true + error: {} + include_project: false +autogen_status: R2l0UmVwb3NpdG9yeUxpbms= parameters: - - name: 'location' + - name: location type: String - description: - "Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. " - min_version: 'beta' + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true url_param_only: true required: true - immutable: true - - name: 'parent_connection' + - name: parent_connection type: String - description: - "Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. " - min_version: 'beta' + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true url_param_only: true required: true - immutable: true - - name: 'gitRepositoryLinkId' + - name: gitRepositoryLinkId type: String - description: - "Required. The ID to use for the repository, which will become the - final component of\nthe repository's resource name. This ID should be unique in - the connection.\nAllows alphanumeric characters and any of -._~%!$&'()*+,;=@. " - min_version: 'beta' + description: |- + Required. The ID to use for the repository, which will become the final component of + the repository's resource name. This ID should be unique in the connection. + Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. + immutable: true url_param_only: true required: true - immutable: true properties: - - name: 'name' - type: String - description: "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`. " - min_version: 'beta' - output: true - - name: 'cloneUri' + - name: cloneUri type: String - description: "Required. Git Clone URI. " - min_version: 'beta' + description: Required. Git Clone URI. required: true - - name: 'createTime' + - name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs + - name: annotations + type: KeyValueAnnotations + description: Optional. Allows clients to store small amounts of arbitrary data. + - name: uid type: String - description: "Output only. [Output only] Create timestamp " - min_version: 'beta' + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. output: true - - name: 'updateTime' + - name: name type: String - description: "Output only. [Output only] Update timestamp " - min_version: 'beta' + description: |- + Identifier. Resource name of the repository, in the format + `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. output: true - - name: 'deleteTime' + - name: updateTime type: String - description: "Output only. [Output only] Delete timestamp " - min_version: 'beta' + description: Output only. [Output only] Update timestamp output: true - - name: 'labels' - type: KeyValueLabels - description: "Optional. Labels as key value pairs " - min_version: 'beta' - - name: 'etag' + - name: deleteTime + type: String + description: Output only. [Output only] Delete timestamp + output: true + - name: etag type: String - description: - "Optional. This checksum is computed by the server based on the value - of other\nfields, and may be sent on update and delete requests to ensure the\nclient - has an up-to-date value before proceeding. " - min_version: 'beta' - - name: 'reconciling' + description: |- + Optional. This checksum is computed by the server based on the value of other + fields, and may be sent on update and delete requests to ensure the + client has an up-to-date value before proceeding. + - name: reconciling type: Boolean - description: - "Output only. Set to true when the connection is being set up or updated - in the\nbackground. " - min_version: 'beta' + description: |- + Output only. Set to true when the connection is being set up or updated in the + background. output: true - - name: 'annotations' - type: KeyValueAnnotations - description: "Optional. Allows clients to store small amounts of arbitrary data. " - min_version: 'beta' - - name: 'uid' + - name: webhookId + type: String + description: Output only. External ID of the webhook created for the repository. + output: true + - name: createTime type: String - description: "Output only. A system-assigned unique identifier for a the GitRepositoryLink. " - min_version: 'beta' + description: Output only. [Output only] Create timestamp output: true diff --git a/mmv1/products/developerconnect/product.yaml b/mmv1/products/developerconnect/product.yaml index 5a32e127e0af..ee8ce01b6678 100644 --- a/mmv1/products/developerconnect/product.yaml +++ b/mmv1/products/developerconnect/product.yaml @@ -12,10 +12,11 @@ # limitations under the License. --- -name: 'DeveloperConnect' -display_name: 'Developer Connect' -versions: - - name: 'beta' - base_url: 'https://developerconnect.googleapis.com/v1/' +name: DeveloperConnect +display_name: Developer Connect scopes: - 'https://www.googleapis.com/auth/cloud-platform' +versions: + - base_url: 'https://developerconnect.googleapis.com/v1/' + name: ga +caibaseurl: "" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl new file mode 100644 index 000000000000..266515e11928 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl @@ -0,0 +1,18 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl new file mode 100644 index 000000000000..e8a424184423 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl @@ -0,0 +1,83 @@ +resource "google_secret_manager_secret" "bbdc-read-cred-secret" { + secret_id = "bbdc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-read-cred-secret.id + secret_data = file("my-bbdc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-auth-cred-secret" { + secret_id = "bbdc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-auth-cred-secret.id + secret_data = file("my-bbdc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-webhook-secret-secret" { + secret_id = "bbdc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbdc-webhook-secret-secret.id + secret_data = file("my-bbdc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbdc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbdc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbdc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + host_uri = "https://bitbucket-test-server.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbdc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl new file mode 100644 index 000000000000..382f5abc2302 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl @@ -0,0 +1,17 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl new file mode 100644 index 000000000000..3147391380cd --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl @@ -0,0 +1,83 @@ +resource "google_secret_manager_secret" "bbc-read-cred-secret" { + secret_id = "bbc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbc-read-cred-secret.id + secret_data = file("my-bbc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-auth-cred-secret" { + secret_id = "bbc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbc-auth-cred-secret.id + secret_data = file("my-bbc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-webhook-secret-secret" { + secret_id = "bbc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbc-webhook-secret-secret.id + secret_data = file("my-bbc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + workspace = "test-workspace" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl similarity index 94% rename from mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl rename to mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl index 693baf83874b..97d07f9deacf 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl @@ -1,5 +1,4 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { - provider = google-beta location = "us-central1" connection_id = "{{index $.Vars "connection_name"}}" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl index 07933b8641b4..4fe608a1bede 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl @@ -1,6 +1,5 @@ resource "google_secret_manager_secret" "github-token-secret" { - provider = google-beta secret_id = "github-token-secret" replication { @@ -10,7 +9,6 @@ resource "google_secret_manager_secret" "github-token-secret" { resource "google_secret_manager_secret_version" "github-token-secret-version" { - provider = google-beta secret = google_secret_manager_secret.github-token-secret.id secret_data = file("my-github-token.txt") } @@ -25,14 +23,12 @@ data "google_iam_policy" "p4sa-secretAccessor" { resource "google_secret_manager_secret_iam_policy" "policy" { - provider = google-beta secret_id = google_secret_manager_secret.github-token-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "my-connection" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl new file mode 100644 index 000000000000..1ded312974f5 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl @@ -0,0 +1,12 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..456a7d34e8ca --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl @@ -0,0 +1,61 @@ +resource "google_secret_manager_secret" "private-key-secret" { + secret_id = "ghe-pk-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "private-key-secret-version" { + secret = google_secret_manager_secret.private-key-secret.id + secret_data = file("private-key.pem") +} + +resource "google_secret_manager_secret" "webhook-secret-secret" { + secret_id = "ghe-token-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "webhook-secret-secret-version" { + secret = google_secret_manager_secret.webhook-secret-secret.id + secret_data = "" +} + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-pk" { + secret_id = google_secret_manager_secret.private-key-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-whs" { + secret_id = google_secret_manager_secret.webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "my-connection" + + github_enterprise_config { + host_uri = "https://ghe.com" + private_key_secret_version = google_secret_manager_secret_version.private-key-secret-version.id + webhook_secret_secret_version = google_secret_manager_secret_version.webhook-secret-secret-version.id + app_id = 100 + app_installation_id = 123123 + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-pk, + google_secret_manager_secret_iam_policy.policy-whs + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl new file mode 100644 index 000000000000..e62e64a88461 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl @@ -0,0 +1,16 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl new file mode 100644 index 000000000000..51c2f4714f38 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -0,0 +1,81 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl new file mode 100644 index 000000000000..dcf4fa7847a2 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl @@ -0,0 +1,18 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..1ff9b798b57a --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl @@ -0,0 +1,83 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_enterprise_config { + host_uri = "https://gle.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl new file mode 100644 index 000000000000..75fbe0252e68 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl @@ -0,0 +1,29 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.bbdc_conn.connection_id + clone_uri = "https://bitbucket-us-central.gcb-test.com/scm/test/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "bbdc_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl new file mode 100644 index 000000000000..4a72567e7ccd --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl @@ -0,0 +1,90 @@ +resource "google_secret_manager_secret" "bbdc-read-cred-secret" { + secret_id = "bbdc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-read-cred-secret.id + secret_data = file("my-bbdc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-auth-cred-secret" { + secret_id = "bbdc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-auth-cred-secret.id + secret_data = file("my-bbdc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-webhook-secret-secret" { + secret_id = "bbdc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbdc-webhook-secret-secret.id + secret_data = file("my-bbdc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbdc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbdc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbdc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + host_uri = "https://bitbucket-test-server.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbdc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://bitbucket-test-server.com/scm/test/myrepo.git" +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl new file mode 100644 index 000000000000..4904a24e500e --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl @@ -0,0 +1,29 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.bbc_conn.connection_id + clone_uri = "https://bitbucket.org/proctor-test-dc/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "bbc_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl new file mode 100644 index 000000000000..4b06ea8d6ba1 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl @@ -0,0 +1,90 @@ +resource "google_secret_manager_secret" "bbc-read-cred-secret" { + secret_id = "bbc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbc-read-cred-secret.id + secret_data = file("my-bbc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-auth-cred-secret" { + secret_id = "bbc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbc-auth-cred-secret.id + secret_data = file("my-bbc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-webhook-secret-secret" { + secret_id = "bbc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbc-webhook-secret-secret.id + secret_data = file("my-bbc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + workspace = "test-workspace" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://bitbucket.org/test-workspace/myrepo.git" +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl index 1c253849206f..b673c58bfbb9 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl @@ -1,17 +1,15 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { - provider = google-beta - git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.github_conn.connection_id - clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" - location = "us-central1" - annotations = {} + clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" + location = "us-central1" + annotations = {} + labels = {} } - -resource "google_developer_connect_connection" "github_conn" { - provider = google-beta +resource "google_developer_connect_connection" "github_conn" { location = "us-central1" - connection_id = "{{index $.Vars "connection_name"}}" + connection_id = "{{index $.Vars "connection_name"}}" disabled = false github_config { @@ -23,3 +21,4 @@ resource "google_developer_connect_connection" "github_conn" { } } } + diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl index db9d1943ebb4..8f3b566677d5 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl @@ -1,5 +1,4 @@ resource "google_secret_manager_secret" "github-token-secret" { - provider = google-beta secret_id = "github-token-secret" replication { @@ -42,5 +41,5 @@ resource "google_developer_connect_git_repository_link" "my-repository" { location = "us-central1" git_repository_link_id = "my-repo" parent_connection = google_developer_connect_connection.my-connection.connection_id - remote_uri = "https://github.com/myuser/myrepo.git" + clone_uri = "https://github.com/myuser/myrepo.git" } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl new file mode 100644 index 000000000000..1633252ef757 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl @@ -0,0 +1,23 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.github_enterprise_conn.connection_id + clone_uri = "https://ghe.proctor-staging-test.com/proctorteam/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "github_enterprise_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..fbf9a62e188e --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl @@ -0,0 +1,68 @@ +resource "google_secret_manager_secret" "private-key-secret" { + secret_id = "ghe-pk-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "private-key-secret-version" { + secret = google_secret_manager_secret.private-key-secret.id + secret_data = file("private-key.pem") +} + +resource "google_secret_manager_secret" "webhook-secret-secret" { + secret_id = "ghe-token-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "webhook-secret-secret-version" { + secret = google_secret_manager_secret.webhook-secret-secret.id + secret_data = "" +} + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-pk" { + secret_id = google_secret_manager_secret.private-key-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-whs" { + secret_id = google_secret_manager_secret.webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "my-connection" + + github_enterprise_config { + host_uri = "https://ghe.com" + private_key_secret_version = google_secret_manager_secret_version.private-key-secret-version.id + webhook_secret_secret_version = google_secret_manager_secret_version.webhook-secret-secret-version.id + app_id = 100 + app_installation_id = 123123 + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-pk, + google_secret_manager_secret_iam_policy.policy-whs + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://ghe.com/myuser/myrepo.git" +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl new file mode 100644 index 000000000000..d82f50cdeceb --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl @@ -0,0 +1,27 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.gitlab_conn.connection_id + clone_uri = "https://gitlab.com/devconnect-eng-team/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "gitlab_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl new file mode 100644 index 000000000000..0b56a9bfeecd --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl @@ -0,0 +1,88 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://gitlab.com/myuser/myrepo.git" +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl new file mode 100644 index 000000000000..567c08694359 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl @@ -0,0 +1,29 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.gitlab_enterprise_conn.connection_id + clone_uri = "https://gle-us-central1.gcb-test.com/test-group/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "gitlab_enterprise_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..5e61679d339f --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl @@ -0,0 +1,90 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_enterprise_config { + host_uri = "https://gle.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://gle.com/myuser/myrepo.git" +} diff --git a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl index 717d43ef0330..2c58f64d3ad6 100644 --- a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl +++ b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl @@ -1,15 +1,15 @@ package developerconnect_test -{{- if ne $.TargetVersionName "ga" }} import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-provider-google/google/acctest" + ) -func TestAccDeveloperConnectConnection_update(t *testing.T) { +func TestAccDeveloperConnectConnection_developerConnectConnectionGithubUpdate(t *testing.T) { t.Parallel() context := map[string]interface{}{ @@ -18,10 +18,10 @@ func TestAccDeveloperConnectConnection_update(t *testing.T) { acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { - Config: testAccDeveloperConnectConnection_basic(context), + Config: testAccDeveloperConnectConnection_Github(context), }, { ResourceName: "google_developer_connect_connection.my-connection", @@ -30,22 +30,22 @@ func TestAccDeveloperConnectConnection_update(t *testing.T) { ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, }, { - Config: testAccDeveloperConnectConnection_update(context), + Config: testAccDeveloperConnectConnection_GithubUpdate(context), }, { ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, }, }) } -func testAccDeveloperConnectConnection_basic(context map[string]interface{}) string { - return acctest.Nprintf(` + +func testAccDeveloperConnectConnection_Github(context map[string]interface{}) string { + return acctest.Nprintf(` resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" @@ -61,12 +61,17 @@ resource "google_developer_connect_connection" "my-connection" { } -func testAccDeveloperConnectConnection_update(context map[string]interface{}) string { +func testAccDeveloperConnectConnection_GithubUpdate(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } github_config { github_app = "DEVELOPER_CONNECT" @@ -80,4 +85,591 @@ resource "google_developer_connect_connection" "my-connection" { `, context) } -{{ end }} + +func TestAccDeveloperConnectConnection_developerConnectConnectionGithubEnterpriseUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GithubEnterprise(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "labels", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GithubEnterprise(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_GhePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GhePrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GhePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + github_enterprise_config { + host_uri = "https://ghe.proctor-private-ca.com" + app_id = 26 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/ghe-priv-private-key/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 24 + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIEXTCCA0WgAwIBAgIUANaBCc9j/xdKJHU0sgmv6yE2WCIwDQYJKoZIhvcNAQEL\nBQAwLDEUMBIGA1UEChMLUHJvY3RvciBFbmcxFDASBgNVBAMTC1Byb2N0b3ItZW5n\nMB4XDTIxMDcxNTIwMDcwMloXDTIyMDcxNTIwMDcwMVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMVel7I88DkhwW445BNPBZvJNTV1AreHdz4um4U1\nop2+4L7JeNrUs5SRc0fzeOyOmA9ZzTDu9hBC7zj/sVNUy6cIQGCj32sr5SCAEIat\nnFZlzmVqJPT4J5NAaE37KO5347myTJEBrvpq8az4CtvX0yUzPK0gbUmaSaztVi4o\ndbJLKyv575xCLC/Hu6fIHBDH19eG1Ath9VpuAOkttRRoxu2VqijJZrGqaS+0o+OX\nrLi5HMtZbZjgQB4mc1g3ZDKX/gynxr+CDNaqNOqxuog33Tl5OcOk9DrR3MInaE7F\nyQFuH9mzF64AqOoTf7Tr/eAIz5XVt8K51nk+fSybEfKVwtMCAwEAAaOCAaEwggGd\nMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQU/9dYyqMz\nv9rOMwPZcoIRMDAQCjAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDCB\njQYIKwYBBQUHAQEEgYAwfjB8BggrBgEFBQcwAoZwaHR0cDovL3ByaXZhdGVjYS1j\nb250ZW50LTYxYWEyYzA5LTAwMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9y\nYWdlLmdvb2dsZWFwaXMuY29tLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NhLmNydDAo\nBgNVHREBAf8EHjAcghpnaGUucHJvY3Rvci1wcml2YXRlLWNhLmNvbTCBggYDVR0f\nBHsweTB3oHWgc4ZxaHR0cDovL3ByaXZhdGVjYS1jb250ZW50LTYxYWEyYzA5LTAw\nMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9yYWdlLmdvb2dsZWFwaXMuY29t\nLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NybC5jcmwwDQYJKoZIhvcNAQELBQADggEB\nABo6BQLEZZ+YNiDuv2sRvcxSopQQb7fZjqIA9XOA35pNSKay2SncODnNvfsdRnOp\ncoy25sQSIzWyJ9zWl8DZ6evoOu5csZ2PoFqx5LsIq37w+ZcwD6DM8Zm7JqASxmxx\nGqTF0nHC4Aw8q8aJBeRD3PsSkfN5Q3DP3nTDnLyd0l+yPIkHUbZMoiFHX3BkhCng\nG96mYy/y3t16ghfV9lZkXpD/JK5aiN0bTHCDRc69owgfYiAcAqzBJ9gfZ90MBgzv\ngTTQel5dHg49SYXfnUpTy0HdQLEcoggOF8Q8V+xKdKa6eVbrvjJrkEJmvIQI5iCR\nhNvKR25mx8JUopqEXmONmqU=\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIDSDCCAjCgAwIBAgITMwWN+62nLcgyLa7p+jD1K90g6TANBgkqhkiG9w0BAQsF\nADAsMRQwEgYDVQQKEwtQcm9jdG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcw\nHhcNMjEwNzEyMTM1OTQ0WhcNMzEwNzEwMTM1OTQzWjAsMRQwEgYDVQQKEwtQcm9j\ndG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcwggEiMA0GCSqGSIb3DQEBAQUA\nA4IBDwAwggEKAoIBAQCYqJP5Qt90jIbld2dtuUV/zIkBFsTe4fapJfhBji03xBpN\nO1Yxj/jPSZ67Kdeoy0lEwvc2hL5FQGhIjLMR0mzOyN4fk/DZiA/4tAVi7hJyqpUC\n71JSwp7MwXL1b26CSE1MhcoCqA/E4iZxfJfF/ef4lhmC24UEmu8FEbldoy+6OysB\nRu7dGDwicW5F9h7eSkpGAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-github" + } + } + +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_Gitlab(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_GitlabUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_Gitlab(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GitlabUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} +`, context) +} + +func TestAccDeveloperConnectConnection_GlePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GlePrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GlePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + gitlab_enterprise_config { + host_uri = "https://gle-us.gle-us-private.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gle-private-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gle-private-api/versions/latest" + } + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIFbjCCA1agAwIBAgIUH+nsWsqagMW9Ld8E9J71yPLPpD8wDQYJKoZIhvcNAQEL\nBQAwJDEiMCAGA1UEAwwZZ2xlLXVzLmdsZS11cy1wcml2YXRlLmNvbTAeFw0yNDEw\nMzExNjQzMjBaFw0zNDEwMjkxNjQzMjBaMCQxIjAgBgNVBAMMGWdsZS11cy5nbGUt\ndXMtcHJpdmF0ZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDL\n+dUU8MHo+Eskx4SSnI1thRIiljgsyJSzSOplaD4lqahFnrG0cB0ovKpyRL4A+0wM\nzVW7W1Pfi8DiEOxxfNo7pEj+0zrzJHHqnzW9kApIlRmO1TBBJ7i9HaVamJ1Od01b\n2WI/pnKFEvNfLQSDQBulhkHZ2McyauDhb1DxefKnVX8ac6qhxtc4IzrezIQuJ18N\nDPtNLUDD4rtU4mIX4lx1yBIplrgypAo1HDbJOwW8OR76MtjAY7ek3K6UCyduQtwy\nmfZ23b3Eg69W10HVMVTy6m5NaGKi/TWy2MJ71hKUQ1+tWIPH5SL7FzYPKL4XXw5W\np61LhIiBAd2tgD41b2cQxhUbVifc1qHtnwNz/tE77M9ySH37rEUIlExzr3D3JV+f\nXjXEXUr9as8GRnS5zhD/opKe7wKbwpYMHhylK1h6XH/sBO7dBajf5xCvpZZBDzrK\nkpTqwHspT7p40WF9d8odjEk/xZKn5LdcDG2I+4U7SVS5e8ud41HUQxJwQx56lKfh\n2WB+zs7nSyMfspTj4doY1OADEC1VQCyGrwlbclKTKmUWrgwQdm38KxDzW5Juyjmm\nzvfsWIlSMdnes0qVVo38N3Jz8/MHCLD79R2veWgA2fbqS3+4h2dRkR7htjaVlJMJ\nt7SwFiG39ic3OZpo+wTkaHlG4CBnbFDueUsOW2wEpQIDAQABo4GXMIGUMB0GA1Ud\nDgQWBBTExgzH2gz9+rJHvlTFPO0AvG88azAfBgNVHSMEGDAWgBTExgzH2gz9+rJH\nvlTFPO0AvG88azAPBgNVHRMBAf8EBTADAQH/MEEGA1UdEQQ6MDiCGWdsZS11cy5n\nbGUtdXMtcHJpdmF0ZS5jb22CGyouZ2xlLXVzLmdsZS11cy1wcml2YXRlLmNvbTAN\nBgkqhkiG9w0BAQsFAAOCAgEAjkd1ZNoekoWrmozD+Ta1OM0zWhv04eqhP8aYzhbd\nXRS+GyF6ifMwfWg9HogkH22ZPT5GszaL5DacSyOUqZgJ905Q6g1EFPnaKmFVHHeC\nzZAhg5oedAzcakZpYwZDSiLuPgsQfwgRnqWIYR8JcIM5bKRZNGyOg8eZ8cKu23A2\nPavL4B3Ra1l93KllKm21rigIhLPIPLoEyxEg9c9oTJF92r0+aRdf2Ln853260Fqf\ncEUWoXhqMGvDv/YEbqDjGQ/Kh7ZWdlIWhcKFOA0gluF7oExjt/MgSitukgg3aaic\n/eXXOrZDNYH7Ve610NUuNlhub1M47Tp7EgjUJVWlsKK84T8ZcZq7Hn4BzioUr95d\nHao6u19HWA/ISM8bwzHaYxscFI4u6phEL0HJzLf4EysEmS0rAnLxyol0apNx6znR\nhXsqxnSexKhXoLqnK1Vuhcg8DsvobXHqg68EGZ7BZ3ycPYaHSWU8Xh3l1gtYkcQ6\nzxXsKIijlpVKuYJvGA3EOMoZu6+2MYF8Tgp3N4sKMvPhqBhsmgxOYF5OkAbGlsUP\nyCYWFDBFHmbhvUu5JpbKuID2CPkBi16EetemvMQ9PGlLq/0fO/BBNkn6TYn9Kvg8\nAyvuONz54uFEAIKPCcZIosa3ml+5/pt+tBhtVzHA6vMxn18IYaNpuTwSxi/+M10K\nRjw=\n-----END CERTIFICATE-----\n" + + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-gle" + } + } + +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabEnterpriseUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GitlabEnterprise(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GitlabEnterprise(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionBitbucketCloudUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BitbucketCloud(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_BitbucketCloud(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BitbucketCloud(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_BitbucketCloudUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionBitbucketDataCenterUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BitbucketDataCenter(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_BitbucketDataCenterUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BitbucketDataCenter(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_BitbucketDataCenterUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} +`, context) +} + +func TestAccDeveloperConnectConnection_BbdcPrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BbdcPrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BbdcPrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + bitbucket_data_center_config { + host_uri = "https://private-bitbucket.proctor-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-priv-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-priv-auth-token/versions/latest" + } + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIDjDCCAnSgAwIBAgIUBh5+3oeT1vmUSS5rSNaFfy6igSAwDQYJKoZIhvcNAQEL\nBQAwVzELMAkGA1UEBhMCVVMxGzAZBgNVBAoMEkdvb2dsZSBDbG91ZCBCdWlsZDEr\nMCkGA1UEAwwicHJpdmF0ZS1iaXRidWNrZXQucHJvY3Rvci10ZXN0LmNvbTAeFw0y\nMzEyMTIyMzI5NTlaFw0yNDEyMTEyMzI5NTlaMFcxCzAJBgNVBAYTAlVTMRswGQYD\nVQQKDBJHb29nbGUgQ2xvdWQgQnVpbGQxKzApBgNVBAMMInByaXZhdGUtYml0YnVj\na2V0LnByb2N0b3ItdGVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQCNfMx4ImGD4imZR64RbmRtpUNmypDokx2/S9kgobmyNvBWeSgRVhOGHGbU\nUgyvENcEg803K8unwF2jF6sdGrocRnIdPpr2tUoViOM2Ss6ds+TD8a2kqBA6+hmQ\nOMJiEIirpGT3Mw1pYTpuLisfIeeuuYssoS5k18kFLZ+Mk6MUSAHCgC8EowUZLGBZ\nagh9OhrjpMSXyidv+2d7FKTh/k3BWffVkDXehjvWjcr47hSvQwqW5m773ewCq0uD\nwxUgO6MAAAxLJz15cjhfvk4ishgSqcp49IZrx+xsNCLbHjPVyGkrL2OhgFaGsQS/\nq6GkXYfJ1sJYrf5Xm1EXbZlQZzJPAgMBAAGjUDBOMC0GA1UdEQQmMCSCInByaXZh\ndGUtYml0YnVja2V0LnByb2N0b3ItdGVzdC5jb20wHQYDVR0OBBYEFISmuuTpHKMB\n+m1h62gEqg1ovC86MA0GCSqGSIb3DQEBCwUAA4IBAQAwIwR6pIum9EZyLtC438Q1\nEgH3SKqbdyMFCkFSBvr4WfFU6ja1pn5ZxzJWt5TRFlI9GMy7BupQrxJGebOiFuUC\noNJpc4QDt9a0/GKh48DGF7uKo9XK33p0v1ahq3ewNT/CUnHewQNX7aXXP1/rL+br\nZPA20XWURUTviMik7DdhaXKQv76K9coI3H74heeBUp+OHKgUkqA3D1QIGNRGOKos\n4z6MyBWVpMUIeJQGtIQBd9CY1hBN231iG1+hdOlOMwgyNVK2GS738r+HbngFo9v4\nh2I1HMUHVcHiPQLqwZ2/OTmTmF1aWCUbhnAvoisu20rHVcGnVIOqMrHYFzdGr3ZQ\n-----END CERTIFICATE-----\n" + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-bbdc" + } + } +} +`, context) +}