ProjectEnvironmentArgs

data class ProjectEnvironmentArgs(val autoStopSetting: Output<String>? = null, val clusterAgentId: Output<Int>? = null, val description: Output<String>? = null, val externalUrl: Output<String>? = null, val fluxResourcePath: Output<String>? = null, val kubernetesNamespace: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val stopBeforeDestroy: Output<Boolean>? = null, val tier: Output<String>? = 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",
});
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

Constructors

Link copied to clipboard
constructor(autoStopSetting: Output<String>? = null, clusterAgentId: Output<Int>? = null, description: Output<String>? = null, externalUrl: Output<String>? = null, fluxResourcePath: Output<String>? = null, kubernetesNamespace: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null, stopBeforeDestroy: Output<Boolean>? = null, tier: Output<String>? = null)

Properties

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

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.

Link copied to clipboard
val clusterAgentId: Output<Int>? = null

The cluster agent to associate with this environment.

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

The description of the environment.

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

Place to link to for this environment.

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

The Flux resource path to associate with this environment.

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

The Kubernetes namespace to associate with 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. If auto_stop_setting is set to with_action, this will perform a force stop.

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

The tier of the new environment. Valid values are production, staging, testing, development, other.

Functions

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