ProjectEnvironment

class ProjectEnvironment : KotlinCustomResource

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

Properties

Link copied to clipboard
val createdAt: Output<String>

The ISO8601 date/time that this environment was created at in UTC.

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

Place to link to for this environment.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the environment.

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val slug: Output<String>

The name of the environment in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.

Link copied to clipboard
val state: Output<String>

State the environment is in. Valid values are available, stopped.

Link copied to clipboard

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

Link copied to clipboard
val updatedAt: Output<String>

The ISO8601 date/time that this environment was last updated at in UTC.

Link copied to clipboard
val urn: Output<String>