Skip to content

Commit

Permalink
remove changes to git repository link resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnarayanan committed Dec 18, 2024
1 parent 0a6f24d commit d9f5d97
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 432 deletions.
172 changes: 74 additions & 98 deletions mmv1/products/developerconnect/GitRepositoryLink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,35 @@
# limitations under the License.

---
name: GitRepositoryLink
description: A git repository link to a parent connection.
base_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks
name: 'GitRepositoryLink'
description: "A git repository link to a parent connection."
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}}'
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}}
- '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}}'
path: 'name'
wait_ms: 1000
result:
path: 'response'
resource_inside_response: true
error:
path: 'error'
message: 'message'
custom_code:
examples:
# These tests depend on secrets stored in a separate project, so we prefer not
# to show them in the docs.
Expand All @@ -32,118 +52,74 @@ examples:
exclude_docs: true
- name: 'developer_connect_git_repository_link_github_doc'
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
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.
immutable: true
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`. "
url_param_only: true
required: true
- 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.
immutable: true
- 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`. "
url_param_only: true
required: true
- name: gitRepositoryLinkId
type: String
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
- 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 -._~%!$&'()*+,;=@. "
url_param_only: true
required: true
immutable: true
properties:
- name: cloneUri
- name: 'name'
type: String
description: Required. Git Clone URI.
required: true
- 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. A system-assigned unique identifier for a the GitRepositoryLink.
description: "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`. "
output: true
- name: name
- name: 'cloneUri'
type: String
description: |-
Identifier. Resource name of the repository, in the format
`projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
output: true
- name: updateTime
description: "Required. Git Clone URI. "
required: true
- name: 'createTime'
type: String
description: Output only. [Output only] Update timestamp
description: "Output only. [Output only] Create timestamp "
output: true
- name: deleteTime
- name: 'updateTime'
type: String
description: Output only. [Output only] Delete timestamp
description: "Output only. [Output only] Update timestamp "
output: true
- name: etag
- name: 'deleteTime'
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: reconciling
type: Boolean
description: |-
Output only. Set to true when the connection is being set up or updated in the
background.
description: "Output only. [Output only] Delete timestamp "
output: true
- name: webhookId
- name: 'labels'
type: KeyValueLabels
description: "Optional. Labels as key value pairs "
- name: 'etag'
type: String
description: Output only. External ID of the webhook created for the repository.
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. "
- name: 'reconciling'
type: Boolean
description:
"Output only. Set to true when the connection is being set up or updated
in the\nbackground. "
output: true
- name: createTime
- 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
description: "Output only. A system-assigned unique identifier for a the GitRepositoryLink. "
output: true
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" {
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 = {}
labels = {}
clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git"
location = "us-central1"
annotations = {}
}

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 {
Expand All @@ -21,4 +21,3 @@ resource "google_developer_connect_connection" "github_conn" {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,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
clone_uri = "https://github.com/myuser/myrepo.git"
remote_uri = "https://github.com/myuser/myrepo.git"
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d9f5d97

Please sign in to comment.