1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ProjectExternalStatusCheck
GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi

gitlab.ProjectExternalStatusCheck

Explore with Pulumi AI

gitlab logo
GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi

    The gitlab.ProjectExternalStatusCheck resource allows you to manage the lifecycle of an external status check service on a project.

    This resource requires a GitLab Enterprise instance with an Ultimate license.

    Upstream API: GitLab API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const foo = new gitlab.ProjectExternalStatusCheck("foo", {
        projectId: 123,
        name: "foo",
        externalUrl: "https://example.gitlab.com",
    });
    const bar = new gitlab.ProjectExternalStatusCheck("bar", {
        projectId: 456,
        name: "bar",
        externalUrl: "https://example.gitlab.com",
        sharedSecret: "secret",
        protectedBranchIds: [
            6,
            28,
        ],
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    foo = gitlab.ProjectExternalStatusCheck("foo",
        project_id=123,
        name="foo",
        external_url="https://example.gitlab.com")
    bar = gitlab.ProjectExternalStatusCheck("bar",
        project_id=456,
        name="bar",
        external_url="https://example.gitlab.com",
        shared_secret="secret",
        protected_branch_ids=[
            6,
            28,
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.NewProjectExternalStatusCheck(ctx, "foo", &gitlab.ProjectExternalStatusCheckArgs{
    			ProjectId:   pulumi.Int(123),
    			Name:        pulumi.String("foo"),
    			ExternalUrl: pulumi.String("https://example.gitlab.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewProjectExternalStatusCheck(ctx, "bar", &gitlab.ProjectExternalStatusCheckArgs{
    			ProjectId:    pulumi.Int(456),
    			Name:         pulumi.String("bar"),
    			ExternalUrl:  pulumi.String("https://example.gitlab.com"),
    			SharedSecret: pulumi.String("secret"),
    			ProtectedBranchIds: pulumi.IntArray{
    				pulumi.Int(6),
    				pulumi.Int(28),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new GitLab.ProjectExternalStatusCheck("foo", new()
        {
            ProjectId = 123,
            Name = "foo",
            ExternalUrl = "https://example.gitlab.com",
        });
    
        var bar = new GitLab.ProjectExternalStatusCheck("bar", new()
        {
            ProjectId = 456,
            Name = "bar",
            ExternalUrl = "https://example.gitlab.com",
            SharedSecret = "secret",
            ProtectedBranchIds = new[]
            {
                6,
                28,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.ProjectExternalStatusCheck;
    import com.pulumi.gitlab.ProjectExternalStatusCheckArgs;
    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 foo = new ProjectExternalStatusCheck("foo", ProjectExternalStatusCheckArgs.builder()
                .projectId(123)
                .name("foo")
                .externalUrl("https://example.gitlab.com")
                .build());
    
            var bar = new ProjectExternalStatusCheck("bar", ProjectExternalStatusCheckArgs.builder()
                .projectId(456)
                .name("bar")
                .externalUrl("https://example.gitlab.com")
                .sharedSecret("secret")
                .protectedBranchIds(            
                    6,
                    28)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: gitlab:ProjectExternalStatusCheck
        properties:
          projectId: 123
          name: foo
          externalUrl: https://example.gitlab.com
      bar:
        type: gitlab:ProjectExternalStatusCheck
        properties:
          projectId: 456
          name: bar
          externalUrl: https://example.gitlab.com
          sharedSecret: secret
          protectedBranchIds:
            - 6
            - 28
    

    Create ProjectExternalStatusCheck Resource

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

    Constructor syntax

    new ProjectExternalStatusCheck(name: string, args: ProjectExternalStatusCheckArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectExternalStatusCheck(resource_name: str,
                                   args: ProjectExternalStatusCheckArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectExternalStatusCheck(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   external_url: Optional[str] = None,
                                   project_id: Optional[int] = None,
                                   name: Optional[str] = None,
                                   protected_branch_ids: Optional[Sequence[int]] = None,
                                   shared_secret: Optional[str] = None)
    func NewProjectExternalStatusCheck(ctx *Context, name string, args ProjectExternalStatusCheckArgs, opts ...ResourceOption) (*ProjectExternalStatusCheck, error)
    public ProjectExternalStatusCheck(string name, ProjectExternalStatusCheckArgs args, CustomResourceOptions? opts = null)
    public ProjectExternalStatusCheck(String name, ProjectExternalStatusCheckArgs args)
    public ProjectExternalStatusCheck(String name, ProjectExternalStatusCheckArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectExternalStatusCheck
    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 ProjectExternalStatusCheckArgs
    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 ProjectExternalStatusCheckArgs
    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 ProjectExternalStatusCheckArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectExternalStatusCheckArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectExternalStatusCheckArgs
    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 projectExternalStatusCheckResource = new GitLab.ProjectExternalStatusCheck("projectExternalStatusCheckResource", new()
    {
        ExternalUrl = "string",
        ProjectId = 0,
        Name = "string",
        ProtectedBranchIds = new[]
        {
            0,
        },
        SharedSecret = "string",
    });
    
    example, err := gitlab.NewProjectExternalStatusCheck(ctx, "projectExternalStatusCheckResource", &gitlab.ProjectExternalStatusCheckArgs{
    	ExternalUrl: pulumi.String("string"),
    	ProjectId:   pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	ProtectedBranchIds: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	SharedSecret: pulumi.String("string"),
    })
    
    var projectExternalStatusCheckResource = new ProjectExternalStatusCheck("projectExternalStatusCheckResource", ProjectExternalStatusCheckArgs.builder()
        .externalUrl("string")
        .projectId(0)
        .name("string")
        .protectedBranchIds(0)
        .sharedSecret("string")
        .build());
    
    project_external_status_check_resource = gitlab.ProjectExternalStatusCheck("projectExternalStatusCheckResource",
        external_url="string",
        project_id=0,
        name="string",
        protected_branch_ids=[0],
        shared_secret="string")
    
    const projectExternalStatusCheckResource = new gitlab.ProjectExternalStatusCheck("projectExternalStatusCheckResource", {
        externalUrl: "string",
        projectId: 0,
        name: "string",
        protectedBranchIds: [0],
        sharedSecret: "string",
    });
    
    type: gitlab:ProjectExternalStatusCheck
    properties:
        externalUrl: string
        name: string
        projectId: 0
        protectedBranchIds:
            - 0
        sharedSecret: string
    

    ProjectExternalStatusCheck 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 ProjectExternalStatusCheck resource accepts the following input properties:

    ExternalUrl string
    The URL of the external status check service.
    ProjectId int
    The ID of the project.
    Name string
    The display name of the external status check service.
    ProtectedBranchIds List<int>
    The list of IDs of protected branches to scope the rule by.
    SharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    ExternalUrl string
    The URL of the external status check service.
    ProjectId int
    The ID of the project.
    Name string
    The display name of the external status check service.
    ProtectedBranchIds []int
    The list of IDs of protected branches to scope the rule by.
    SharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl String
    The URL of the external status check service.
    projectId Integer
    The ID of the project.
    name String
    The display name of the external status check service.
    protectedBranchIds List<Integer>
    The list of IDs of protected branches to scope the rule by.
    sharedSecret String
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl string
    The URL of the external status check service.
    projectId number
    The ID of the project.
    name string
    The display name of the external status check service.
    protectedBranchIds number[]
    The list of IDs of protected branches to scope the rule by.
    sharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    external_url str
    The URL of the external status check service.
    project_id int
    The ID of the project.
    name str
    The display name of the external status check service.
    protected_branch_ids Sequence[int]
    The list of IDs of protected branches to scope the rule by.
    shared_secret str
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl String
    The URL of the external status check service.
    projectId Number
    The ID of the project.
    name String
    The display name of the external status check service.
    protectedBranchIds List<Number>
    The list of IDs of protected branches to scope the rule by.
    sharedSecret String
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.

    Outputs

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

    Hmac bool
    True if the external status check uses an HMAC secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    Hmac bool
    True if the external status check uses an HMAC secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    hmac Boolean
    True if the external status check uses an HMAC secret.
    id String
    The provider-assigned unique ID for this managed resource.
    hmac boolean
    True if the external status check uses an HMAC secret.
    id string
    The provider-assigned unique ID for this managed resource.
    hmac bool
    True if the external status check uses an HMAC secret.
    id str
    The provider-assigned unique ID for this managed resource.
    hmac Boolean
    True if the external status check uses an HMAC secret.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectExternalStatusCheck Resource

    Get an existing ProjectExternalStatusCheck 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?: ProjectExternalStatusCheckState, opts?: CustomResourceOptions): ProjectExternalStatusCheck
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            external_url: Optional[str] = None,
            hmac: Optional[bool] = None,
            name: Optional[str] = None,
            project_id: Optional[int] = None,
            protected_branch_ids: Optional[Sequence[int]] = None,
            shared_secret: Optional[str] = None) -> ProjectExternalStatusCheck
    func GetProjectExternalStatusCheck(ctx *Context, name string, id IDInput, state *ProjectExternalStatusCheckState, opts ...ResourceOption) (*ProjectExternalStatusCheck, error)
    public static ProjectExternalStatusCheck Get(string name, Input<string> id, ProjectExternalStatusCheckState? state, CustomResourceOptions? opts = null)
    public static ProjectExternalStatusCheck get(String name, Output<String> id, ProjectExternalStatusCheckState state, CustomResourceOptions options)
    resources:  _:    type: gitlab:ProjectExternalStatusCheck    get:      id: ${id}
    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:
    ExternalUrl string
    The URL of the external status check service.
    Hmac bool
    True if the external status check uses an HMAC secret.
    Name string
    The display name of the external status check service.
    ProjectId int
    The ID of the project.
    ProtectedBranchIds List<int>
    The list of IDs of protected branches to scope the rule by.
    SharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    ExternalUrl string
    The URL of the external status check service.
    Hmac bool
    True if the external status check uses an HMAC secret.
    Name string
    The display name of the external status check service.
    ProjectId int
    The ID of the project.
    ProtectedBranchIds []int
    The list of IDs of protected branches to scope the rule by.
    SharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl String
    The URL of the external status check service.
    hmac Boolean
    True if the external status check uses an HMAC secret.
    name String
    The display name of the external status check service.
    projectId Integer
    The ID of the project.
    protectedBranchIds List<Integer>
    The list of IDs of protected branches to scope the rule by.
    sharedSecret String
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl string
    The URL of the external status check service.
    hmac boolean
    True if the external status check uses an HMAC secret.
    name string
    The display name of the external status check service.
    projectId number
    The ID of the project.
    protectedBranchIds number[]
    The list of IDs of protected branches to scope the rule by.
    sharedSecret string
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    external_url str
    The URL of the external status check service.
    hmac bool
    True if the external status check uses an HMAC secret.
    name str
    The display name of the external status check service.
    project_id int
    The ID of the project.
    protected_branch_ids Sequence[int]
    The list of IDs of protected branches to scope the rule by.
    shared_secret str
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.
    externalUrl String
    The URL of the external status check service.
    hmac Boolean
    True if the external status check uses an HMAC secret.
    name String
    The display name of the external status check service.
    projectId Number
    The ID of the project.
    protectedBranchIds List<Number>
    The list of IDs of protected branches to scope the rule by.
    sharedSecret String
    The HMAC secret for the external status check. If this is set, then removed from the config, the value will get set to empty in the state.

    Import

    Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_external_status_check. For example:

    terraform

    import {

    to = gitlab_project_external_status_check.example

    id = “see CLI command below for ID”

    }

    Importing using the CLI is supported with the following syntax:

    GitLab project external status checks can be imported using an id made up of <project-id>:<external-check-id>, e.g.

    $ pulumi import gitlab:index/projectExternalStatusCheck:ProjectExternalStatusCheck foo "123:42"
    

    NOTE: the shared_secret resource attribute is not available for imported resources as this information cannot be read from the GitLab API.

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

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi
      AI Agentic Workflows: Register now