ProjectEnvironmentArgs

data class ProjectEnvironmentArgs(val externalUrl: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val stopBeforeDestroy: Output<Boolean>? = null) : ConvertibleToJava<ProjectEnvironmentArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const thisGroup = new gitlab.Group("thisGroup", {
path: "example",
description: "An example group",
});
const thisProject = new gitlab.Project("thisProject", {
namespaceId: thisGroup.id,
initializeWithReadme: true,
});
const thisProjectEnvironment = new gitlab.ProjectEnvironment("thisProjectEnvironment", {
project: thisProject.id,
externalUrl: "www.example.com",
});
import pulumi
import pulumi_gitlab as gitlab
this_group = gitlab.Group("thisGroup",
path="example",
description="An example group")
this_project = gitlab.Project("thisProject",
namespace_id=this_group.id,
initialize_with_readme=True)
this_project_environment = gitlab.ProjectEnvironment("thisProjectEnvironment",
project=this_project.id,
external_url="www.example.com")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var thisGroup = new GitLab.Group("thisGroup", new()
{
Path = "example",
Description = "An example group",
});
var thisProject = new GitLab.Project("thisProject", new()
{
NamespaceId = thisGroup.Id,
InitializeWithReadme = true,
});
var thisProjectEnvironment = new GitLab.ProjectEnvironment("thisProjectEnvironment", new()
{
Project = thisProject.Id,
ExternalUrl = "www.example.com",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
thisGroup, err := gitlab.NewGroup(ctx, "thisGroup", &gitlab.GroupArgs{
Path: pulumi.String("example"),
Description: pulumi.String("An example group"),
})
if err != nil {
return err
}
thisProject, err := gitlab.NewProject(ctx, "thisProject", &gitlab.ProjectArgs{
NamespaceId: thisGroup.ID(),
InitializeWithReadme: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = gitlab.NewProjectEnvironment(ctx, "thisProjectEnvironment", &gitlab.ProjectEnvironmentArgs{
Project: thisProject.ID(),
ExternalUrl: pulumi.String("www.example.com"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Group;
import com.pulumi.gitlab.GroupArgs;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.ProjectEnvironment;
import com.pulumi.gitlab.ProjectEnvironmentArgs;
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 thisGroup = new Group("thisGroup", GroupArgs.builder()
.path("example")
.description("An example group")
.build());
var thisProject = new Project("thisProject", ProjectArgs.builder()
.namespaceId(thisGroup.id())
.initializeWithReadme(true)
.build());
var thisProjectEnvironment = new ProjectEnvironment("thisProjectEnvironment", ProjectEnvironmentArgs.builder()
.project(thisProject.id())
.externalUrl("www.example.com")
.build());
}
}
resources:
thisGroup:
type: gitlab:Group
properties:
path: example
description: An example group
thisProject:
type: gitlab:Project
properties:
namespaceId: ${thisGroup.id}
initializeWithReadme: true
thisProjectEnvironment:
type: gitlab:ProjectEnvironment
properties:
project: ${thisProject.id}
externalUrl: www.example.com

Import

GitLab project environments can be imported using an id made up of projectId:environmenId, e.g.

$ pulumi import gitlab:index/projectEnvironment:ProjectEnvironment bar 123:321

Constructors

Link copied to clipboard
constructor(externalUrl: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null, stopBeforeDestroy: Output<Boolean>? = null)

Properties

Link copied to clipboard
val externalUrl: Output<String>? = null

Place to link to for this environment.

Link copied to clipboard
val name: Output<String>? = null

The name of the environment.

Link copied to clipboard
val project: Output<String>? = null

The ID or full path of the project to environment is created for.

Link copied to clipboard
val stopBeforeDestroy: Output<Boolean>? = null

Determines whether the environment is attempted to be stopped before the environment is deleted.

Functions

Link copied to clipboard
open override fun toJava(): ProjectEnvironmentArgs