@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
469 lines • 19.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Description
*
* ## Example Usage
*
* ### Developer Connect Account Connector Github
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "my-ac",
* providerOauthConfig: {
* systemProviderId: "GITHUB",
* scopes: ["repo"],
* },
* });
* ```
* ### Developer Connect Account Connector Gitlab
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "my-ac",
* providerOauthConfig: {
* systemProviderId: "GITLAB",
* scopes: ["api"],
* },
* });
* ```
* ### Developer Connect Account Connector Ghe
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const gheAcClientId = new gcp.secretmanager.Secret("ghe_ac_client_id", {
* secretId: "ghe-ac-id",
* replication: {
* auto: {},
* },
* });
* const gheAcClientIdVersion = new gcp.secretmanager.SecretVersion("ghe_ac_client_id_version", {
* secret: gheAcClientId.name,
* secretData: "dummy-client-id",
* });
* const gheAcClientSecret = new gcp.secretmanager.Secret("ghe_ac_client_secret", {
* secretId: "ghe-ac-sec",
* replication: {
* auto: {},
* },
* });
* const gheAcClientSecretVersion = new gcp.secretmanager.SecretVersion("ghe_ac_client_secret_version", {
* secret: gheAcClientSecret.name,
* secretData: "dummy-client-secret",
* });
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "my-ac",
* customOauthConfig: {
* authUri: "https://ghe.proctor-staging-test.com/login/oauth/authorize",
* clientId: gheAcClientIdVersion.secretData,
* clientSecret: gheAcClientSecretVersion.secretData,
* tokenUri: "https://ghe.proctor-staging-test.com/login/oauth/access_token",
* hostUri: "https://ghe.proctor-staging-test.com",
* scmProvider: "GITHUB_ENTERPRISE",
* scopes: ["repo"],
* },
* });
* ```
* ### Developer Connect Account Connector Gle
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const gleAcClientId = new gcp.secretmanager.Secret("gle_ac_client_id", {
* secretId: "gle-ac-id",
* replication: {
* auto: {},
* },
* });
* const gleAcClientIdVersion = new gcp.secretmanager.SecretVersion("gle_ac_client_id_version", {
* secret: gleAcClientId.name,
* secretData: "dummy-client-id",
* });
* const gleAcClientSecret = new gcp.secretmanager.Secret("gle_ac_client_secret", {
* secretId: "gle-ac-sec",
* replication: {
* auto: {},
* },
* });
* const gleAcClientSecretVersion = new gcp.secretmanager.SecretVersion("gle_ac_client_secret_version", {
* secret: gleAcClientSecret.name,
* secretData: "dummy-client-secret",
* });
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "my-ac",
* customOauthConfig: {
* authUri: "https://gle-us-central1.gcb-test.com/oauth/authorize",
* clientId: gleAcClientIdVersion.secretData,
* clientSecret: gleAcClientSecretVersion.secretData,
* tokenUri: "https://gle-us-central1.gcb-test.com/oauth/token",
* hostUri: "https://gle-us-central1.gcb-test.com",
* scmProvider: "GITLAB_ENTERPRISE",
* scopes: ["api"],
* },
* });
* ```
* ### Developer Connect Account Connector Bbdc
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const bbdcAcPrivClientId = new gcp.secretmanager.Secret("bbdc_ac_priv_client_id", {
* secretId: "bbdc-ac-id",
* replication: {
* auto: {},
* },
* });
* const bbdcAcPrivClientIdVersion = new gcp.secretmanager.SecretVersion("bbdc_ac_priv_client_id_version", {
* secret: bbdcAcPrivClientId.name,
* secretData: "dummy-client-id",
* });
* const bbdcAcPrivClientSecret = new gcp.secretmanager.Secret("bbdc_ac_priv_client_secret", {
* secretId: "bbdc-ac-sec",
* replication: {
* auto: {},
* },
* });
* const bbdcAcPrivClientSecretVersion = new gcp.secretmanager.SecretVersion("bbdc_ac_priv_client_secret_version", {
* secret: bbdcAcPrivClientSecret.name,
* secretData: "dummy-client-secret",
* });
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "my-ac",
* customOauthConfig: {
* authUri: "https://bitbucket-us-central.gcb-test.com/rest/oauth2/latest/authorize",
* clientId: bbdcAcPrivClientIdVersion.secretData,
* clientSecret: bbdcAcPrivClientSecretVersion.secretData,
* tokenUri: "https://bitbucket-us-central.gcb-test.com/rest/oauth2/latest/token",
* hostUri: "https://bitbucket-us-central.gcb-test.com",
* scmProvider: "BITBUCKET_DATA_CENTER",
* scopes: ["REPO_ADMIN"],
* },
* });
* ```
*
* ## Import
*
* AccountConnector can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/accountConnectors/{{account_connector_id}}`
* * `{{project}}/{{location}}/{{account_connector_id}}`
* * `{{location}}/{{account_connector_id}}`
*
* When using the `pulumi import` command, AccountConnector can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default projects/{{project}}/locations/{{location}}/accountConnectors/{{account_connector_id}}
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default {{project}}/{{location}}/{{account_connector_id}}
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default {{location}}/{{account_connector_id}}
* ```
*/
export declare class AccountConnector extends pulumi.CustomResource {
/**
* Get an existing AccountConnector 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?: AccountConnectorState, opts?: pulumi.CustomResourceOptions): AccountConnector;
/**
* Returns true if the given object is an instance of AccountConnector. 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 AccountConnector;
/**
* The ID to use for the AccountConnector, which will become the final
* component of the AccountConnector's resource name. Its format should adhere
* to https://google.aip.dev/122#resource-id-segments Names must be unique
* per-project per-location.
*/
readonly accountConnectorId: pulumi.Output<string>;
/**
* Allows users 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>;
/**
* The timestamp when the accountConnector was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Message for a customized OAuth config.
* Structure is documented below.
*/
readonly customOauthConfig: pulumi.Output<outputs.developerconnect.AccountConnectorCustomOauthConfig | 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.
*/
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;
}>;
/**
* 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>;
/**
* 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.
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. The resource name of the accountConnector, in the format
* `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
*/
readonly name: pulumi.Output<string>;
/**
* Start OAuth flow by clicking on this URL.
*/
readonly oauthStartUri: 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>;
/**
* ProviderOAuthConfig is the OAuth config for a provider.
* Structure is documented below.
*/
readonly providerOauthConfig: pulumi.Output<outputs.developerconnect.AccountConnectorProviderOauthConfig | undefined>;
/**
* The proxy configuration.
* Structure is documented below.
*/
readonly proxyConfig: pulumi.Output<outputs.developerconnect.AccountConnectorProxyConfig | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The timestamp when the accountConnector was updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a AccountConnector 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: AccountConnectorArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AccountConnector resources.
*/
export interface AccountConnectorState {
/**
* The ID to use for the AccountConnector, which will become the final
* component of the AccountConnector's resource name. Its format should adhere
* to https://google.aip.dev/122#resource-id-segments Names must be unique
* per-project per-location.
*/
accountConnectorId?: pulumi.Input<string | undefined>;
/**
* Allows users 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>;
/**
* The timestamp when the accountConnector was created.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* Message for a customized OAuth config.
* Structure is documented below.
*/
customOauthConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorCustomOauthConfig | 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>;
/**
* 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>;
/**
* 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.
*/
location?: pulumi.Input<string | undefined>;
/**
* Identifier. The resource name of the accountConnector, in the format
* `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
*/
name?: pulumi.Input<string | undefined>;
/**
* Start OAuth flow by clicking on this URL.
*/
oauthStartUri?: 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>;
/**
* ProviderOAuthConfig is the OAuth config for a provider.
* Structure is documented below.
*/
providerOauthConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorProviderOauthConfig | undefined>;
/**
* The proxy configuration.
* Structure is documented below.
*/
proxyConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorProxyConfig | 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>;
/**
* The timestamp when the accountConnector was updated.
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a AccountConnector resource.
*/
export interface AccountConnectorArgs {
/**
* The ID to use for the AccountConnector, which will become the final
* component of the AccountConnector's resource name. Its format should adhere
* to https://google.aip.dev/122#resource-id-segments Names must be unique
* per-project per-location.
*/
accountConnectorId: pulumi.Input<string>;
/**
* Allows users 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>;
/**
* Message for a customized OAuth config.
* Structure is documented below.
*/
customOauthConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorCustomOauthConfig | 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>;
/**
* 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>;
/**
* 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.
*/
location: 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>;
/**
* ProviderOAuthConfig is the OAuth config for a provider.
* Structure is documented below.
*/
providerOauthConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorProviderOauthConfig | undefined>;
/**
* The proxy configuration.
* Structure is documented below.
*/
proxyConfig?: pulumi.Input<inputs.developerconnect.AccountConnectorProxyConfig | undefined>;
}
//# sourceMappingURL=accountConnector.d.ts.map