PipelineScheduleVariableArgs

data class PipelineScheduleVariableArgs(val key: Output<String>? = null, val pipelineScheduleId: Output<Int>? = null, val project: Output<String>? = null, val value: Output<String>? = null) : ConvertibleToJava<PipelineScheduleVariableArgs>

The gitlab.PipelineScheduleVariable resource allows to manage the lifecycle of a variable for a pipeline schedule. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.PipelineSchedule("example", {
project: "12345",
description: "Used to schedule builds",
ref: "master",
cron: "0 1 * * *",
});
const examplePipelineScheduleVariable = new gitlab.PipelineScheduleVariable("example", {
project: example.project,
pipelineScheduleId: example.pipelineScheduleId,
key: "EXAMPLE_KEY",
value: "example",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.PipelineSchedule("example",
project="12345",
description="Used to schedule builds",
ref="master",
cron="0 1 * * *")
example_pipeline_schedule_variable = gitlab.PipelineScheduleVariable("example",
project=example.project,
pipeline_schedule_id=example.pipeline_schedule_id,
key="EXAMPLE_KEY",
value="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.PipelineSchedule("example", new()
{
Project = "12345",
Description = "Used to schedule builds",
Ref = "master",
Cron = "0 1 * * *",
});
var examplePipelineScheduleVariable = new GitLab.PipelineScheduleVariable("example", new()
{
Project = example.Project,
PipelineScheduleId = example.PipelineScheduleId,
Key = "EXAMPLE_KEY",
Value = "example",
});
});
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 {
example, err := gitlab.NewPipelineSchedule(ctx, "example", &gitlab.PipelineScheduleArgs{
Project: pulumi.String("12345"),
Description: pulumi.String("Used to schedule builds"),
Ref: pulumi.String("master"),
Cron: pulumi.String("0 1 * * *"),
})
if err != nil {
return err
}
_, err = gitlab.NewPipelineScheduleVariable(ctx, "example", &gitlab.PipelineScheduleVariableArgs{
Project: example.Project,
PipelineScheduleId: example.PipelineScheduleId,
Key: pulumi.String("EXAMPLE_KEY"),
Value: pulumi.String("example"),
})
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.PipelineSchedule;
import com.pulumi.gitlab.PipelineScheduleArgs;
import com.pulumi.gitlab.PipelineScheduleVariable;
import com.pulumi.gitlab.PipelineScheduleVariableArgs;
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 example = new PipelineSchedule("example", PipelineScheduleArgs.builder()
.project("12345")
.description("Used to schedule builds")
.ref("master")
.cron("0 1 * * *")
.build());
var examplePipelineScheduleVariable = new PipelineScheduleVariable("examplePipelineScheduleVariable", PipelineScheduleVariableArgs.builder()
.project(example.project())
.pipelineScheduleId(example.pipelineScheduleId())
.key("EXAMPLE_KEY")
.value("example")
.build());
}
}
resources:
example:
type: gitlab:PipelineSchedule
properties:
project: '12345'
description: Used to schedule builds
ref: master
cron: 0 1 * * *
examplePipelineScheduleVariable:
type: gitlab:PipelineScheduleVariable
name: example
properties:
project: ${example.project}
pipelineScheduleId: ${example.pipelineScheduleId}
key: EXAMPLE_KEY
value: example

Import

Pipeline schedule variables can be imported using an id made up of project_id:pipeline_schedule_id:key, e.g.

$ pulumi import gitlab:index/pipelineScheduleVariable:PipelineScheduleVariable example 123456789:13:mykey

Constructors

Link copied to clipboard
constructor(key: Output<String>? = null, pipelineScheduleId: Output<Int>? = null, project: Output<String>? = null, value: Output<String>? = null)

Properties

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

Name of the variable.

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

The id of the pipeline schedule.

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

The id of the project to add the schedule to.

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

Value of the variable.

Functions

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