@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
364 lines • 16.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A git repository link to a parent connection.
*
* To get more information about GitRepositoryLink, see:
*
* * [API documentation](https://cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/developer-connect/docs/overview)
*
* ## Example Usage
*
* ### Developer Connect Git Repository Link Github Doc
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
*
* const github_token_secret = new gcp.secretmanager.Secret("github-token-secret", {
* secretId: "github-token-secret",
* replication: {
* auto: {},
* },
* });
* const github_token_secret_version = new gcp.secretmanager.SecretVersion("github-token-secret-version", {
* secret: github_token_secret.id,
* secretData: std.file({
* input: "my-github-token.txt",
* }).then(invoke => invoke.result),
* });
* const p4sa_secretAccessor = gcp.organizations.getIAMPolicy({
* bindings: [{
* role: "roles/secretmanager.secretAccessor",
* members: ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"],
* }],
* });
* const policy = new gcp.secretmanager.SecretIamPolicy("policy", {
* secretId: github_token_secret.secretId,
* policyData: p4sa_secretAccessor.then(p4sa_secretAccessor => p4sa_secretAccessor.policyData),
* });
* const my_connection = new gcp.developerconnect.Connection("my-connection", {
* location: "us-central1",
* connectionId: "my-connection",
* githubConfig: {
* githubApp: "DEVELOPER_CONNECT",
* appInstallationId: "123123",
* authorizerCredential: {
* oauthTokenSecretVersion: github_token_secret_version.id,
* },
* },
* });
* const my_repository = new gcp.developerconnect.GitRepositoryLink("my-repository", {
* location: "us-central1",
* gitRepositoryLinkId: "my-repo",
* parentConnection: my_connection.connectionId,
* remoteUri: "https://github.com/myuser/myrepo.git",
* });
* ```
*
* ## Import
*
* GitRepositoryLink can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}`
* * `{{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
* * `{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
*
* When using the `pulumi import` command, GitRepositoryLink can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}
* $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}
* $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{location}}/{{parent_connection}}/{{git_repository_link_id}}
* ```
*/
export declare class GitRepositoryLink extends pulumi.CustomResource {
/**
* Get an existing GitRepositoryLink resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GitRepositoryLinkState, opts?: pulumi.CustomResourceOptions): GitRepositoryLink;
/**
* Returns true if the given object is an instance of GitRepositoryLink. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is GitRepositoryLink;
/**
* Optional. Allows clients to store small amounts of arbitrary data.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
readonly annotations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Required. Git Clone URI.
*/
readonly cloneUri: pulumi.Output<string>;
/**
* Output only. [Output only] Create timestamp
*/
readonly createTime: pulumi.Output<string>;
/**
* Output only. [Output only] Delete timestamp
*/
readonly deleteTime: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
*/
readonly effectiveAnnotations: pulumi.Output<{
[key: string]: string;
}>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* 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.
*/
readonly etag: pulumi.Output<string | undefined>;
/**
* 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 -._~%!$&'()*+,;=@.
*/
readonly gitRepositoryLinkId: pulumi.Output<string>;
/**
* Optional. Labels as key value pairs
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* 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`.
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. Resource name of the repository, in the format
* `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
*/
readonly name: pulumi.Output<string>;
/**
* 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`.
*/
readonly parentConnection: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Output only. Set to true when the connection is being set up or updated in the
* background.
*/
readonly reconciling: pulumi.Output<boolean>;
/**
* Output only. A system-assigned unique identifier for a the GitRepositoryLink.
*/
readonly uid: pulumi.Output<string>;
/**
* Output only. [Output only] Update timestamp
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a GitRepositoryLink resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: GitRepositoryLinkArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GitRepositoryLink resources.
*/
export interface GitRepositoryLinkState {
/**
* Optional. Allows clients to store small amounts of arbitrary data.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Required. Git Clone URI.
*/
cloneUri?: pulumi.Input<string | undefined>;
/**
* Output only. [Output only] Create timestamp
*/
createTime?: pulumi.Input<string | undefined>;
/**
* Output only. [Output only] Delete timestamp
*/
deleteTime?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
*/
effectiveAnnotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* 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.
*/
etag?: pulumi.Input<string | undefined>;
/**
* 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 -._~%!$&'()*+,;=@.
*/
gitRepositoryLinkId?: pulumi.Input<string | undefined>;
/**
* Optional. Labels as key value pairs
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* 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`.
*/
location?: pulumi.Input<string | undefined>;
/**
* Identifier. Resource name of the repository, in the format
* `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
*/
name?: pulumi.Input<string | undefined>;
/**
* 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`.
*/
parentConnection?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Output only. Set to true when the connection is being set up or updated in the
* background.
*/
reconciling?: pulumi.Input<boolean | undefined>;
/**
* Output only. A system-assigned unique identifier for a the GitRepositoryLink.
*/
uid?: pulumi.Input<string | undefined>;
/**
* Output only. [Output only] Update timestamp
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a GitRepositoryLink resource.
*/
export interface GitRepositoryLinkArgs {
/**
* Optional. Allows clients to store small amounts of arbitrary data.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Required. Git Clone URI.
*/
cloneUri: pulumi.Input<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* 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.
*/
etag?: pulumi.Input<string | undefined>;
/**
* 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 -._~%!$&'()*+,;=@.
*/
gitRepositoryLinkId: pulumi.Input<string>;
/**
* Optional. Labels as key value pairs
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* 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`.
*/
location: pulumi.Input<string>;
/**
* 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`.
*/
parentConnection: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=gitRepositoryLink.d.ts.map