1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudbuild
  5. BitbucketServerConfig
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.cloudbuild.BitbucketServerConfig

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    BitbucketServerConfig represents the configuration for a Bitbucket Server.

    To get more information about BitbucketServerConfig, see:

    Example Usage

    Cloudbuild Bitbucket Server Config

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bbs_config = new gcp.cloudbuild.BitbucketServerConfig("bbs-config", {
        configId: "bbs-config",
        location: "us-central1",
        hostUri: "https://bbs.com",
        secrets: {
            adminAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            readAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            webhookSecretVersionName: "projects/myProject/secrets/mybbspat/versions/1",
        },
        username: "test",
        apiKey: "<api-key>",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    bbs_config = gcp.cloudbuild.BitbucketServerConfig("bbs-config",
        config_id="bbs-config",
        location="us-central1",
        host_uri="https://bbs.com",
        secrets={
            "admin_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "read_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "webhook_secret_version_name": "projects/myProject/secrets/mybbspat/versions/1",
        },
        username="test",
        api_key="<api-key>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudbuild.NewBitbucketServerConfig(ctx, "bbs-config", &cloudbuild.BitbucketServerConfigArgs{
    			ConfigId: pulumi.String("bbs-config"),
    			Location: pulumi.String("us-central1"),
    			HostUri:  pulumi.String("https://bbs.com"),
    			Secrets: &cloudbuild.BitbucketServerConfigSecretsArgs{
    				AdminAccessTokenVersionName: pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				ReadAccessTokenVersionName:  pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				WebhookSecretVersionName:    pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    			},
    			Username: pulumi.String("test"),
    			ApiKey:   pulumi.String("<api-key>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var bbs_config = new Gcp.CloudBuild.BitbucketServerConfig("bbs-config", new()
        {
            ConfigId = "bbs-config",
            Location = "us-central1",
            HostUri = "https://bbs.com",
            Secrets = new Gcp.CloudBuild.Inputs.BitbucketServerConfigSecretsArgs
            {
                AdminAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                ReadAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                WebhookSecretVersionName = "projects/myProject/secrets/mybbspat/versions/1",
            },
            Username = "test",
            ApiKey = "<api-key>",
        });
    
    });
    
    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()
                .configId("bbs-config")
                .location("us-central1")
                .hostUri("https://bbs.com")
                .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")
                .apiKey("<api-key>")
                .build());
    
        }
    }
    
    resources:
      bbs-config:
        type: gcp:cloudbuild:BitbucketServerConfig
        properties:
          configId: bbs-config
          location: us-central1
          hostUri: https://bbs.com
          secrets:
            adminAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            readAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            webhookSecretVersionName: projects/myProject/secrets/mybbspat/versions/1
          username: test
          apiKey: <api-key>
    

    Cloudbuild Bitbucket Server Config Repositories

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bbs_config_with_repos = new gcp.cloudbuild.BitbucketServerConfig("bbs-config-with-repos", {
        configId: "bbs-config",
        location: "us-central1",
        hostUri: "https://bbs.com",
        secrets: {
            adminAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            readAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            webhookSecretVersionName: "projects/myProject/secrets/mybbspat/versions/1",
        },
        username: "test",
        apiKey: "<api-key>",
        connectedRepositories: [
            {
                projectKey: "DEV",
                repoSlug: "repo1",
            },
            {
                projectKey: "PROD",
                repoSlug: "repo1",
            },
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    bbs_config_with_repos = gcp.cloudbuild.BitbucketServerConfig("bbs-config-with-repos",
        config_id="bbs-config",
        location="us-central1",
        host_uri="https://bbs.com",
        secrets={
            "admin_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "read_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "webhook_secret_version_name": "projects/myProject/secrets/mybbspat/versions/1",
        },
        username="test",
        api_key="<api-key>",
        connected_repositories=[
            {
                "project_key": "DEV",
                "repo_slug": "repo1",
            },
            {
                "project_key": "PROD",
                "repo_slug": "repo1",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudbuild.NewBitbucketServerConfig(ctx, "bbs-config-with-repos", &cloudbuild.BitbucketServerConfigArgs{
    			ConfigId: pulumi.String("bbs-config"),
    			Location: pulumi.String("us-central1"),
    			HostUri:  pulumi.String("https://bbs.com"),
    			Secrets: &cloudbuild.BitbucketServerConfigSecretsArgs{
    				AdminAccessTokenVersionName: pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				ReadAccessTokenVersionName:  pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				WebhookSecretVersionName:    pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    			},
    			Username: pulumi.String("test"),
    			ApiKey:   pulumi.String("<api-key>"),
    			ConnectedRepositories: cloudbuild.BitbucketServerConfigConnectedRepositoryArray{
    				&cloudbuild.BitbucketServerConfigConnectedRepositoryArgs{
    					ProjectKey: pulumi.String("DEV"),
    					RepoSlug:   pulumi.String("repo1"),
    				},
    				&cloudbuild.BitbucketServerConfigConnectedRepositoryArgs{
    					ProjectKey: pulumi.String("PROD"),
    					RepoSlug:   pulumi.String("repo1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var bbs_config_with_repos = new Gcp.CloudBuild.BitbucketServerConfig("bbs-config-with-repos", new()
        {
            ConfigId = "bbs-config",
            Location = "us-central1",
            HostUri = "https://bbs.com",
            Secrets = new Gcp.CloudBuild.Inputs.BitbucketServerConfigSecretsArgs
            {
                AdminAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                ReadAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                WebhookSecretVersionName = "projects/myProject/secrets/mybbspat/versions/1",
            },
            Username = "test",
            ApiKey = "<api-key>",
            ConnectedRepositories = new[]
            {
                new Gcp.CloudBuild.Inputs.BitbucketServerConfigConnectedRepositoryArgs
                {
                    ProjectKey = "DEV",
                    RepoSlug = "repo1",
                },
                new Gcp.CloudBuild.Inputs.BitbucketServerConfigConnectedRepositoryArgs
                {
                    ProjectKey = "PROD",
                    RepoSlug = "repo1",
                },
            },
        });
    
    });
    
    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 com.pulumi.gcp.cloudbuild.inputs.BitbucketServerConfigConnectedRepositoryArgs;
    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()
                .configId("bbs-config")
                .location("us-central1")
                .hostUri("https://bbs.com")
                .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")
                .apiKey("<api-key>")
                .connectedRepositories(            
                    BitbucketServerConfigConnectedRepositoryArgs.builder()
                        .projectKey("DEV")
                        .repoSlug("repo1")
                        .build(),
                    BitbucketServerConfigConnectedRepositoryArgs.builder()
                        .projectKey("PROD")
                        .repoSlug("repo1")
                        .build())
                .build());
    
        }
    }
    
    resources:
      bbs-config-with-repos:
        type: gcp:cloudbuild:BitbucketServerConfig
        properties:
          configId: bbs-config
          location: us-central1
          hostUri: https://bbs.com
          secrets:
            adminAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            readAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            webhookSecretVersionName: projects/myProject/secrets/mybbspat/versions/1
          username: test
          apiKey: <api-key>
          connectedRepositories:
            - projectKey: DEV
              repoSlug: repo1
            - projectKey: PROD
              repoSlug: repo1
    

    Cloudbuild Bitbucket Server Config Peered Network

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as std from "@pulumi/std";
    
    const project = gcp.organizations.getProject({});
    const servicenetworking = new gcp.projects.Service("servicenetworking", {
        service: "servicenetworking.googleapis.com",
        disableOnDestroy: false,
    });
    const vpcNetwork = new gcp.compute.Network("vpc_network", {name: "vpc-network"}, {
        dependsOn: [servicenetworking],
    });
    const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
        name: "private-ip-alloc",
        purpose: "VPC_PEERING",
        addressType: "INTERNAL",
        prefixLength: 16,
        network: vpcNetwork.id,
    });
    const _default = new gcp.servicenetworking.Connection("default", {
        network: vpcNetwork.id,
        service: "servicenetworking.googleapis.com",
        reservedPeeringRanges: [privateIpAlloc.name],
    }, {
        dependsOn: [servicenetworking],
    });
    const bbs_config_with_peered_network = new gcp.cloudbuild.BitbucketServerConfig("bbs-config-with-peered-network", {
        configId: "bbs-config",
        location: "us-central1",
        hostUri: "https://bbs.com",
        secrets: {
            adminAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            readAccessTokenVersionName: "projects/myProject/secrets/mybbspat/versions/1",
            webhookSecretVersionName: "projects/myProject/secrets/mybbspat/versions/1",
        },
        username: "test",
        apiKey: "<api-key>",
        peeredNetwork: pulumi.all([vpcNetwork.id, project, project]).apply(([id, project, project1]) => std.replaceOutput({
            text: id,
            search: project.name,
            replace: project1.number,
        })).apply(invoke => invoke.result),
        sslCa: `-----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    `,
    }, {
        dependsOn: [_default],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_std as std
    
    project = gcp.organizations.get_project()
    servicenetworking = gcp.projects.Service("servicenetworking",
        service="servicenetworking.googleapis.com",
        disable_on_destroy=False)
    vpc_network = gcp.compute.Network("vpc_network", name="vpc-network",
    opts = pulumi.ResourceOptions(depends_on=[servicenetworking]))
    private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
        name="private-ip-alloc",
        purpose="VPC_PEERING",
        address_type="INTERNAL",
        prefix_length=16,
        network=vpc_network.id)
    default = gcp.servicenetworking.Connection("default",
        network=vpc_network.id,
        service="servicenetworking.googleapis.com",
        reserved_peering_ranges=[private_ip_alloc.name],
        opts = pulumi.ResourceOptions(depends_on=[servicenetworking]))
    bbs_config_with_peered_network = gcp.cloudbuild.BitbucketServerConfig("bbs-config-with-peered-network",
        config_id="bbs-config",
        location="us-central1",
        host_uri="https://bbs.com",
        secrets={
            "admin_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "read_access_token_version_name": "projects/myProject/secrets/mybbspat/versions/1",
            "webhook_secret_version_name": "projects/myProject/secrets/mybbspat/versions/1",
        },
        username="test",
        api_key="<api-key>",
        peered_network=vpc_network.id.apply(lambda id: std.replace_output(text=id,
            search=project.name,
            replace=project.number)).apply(lambda invoke: invoke.result),
        ssl_ca="""-----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    """,
        opts = pulumi.ResourceOptions(depends_on=[default]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		servicenetworking, err := projects.NewService(ctx, "servicenetworking", &projects.ServiceArgs{
    			Service:          pulumi.String("servicenetworking.googleapis.com"),
    			DisableOnDestroy: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		vpcNetwork, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
    			Name: pulumi.String("vpc-network"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			servicenetworking,
    		}))
    		if err != nil {
    			return err
    		}
    		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
    			Name:         pulumi.String("private-ip-alloc"),
    			Purpose:      pulumi.String("VPC_PEERING"),
    			AddressType:  pulumi.String("INTERNAL"),
    			PrefixLength: pulumi.Int(16),
    			Network:      vpcNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicenetworking.NewConnection(ctx, "default", &servicenetworking.ConnectionArgs{
    			Network: vpcNetwork.ID(),
    			Service: pulumi.String("servicenetworking.googleapis.com"),
    			ReservedPeeringRanges: pulumi.StringArray{
    				privateIpAlloc.Name,
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			servicenetworking,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = cloudbuild.NewBitbucketServerConfig(ctx, "bbs-config-with-peered-network", &cloudbuild.BitbucketServerConfigArgs{
    			ConfigId: pulumi.String("bbs-config"),
    			Location: pulumi.String("us-central1"),
    			HostUri:  pulumi.String("https://bbs.com"),
    			Secrets: &cloudbuild.BitbucketServerConfigSecretsArgs{
    				AdminAccessTokenVersionName: pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				ReadAccessTokenVersionName:  pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    				WebhookSecretVersionName:    pulumi.String("projects/myProject/secrets/mybbspat/versions/1"),
    			},
    			Username: pulumi.String("test"),
    			ApiKey:   pulumi.String("<api-key>"),
    			PeeredNetwork: pulumi.String(vpcNetwork.ID().ApplyT(func(id string) (std.ReplaceResult, error) {
    				return std.ReplaceResult(interface{}(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{
    					Text:    id,
    					Search:  project.Name,
    					Replace: project.Number,
    				}, nil))), nil
    			}).(std.ReplaceResultOutput).ApplyT(func(invoke std.ReplaceResult) (*string, error) {
    				return invoke.Result, nil
    			}).(pulumi.StringPtrOutput)),
    			SslCa: pulumi.String("-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			_default,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Gcp.Organizations.GetProject.Invoke();
    
        var servicenetworking = new Gcp.Projects.Service("servicenetworking", new()
        {
            ServiceName = "servicenetworking.googleapis.com",
            DisableOnDestroy = false,
        });
    
        var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
        {
            Name = "vpc-network",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                servicenetworking,
            },
        });
    
        var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
        {
            Name = "private-ip-alloc",
            Purpose = "VPC_PEERING",
            AddressType = "INTERNAL",
            PrefixLength = 16,
            Network = vpcNetwork.Id,
        });
    
        var @default = new Gcp.ServiceNetworking.Connection("default", new()
        {
            Network = vpcNetwork.Id,
            Service = "servicenetworking.googleapis.com",
            ReservedPeeringRanges = new[]
            {
                privateIpAlloc.Name,
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                servicenetworking,
            },
        });
    
        var bbs_config_with_peered_network = new Gcp.CloudBuild.BitbucketServerConfig("bbs-config-with-peered-network", new()
        {
            ConfigId = "bbs-config",
            Location = "us-central1",
            HostUri = "https://bbs.com",
            Secrets = new Gcp.CloudBuild.Inputs.BitbucketServerConfigSecretsArgs
            {
                AdminAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                ReadAccessTokenVersionName = "projects/myProject/secrets/mybbspat/versions/1",
                WebhookSecretVersionName = "projects/myProject/secrets/mybbspat/versions/1",
            },
            Username = "test",
            ApiKey = "<api-key>",
            PeeredNetwork = Output.Tuple(vpcNetwork.Id, project, project).Apply(values =>
            {
                var id = values.Item1;
                var project = values.Item2;
                var project1 = values.Item3;
                return Std.Replace.Invoke(new()
                {
                    Text = id,
                    Search = project.Apply(getProjectResult => getProjectResult.Name),
                    Replace = project1.Number,
                });
            }).Apply(invoke => invoke.Result),
            SslCa = @"-----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    ",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                @default,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    import com.pulumi.gcp.projects.Service;
    import com.pulumi.gcp.projects.ServiceArgs;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.servicenetworking.Connection;
    import com.pulumi.gcp.servicenetworking.ConnectionArgs;
    import com.pulumi.gcp.cloudbuild.BitbucketServerConfig;
    import com.pulumi.gcp.cloudbuild.BitbucketServerConfigArgs;
    import com.pulumi.gcp.cloudbuild.inputs.BitbucketServerConfigSecretsArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            final var project = OrganizationsFunctions.getProject();
    
            var servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
                .service("servicenetworking.googleapis.com")
                .disableOnDestroy(false)
                .build());
    
            var vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
                .name("vpc-network")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(servicenetworking)
                    .build());
    
            var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
                .name("private-ip-alloc")
                .purpose("VPC_PEERING")
                .addressType("INTERNAL")
                .prefixLength(16)
                .network(vpcNetwork.id())
                .build());
    
            var default_ = new Connection("default", ConnectionArgs.builder()
                .network(vpcNetwork.id())
                .service("servicenetworking.googleapis.com")
                .reservedPeeringRanges(privateIpAlloc.name())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(servicenetworking)
                    .build());
    
            var bbs_config_with_peered_network = new BitbucketServerConfig("bbs-config-with-peered-network", BitbucketServerConfigArgs.builder()
                .configId("bbs-config")
                .location("us-central1")
                .hostUri("https://bbs.com")
                .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")
                .apiKey("<api-key>")
                .peeredNetwork(vpcNetwork.id().applyValue(id -> StdFunctions.replace()).applyValue(invoke -> invoke.result()))
                .sslCa("""
    -----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    -----END CERTIFICATE-----
                """)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(default_)
                    .build());
    
        }
    }
    
    resources:
      servicenetworking:
        type: gcp:projects:Service
        properties:
          service: servicenetworking.googleapis.com
          disableOnDestroy: false
      vpcNetwork:
        type: gcp:compute:Network
        name: vpc_network
        properties:
          name: vpc-network
        options:
          dependson:
            - ${servicenetworking}
      privateIpAlloc:
        type: gcp:compute:GlobalAddress
        name: private_ip_alloc
        properties:
          name: private-ip-alloc
          purpose: VPC_PEERING
          addressType: INTERNAL
          prefixLength: 16
          network: ${vpcNetwork.id}
      default:
        type: gcp:servicenetworking:Connection
        properties:
          network: ${vpcNetwork.id}
          service: servicenetworking.googleapis.com
          reservedPeeringRanges:
            - ${privateIpAlloc.name}
        options:
          dependson:
            - ${servicenetworking}
      bbs-config-with-peered-network:
        type: gcp:cloudbuild:BitbucketServerConfig
        properties:
          configId: bbs-config
          location: us-central1
          hostUri: https://bbs.com
          secrets:
            adminAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            readAccessTokenVersionName: projects/myProject/secrets/mybbspat/versions/1
            webhookSecretVersionName: projects/myProject/secrets/mybbspat/versions/1
          username: test
          apiKey: <api-key>
          peeredNetwork:
            fn::invoke:
              Function: std:replace
              Arguments:
                text: ${vpcNetwork.id}
                search: ${project.name}
                replace: ${project.number}
              Return: result
          sslCa: |
            -----BEGIN CERTIFICATE-----
            -----END CERTIFICATE-----
            -----BEGIN CERTIFICATE-----
            -----END CERTIFICATE-----        
        options:
          dependson:
            - ${default}
    variables:
      project:
        fn::invoke:
          Function: gcp:organizations:getProject
          Arguments: {}
    

    Create BitbucketServerConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BitbucketServerConfig(name: string, args: BitbucketServerConfigArgs, opts?: CustomResourceOptions);
    @overload
    def BitbucketServerConfig(resource_name: str,
                              args: BitbucketServerConfigArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def BitbucketServerConfig(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              api_key: Optional[str] = None,
                              config_id: Optional[str] = None,
                              host_uri: Optional[str] = None,
                              location: Optional[str] = None,
                              secrets: Optional[BitbucketServerConfigSecretsArgs] = None,
                              username: Optional[str] = None,
                              connected_repositories: Optional[Sequence[BitbucketServerConfigConnectedRepositoryArgs]] = None,
                              peered_network: Optional[str] = None,
                              project: Optional[str] = None,
                              ssl_ca: Optional[str] = None)
    func NewBitbucketServerConfig(ctx *Context, name string, args BitbucketServerConfigArgs, opts ...ResourceOption) (*BitbucketServerConfig, error)
    public BitbucketServerConfig(string name, BitbucketServerConfigArgs args, CustomResourceOptions? opts = null)
    public BitbucketServerConfig(String name, BitbucketServerConfigArgs args)
    public BitbucketServerConfig(String name, BitbucketServerConfigArgs args, CustomResourceOptions options)
    
    type: gcp:cloudbuild:BitbucketServerConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BitbucketServerConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BitbucketServerConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BitbucketServerConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BitbucketServerConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BitbucketServerConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var bitbucketServerConfigResource = new Gcp.CloudBuild.BitbucketServerConfig("bitbucketServerConfigResource", new()
    {
        ApiKey = "string",
        ConfigId = "string",
        HostUri = "string",
        Location = "string",
        Secrets = new Gcp.CloudBuild.Inputs.BitbucketServerConfigSecretsArgs
        {
            AdminAccessTokenVersionName = "string",
            ReadAccessTokenVersionName = "string",
            WebhookSecretVersionName = "string",
        },
        Username = "string",
        ConnectedRepositories = new[]
        {
            new Gcp.CloudBuild.Inputs.BitbucketServerConfigConnectedRepositoryArgs
            {
                ProjectKey = "string",
                RepoSlug = "string",
            },
        },
        PeeredNetwork = "string",
        Project = "string",
        SslCa = "string",
    });
    
    example, err := cloudbuild.NewBitbucketServerConfig(ctx, "bitbucketServerConfigResource", &cloudbuild.BitbucketServerConfigArgs{
    	ApiKey:   pulumi.String("string"),
    	ConfigId: pulumi.String("string"),
    	HostUri:  pulumi.String("string"),
    	Location: pulumi.String("string"),
    	Secrets: &cloudbuild.BitbucketServerConfigSecretsArgs{
    		AdminAccessTokenVersionName: pulumi.String("string"),
    		ReadAccessTokenVersionName:  pulumi.String("string"),
    		WebhookSecretVersionName:    pulumi.String("string"),
    	},
    	Username: pulumi.String("string"),
    	ConnectedRepositories: cloudbuild.BitbucketServerConfigConnectedRepositoryArray{
    		&cloudbuild.BitbucketServerConfigConnectedRepositoryArgs{
    			ProjectKey: pulumi.String("string"),
    			RepoSlug:   pulumi.String("string"),
    		},
    	},
    	PeeredNetwork: pulumi.String("string"),
    	Project:       pulumi.String("string"),
    	SslCa:         pulumi.String("string"),
    })
    
    var bitbucketServerConfigResource = new BitbucketServerConfig("bitbucketServerConfigResource", BitbucketServerConfigArgs.builder()
        .apiKey("string")
        .configId("string")
        .hostUri("string")
        .location("string")
        .secrets(BitbucketServerConfigSecretsArgs.builder()
            .adminAccessTokenVersionName("string")
            .readAccessTokenVersionName("string")
            .webhookSecretVersionName("string")
            .build())
        .username("string")
        .connectedRepositories(BitbucketServerConfigConnectedRepositoryArgs.builder()
            .projectKey("string")
            .repoSlug("string")
            .build())
        .peeredNetwork("string")
        .project("string")
        .sslCa("string")
        .build());
    
    bitbucket_server_config_resource = gcp.cloudbuild.BitbucketServerConfig("bitbucketServerConfigResource",
        api_key="string",
        config_id="string",
        host_uri="string",
        location="string",
        secrets={
            "admin_access_token_version_name": "string",
            "read_access_token_version_name": "string",
            "webhook_secret_version_name": "string",
        },
        username="string",
        connected_repositories=[{
            "project_key": "string",
            "repo_slug": "string",
        }],
        peered_network="string",
        project="string",
        ssl_ca="string")
    
    const bitbucketServerConfigResource = new gcp.cloudbuild.BitbucketServerConfig("bitbucketServerConfigResource", {
        apiKey: "string",
        configId: "string",
        hostUri: "string",
        location: "string",
        secrets: {
            adminAccessTokenVersionName: "string",
            readAccessTokenVersionName: "string",
            webhookSecretVersionName: "string",
        },
        username: "string",
        connectedRepositories: [{
            projectKey: "string",
            repoSlug: "string",
        }],
        peeredNetwork: "string",
        project: "string",
        sslCa: "string",
    });
    
    type: gcp:cloudbuild:BitbucketServerConfig
    properties:
        apiKey: string
        configId: string
        connectedRepositories:
            - projectKey: string
              repoSlug: string
        hostUri: string
        location: string
        peeredNetwork: string
        project: string
        secrets:
            adminAccessTokenVersionName: string
            readAccessTokenVersionName: string
            webhookSecretVersionName: string
        sslCa: string
        username: string
    

    BitbucketServerConfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BitbucketServerConfig resource accepts the following input properties:

    ApiKey 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.
    ConfigId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    HostUri 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.
    Location string
    The location of this bitbucket server config.
    Secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    Username string
    Username of the account Cloud Build will use on Bitbucket Server.
    ConnectedRepositories List<BitbucketServerConfigConnectedRepository>
    Connected Bitbucket Server repositories for this config.
    PeeredNetwork 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.
    Project string
    SslCa 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.
    ApiKey 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.
    ConfigId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    HostUri 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.
    Location string
    The location of this bitbucket server config.
    Secrets BitbucketServerConfigSecretsArgs
    Secret Manager secrets needed by the config. Structure is documented below.
    Username string
    Username of the account Cloud Build will use on Bitbucket Server.
    ConnectedRepositories []BitbucketServerConfigConnectedRepositoryArgs
    Connected Bitbucket Server repositories for this config.
    PeeredNetwork 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.
    Project string
    SslCa 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.
    apiKey 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.
    configId String
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    hostUri 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.
    location String
    The location of this bitbucket server config.
    secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    username String
    Username of the account Cloud Build will use on Bitbucket Server.
    connectedRepositories List<BitbucketServerConfigConnectedRepository>
    Connected Bitbucket Server repositories for this config.
    peeredNetwork 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.
    project String
    sslCa 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.
    apiKey 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.
    configId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    hostUri 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.
    location string
    The location of this bitbucket server config.
    secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    username string
    Username of the account Cloud Build will use on Bitbucket Server.
    connectedRepositories BitbucketServerConfigConnectedRepository[]
    Connected Bitbucket Server repositories for this config.
    peeredNetwork 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.
    project string
    sslCa 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.
    api_key str
    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.
    config_id str
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    host_uri str
    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 str
    The location of this bitbucket server config.
    secrets BitbucketServerConfigSecretsArgs
    Secret Manager secrets needed by the config. Structure is documented below.
    username str
    Username of the account Cloud Build will use on Bitbucket Server.
    connected_repositories Sequence[BitbucketServerConfigConnectedRepositoryArgs]
    Connected Bitbucket Server repositories for this config.
    peered_network str
    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 str
    ssl_ca str
    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.
    apiKey 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.
    configId String
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    hostUri 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.
    location String
    The location of this bitbucket server config.
    secrets Property Map
    Secret Manager secrets needed by the config. Structure is documented below.
    username String
    Username of the account Cloud Build will use on Bitbucket Server.
    connectedRepositories List<Property Map>
    Connected Bitbucket Server repositories for this config.
    peeredNetwork 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.
    project String
    sslCa 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BitbucketServerConfig resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name for the config.
    WebhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name for the config.
    WebhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name for the config.
    webhookKey String
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name for the config.
    webhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name for the config.
    webhook_key str
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name for the config.
    webhookKey String
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.

    Look up Existing BitbucketServerConfig Resource

    Get an existing BitbucketServerConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BitbucketServerConfigState, opts?: CustomResourceOptions): BitbucketServerConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_key: Optional[str] = None,
            config_id: Optional[str] = None,
            connected_repositories: Optional[Sequence[BitbucketServerConfigConnectedRepositoryArgs]] = None,
            host_uri: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            peered_network: Optional[str] = None,
            project: Optional[str] = None,
            secrets: Optional[BitbucketServerConfigSecretsArgs] = None,
            ssl_ca: Optional[str] = None,
            username: Optional[str] = None,
            webhook_key: Optional[str] = None) -> BitbucketServerConfig
    func GetBitbucketServerConfig(ctx *Context, name string, id IDInput, state *BitbucketServerConfigState, opts ...ResourceOption) (*BitbucketServerConfig, error)
    public static BitbucketServerConfig Get(string name, Input<string> id, BitbucketServerConfigState? state, CustomResourceOptions? opts = null)
    public static BitbucketServerConfig get(String name, Output<String> id, BitbucketServerConfigState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiKey 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.
    ConfigId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    ConnectedRepositories List<BitbucketServerConfigConnectedRepository>
    Connected Bitbucket Server repositories for this config.
    HostUri 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.
    Location string
    The location of this bitbucket server config.
    Name string
    The resource name for the config.
    PeeredNetwork 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.
    Project string
    Secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    SslCa 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.
    Username string
    Username of the account Cloud Build will use on Bitbucket Server.
    WebhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    ApiKey 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.
    ConfigId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    ConnectedRepositories []BitbucketServerConfigConnectedRepositoryArgs
    Connected Bitbucket Server repositories for this config.
    HostUri 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.
    Location string
    The location of this bitbucket server config.
    Name string
    The resource name for the config.
    PeeredNetwork 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.
    Project string
    Secrets BitbucketServerConfigSecretsArgs
    Secret Manager secrets needed by the config. Structure is documented below.
    SslCa 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.
    Username string
    Username of the account Cloud Build will use on Bitbucket Server.
    WebhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    apiKey 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.
    configId String
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    connectedRepositories List<BitbucketServerConfigConnectedRepository>
    Connected Bitbucket Server repositories for this config.
    hostUri 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.
    location String
    The location of this bitbucket server config.
    name String
    The resource name for the config.
    peeredNetwork 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.
    project String
    secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    sslCa 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.
    username String
    Username of the account Cloud Build will use on Bitbucket Server.
    webhookKey String
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    apiKey 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.
    configId string
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    connectedRepositories BitbucketServerConfigConnectedRepository[]
    Connected Bitbucket Server repositories for this config.
    hostUri 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.
    location string
    The location of this bitbucket server config.
    name string
    The resource name for the config.
    peeredNetwork 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.
    project string
    secrets BitbucketServerConfigSecrets
    Secret Manager secrets needed by the config. Structure is documented below.
    sslCa 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.
    username string
    Username of the account Cloud Build will use on Bitbucket Server.
    webhookKey string
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    api_key str
    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.
    config_id str
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    connected_repositories Sequence[BitbucketServerConfigConnectedRepositoryArgs]
    Connected Bitbucket Server repositories for this config.
    host_uri str
    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 str
    The location of this bitbucket server config.
    name str
    The resource name for the config.
    peered_network str
    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 str
    secrets BitbucketServerConfigSecretsArgs
    Secret Manager secrets needed by the config. Structure is documented below.
    ssl_ca str
    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 str
    Username of the account Cloud Build will use on Bitbucket Server.
    webhook_key str
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
    apiKey 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.
    configId String
    The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name.
    connectedRepositories List<Property Map>
    Connected Bitbucket Server repositories for this config.
    hostUri 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.
    location String
    The location of this bitbucket server config.
    name String
    The resource name for the config.
    peeredNetwork 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.
    project String
    secrets Property Map
    Secret Manager secrets needed by the config. Structure is documented below.
    sslCa 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.
    username String
    Username of the account Cloud Build will use on Bitbucket Server.
    webhookKey String
    Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.

    Supporting Types

    BitbucketServerConfigConnectedRepository, BitbucketServerConfigConnectedRepositoryArgs

    ProjectKey string
    Identifier for the project storing the repository.
    RepoSlug string
    Identifier for the repository.
    ProjectKey string
    Identifier for the project storing the repository.
    RepoSlug string
    Identifier for the repository.
    projectKey String
    Identifier for the project storing the repository.
    repoSlug String
    Identifier for the repository.
    projectKey string
    Identifier for the project storing the repository.
    repoSlug string
    Identifier for the repository.
    project_key str
    Identifier for the project storing the repository.
    repo_slug str
    Identifier for the repository.
    projectKey String
    Identifier for the project storing the repository.
    repoSlug String
    Identifier for the repository.

    BitbucketServerConfigSecrets, BitbucketServerConfigSecretsArgs

    AdminAccessTokenVersionName string
    The resource name for the admin access token's secret version.
    ReadAccessTokenVersionName string
    The resource name for the read access token's secret version.
    WebhookSecretVersionName string
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    AdminAccessTokenVersionName string
    The resource name for the admin access token's secret version.
    ReadAccessTokenVersionName string
    The resource name for the read access token's secret version.
    WebhookSecretVersionName string
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    adminAccessTokenVersionName String
    The resource name for the admin access token's secret version.
    readAccessTokenVersionName String
    The resource name for the read access token's secret version.
    webhookSecretVersionName String
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    adminAccessTokenVersionName string
    The resource name for the admin access token's secret version.
    readAccessTokenVersionName string
    The resource name for the read access token's secret version.
    webhookSecretVersionName string
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    admin_access_token_version_name str
    The resource name for the admin access token's secret version.
    read_access_token_version_name str
    The resource name for the read access token's secret version.
    webhook_secret_version_name str
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    adminAccessTokenVersionName String
    The resource name for the admin access token's secret version.
    readAccessTokenVersionName String
    The resource name for the read access token's secret version.
    webhookSecretVersionName String
    Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. Changing this field will result in deleting/ recreating the resource.


    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}}

    When using the pulumi import command, BitbucketServerConfig can be imported using one of the formats above. For example:

    $ 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}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi