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