BitbucketServerConfig

class BitbucketServerConfig : KotlinCustomResource

BitbucketServerConfig represents the configuration for a Bitbucket Server. To get more information about BitbucketServerConfig, see:

Example Usage

Cloudbuild Bitbucket Server Config

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.BitbucketServerConfig;
import com.pulumi.gcp.cloudbuild.BitbucketServerConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.BitbucketServerConfigSecretsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bbs_config = new BitbucketServerConfig("bbs-config", BitbucketServerConfigArgs.builder()
.apiKey("<api-key>")
.configId("bbs-config")
.hostUri("https://bbs.com")
.location("us-central1")
.secrets(BitbucketServerConfigSecretsArgs.builder()
.adminAccessTokenVersionName("projects/myProject/secrets/mybbspat/versions/1")
.readAccessTokenVersionName("projects/myProject/secrets/mybbspat/versions/1")
.webhookSecretVersionName("projects/myProject/secrets/mybbspat/versions/1")
.build())
.username("test")
.build());
}
}

Cloudbuild Bitbucket Server Config Repositories

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.BitbucketServerConfig;
import com.pulumi.gcp.cloudbuild.BitbucketServerConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.BitbucketServerConfigConnectedRepositoryArgs;
import com.pulumi.gcp.cloudbuild.inputs.BitbucketServerConfigSecretsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bbs_config_with_repos = new BitbucketServerConfig("bbs-config-with-repos", BitbucketServerConfigArgs.builder()
.apiKey("<api-key>")
.configId("bbs-config")
.connectedRepositories(
BitbucketServerConfigConnectedRepositoryArgs.builder()
.projectKey("DEV")
.repoSlug("repo1")
.build(),
BitbucketServerConfigConnectedRepositoryArgs.builder()
.projectKey("PROD")
.repoSlug("repo1")
.build())
.hostUri("https://bbs.com")
.location("us-central1")
.secrets(BitbucketServerConfigSecretsArgs.builder()
.adminAccessTokenVersionName("projects/myProject/secrets/mybbspat/versions/1")
.readAccessTokenVersionName("projects/myProject/secrets/mybbspat/versions/1")
.webhookSecretVersionName("projects/myProject/secrets/mybbspat/versions/1")
.build())
.username("test")
.build());
}
}

Import

BitbucketServerConfig can be imported using any of these accepted formats

$ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default projects/{{project}}/locations/{{location}}/bitbucketServerConfigs/{{config_id}}
$ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default {{project}}/{{location}}/{{config_id}}
$ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default {{location}}/{{config_id}}

Properties

Link copied to clipboard
val apiKey: Output<String>

Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.

Link copied to clipboard
val configId: Output<String>

The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.

Link copied to clipboard

Connected Bitbucket Server repositories for this config. Structure is documented below.

Link copied to clipboard
val hostUri: Output<String>

Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The location of this bitbucket server config.

Link copied to clipboard
val name: Output<String>

The resource name for the config.

Link copied to clipboard
val peeredNetwork: Output<String>?

The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format projects/{project}/global/networks/{network}, where {project} is a project number or id and {network} is the name of a VPC network in the project.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Secret Manager secrets needed by the config. Structure is documented below.

Link copied to clipboard
val sslCa: Output<String>?

SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val username: Output<String>

Username of the account Cloud Build will use on Bitbucket Server.

Link copied to clipboard
val webhookKey: Output<String>

Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.