Class BitbucketServerConfig


  • public class BitbucketServerConfig
    extends com.pulumi.resources.CustomResource
    BitbucketServerConfig represents the configuration for a Bitbucket Server. To get more information about BitbucketServerConfig, see: * [API documentation](https://cloud.google.com/build/docs/api/reference/rest/v1/projects.locations.bitbucketServerConfigs) * How-to Guides * [Connect to a Bitbucket Server host](https://cloud.google.com/build/docs/automating-builds/bitbucket/connect-host-bitbucket-server) ## Example Usage ### Cloudbuild Bitbucket Server Config ```java 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 ```java 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* `projects/{{project}}/locations/{{location}}/bitbucketServerConfigs/{{config_id}}` * `{{project}}/{{location}}/{{config_id}}` * `{{location}}/{{config_id}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import BitbucketServerConfig using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/bitbucketServerConfigs/{{config_id}}" to = google_cloudbuild_bitbucket_server_config.default } ```sh $ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), BitbucketServerConfig can be imported using one of the formats above. For example ``` ```sh $ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default projects/{{project}}/locations/{{location}}/bitbucketServerConfigs/{{config_id}} ``` ```sh $ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default {{project}}/{{location}}/{{config_id}} ``` ```sh $ pulumi import gcp:cloudbuild/bitbucketServerConfig:BitbucketServerConfig default {{location}}/{{config_id}} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> apiKey()  
      com.pulumi.core.Output<java.lang.String> configId()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<BitbucketServerConfigConnectedRepository>>> connectedRepositories()  
      static BitbucketServerConfig get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BitbucketServerConfigState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> hostUri()  
      com.pulumi.core.Output<java.lang.String> location()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> peeredNetwork()  
      com.pulumi.core.Output<java.lang.String> project()  
      com.pulumi.core.Output<BitbucketServerConfigSecrets> secrets()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> sslCa()  
      com.pulumi.core.Output<java.lang.String> username()  
      com.pulumi.core.Output<java.lang.String> webhookKey()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitbucketServerConfig

        public BitbucketServerConfig​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • BitbucketServerConfig

        public BitbucketServerConfig​(java.lang.String name,
                                     BitbucketServerConfigArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • BitbucketServerConfig

        public BitbucketServerConfig​(java.lang.String name,
                                     BitbucketServerConfigArgs args,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • apiKey

        public com.pulumi.core.Output<java.lang.String> apiKey()
        Returns:
        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.
      • configId

        public com.pulumi.core.Output<java.lang.String> configId()
        Returns:
        The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
      • connectedRepositories

        public com.pulumi.core.Output<java.util.Optional<java.util.List<BitbucketServerConfigConnectedRepository>>> connectedRepositories()
        Returns:
        Connected Bitbucket Server repositories for this config. Structure is documented below.
      • hostUri

        public com.pulumi.core.Output<java.lang.String> hostUri()
        Returns:
        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.
      • location

        public com.pulumi.core.Output<java.lang.String> location()
        Returns:
        The location of this bitbucket server config.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The resource name for the config.
      • peeredNetwork

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> peeredNetwork()
        Returns:
        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.
      • project

        public com.pulumi.core.Output<java.lang.String> project()
        Returns:
        The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
      • secrets

        public com.pulumi.core.Output<BitbucketServerConfigSecrets> secrets()
        Returns:
        Secret Manager secrets needed by the config. Structure is documented below.
      • sslCa

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sslCa()
        Returns:
        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.
      • username

        public com.pulumi.core.Output<java.lang.String> username()
        Returns:
        Username of the account Cloud Build will use on Bitbucket Server.
      • webhookKey

        public com.pulumi.core.Output<java.lang.String> webhookKey()
        Returns:
        Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
      • get

        public static BitbucketServerConfig get​(java.lang.String name,
                                                com.pulumi.core.Output<java.lang.String> id,
                                                @Nullable
                                                BitbucketServerConfigState state,
                                                @Nullable
                                                com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.