Project Environment
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",
});
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")
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",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/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
})
}
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());
}
}
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
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_project_environment
. For example: terraform import { to = gitlab_project_environment.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: 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
The ISO8601 date/time that this environment will be automatically stopped at in UTC.
The auto stop setting for the environment. Allowed values are always
, with_action
. If this is set to with_action
and stop_before_destroy
is true
, the environment will be force-stopped.
The cluster agent to associate with this environment.
The description of the environment.
Place to link to for this environment.
The Flux resource path to associate with this environment.
The Kubernetes namespace to associate with this environment.
Determines whether the environment is attempted to be stopped before the environment is deleted. If auto_stop_setting
is set to with_action
, this will perform a force stop.