PipelineScheduleVariable

# gitlab_pipeline_schedule_variable

This resource allows you to create and manage variables for pipeline schedules.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var examplePipelineSchedule = new GitLab.PipelineSchedule("examplePipelineSchedule", new GitLab.PipelineScheduleArgs
        {
            Project = "12345",
            Description = "Used to schedule builds",
            Ref = "master",
            Cron = "0 1 * * *",
        });
        var examplePipelineScheduleVariable = new GitLab.PipelineScheduleVariable("examplePipelineScheduleVariable", new GitLab.PipelineScheduleVariableArgs
        {
            Project = gitlab_pipeline_schedule.Project,
            PipelineScheduleId = gitlab_pipeline_schedule.Id,
            Key = "EXAMPLE_KEY",
            Value = "example",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.NewPipelineSchedule(ctx, "examplePipelineSchedule", &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, "examplePipelineScheduleVariable", &gitlab.PipelineScheduleVariableArgs{
			Project:            pulumi.Any(gitlab_pipeline_schedule.Project),
			PipelineScheduleId: pulumi.Any(gitlab_pipeline_schedule.Id),
			Key:                pulumi.String("EXAMPLE_KEY"),
			Value:              pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

example_pipeline_schedule = gitlab.PipelineSchedule("examplePipelineSchedule",
    project="12345",
    description="Used to schedule builds",
    ref="master",
    cron="0 1 * * *")
example_pipeline_schedule_variable = gitlab.PipelineScheduleVariable("examplePipelineScheduleVariable",
    project=gitlab_pipeline_schedule["project"],
    pipeline_schedule_id=gitlab_pipeline_schedule["id"],
    key="EXAMPLE_KEY",
    value="example")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const examplePipelineSchedule = new gitlab.PipelineSchedule("examplePipelineSchedule", {
    project: "12345",
    description: "Used to schedule builds",
    ref: "master",
    cron: "0 1 * * *",
});
const examplePipelineScheduleVariable = new gitlab.PipelineScheduleVariable("examplePipelineScheduleVariable", {
    project: gitlab_pipeline_schedule.project,
    pipelineScheduleId: gitlab_pipeline_schedule.id,
    key: "EXAMPLE_KEY",
    value: "example",
});

Create a PipelineScheduleVariable Resource

new PipelineScheduleVariable(name: string, args: PipelineScheduleVariableArgs, opts?: CustomResourceOptions);
@overload
def PipelineScheduleVariable(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             key: Optional[str] = None,
                             pipeline_schedule_id: Optional[int] = None,
                             project: Optional[str] = None,
                             value: Optional[str] = None)
@overload
def PipelineScheduleVariable(resource_name: str,
                             args: PipelineScheduleVariableArgs,
                             opts: Optional[ResourceOptions] = None)
func NewPipelineScheduleVariable(ctx *Context, name string, args PipelineScheduleVariableArgs, opts ...ResourceOption) (*PipelineScheduleVariable, error)
public PipelineScheduleVariable(string name, PipelineScheduleVariableArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PipelineScheduleVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args PipelineScheduleVariableArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PipelineScheduleVariableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PipelineScheduleVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

PipelineScheduleVariable Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The PipelineScheduleVariable resource accepts the following input properties:

Key string
Name of the variable.
PipelineScheduleId int
The id of the pipeline schedule.
Project string
The id of the project to add the schedule to.
Value string
Value of the variable.
Key string
Name of the variable.
PipelineScheduleId int
The id of the pipeline schedule.
Project string
The id of the project to add the schedule to.
Value string
Value of the variable.
key string
Name of the variable.
pipelineScheduleId number
The id of the pipeline schedule.
project string
The id of the project to add the schedule to.
value string
Value of the variable.
key str
Name of the variable.
pipeline_schedule_id int
The id of the pipeline schedule.
project str
The id of the project to add the schedule to.
value str
Value of the variable.

Outputs

All input properties are implicitly available as output properties. Additionally, the PipelineScheduleVariable resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing PipelineScheduleVariable Resource

Get an existing PipelineScheduleVariable resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PipelineScheduleVariableState, opts?: CustomResourceOptions): PipelineScheduleVariable
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        key: Optional[str] = None,
        pipeline_schedule_id: Optional[int] = None,
        project: Optional[str] = None,
        value: Optional[str] = None) -> PipelineScheduleVariable
func GetPipelineScheduleVariable(ctx *Context, name string, id IDInput, state *PipelineScheduleVariableState, opts ...ResourceOption) (*PipelineScheduleVariable, error)
public static PipelineScheduleVariable Get(string name, Input<string> id, PipelineScheduleVariableState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Key string
Name of the variable.
PipelineScheduleId int
The id of the pipeline schedule.
Project string
The id of the project to add the schedule to.
Value string
Value of the variable.
Key string
Name of the variable.
PipelineScheduleId int
The id of the pipeline schedule.
Project string
The id of the project to add the schedule to.
Value string
Value of the variable.
key string
Name of the variable.
pipelineScheduleId number
The id of the pipeline schedule.
project string
The id of the project to add the schedule to.
value string
Value of the variable.
key str
Name of the variable.
pipeline_schedule_id int
The id of the pipeline schedule.
project str
The id of the project to add the schedule to.
value str
Value of the variable.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.