ProjectFreezePeriod

# gitlab.ProjectFreezePeriod

This resource allows you to create and manage freeze periods. For further information on freeze periods, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var schedule = new GitLab.ProjectFreezePeriod("schedule", new GitLab.ProjectFreezePeriodArgs
        {
            ProjectId = gitlab_project.Foo.Id,
            FreezeStart = "0 23 * * 5",
            FreezeEnd = "0 7 * * 1",
            CronTimezone = "UTC",
        });
    }

}
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.NewProjectFreezePeriod(ctx, "schedule", &gitlab.ProjectFreezePeriodArgs{
			ProjectId:    pulumi.Any(gitlab_project.Foo.Id),
			FreezeStart:  pulumi.String("0 23 * * 5"),
			FreezeEnd:    pulumi.String("0 7 * * 1"),
			CronTimezone: pulumi.String("UTC"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

schedule = gitlab.ProjectFreezePeriod("schedule",
    project_id=gitlab_project["foo"]["id"],
    freeze_start="0 23 * * 5",
    freeze_end="0 7 * * 1",
    cron_timezone="UTC")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const schedule = new gitlab.ProjectFreezePeriod("schedule", {
    projectId: gitlab_project.foo.id,
    freezeStart: "0 23 * * 5",
    freezeEnd: "0 7 * * 1",
    cronTimezone: "UTC",
});

Create a ProjectFreezePeriod Resource

new ProjectFreezePeriod(name: string, args: ProjectFreezePeriodArgs, opts?: CustomResourceOptions);
@overload
def ProjectFreezePeriod(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cron_timezone: Optional[str] = None,
                        freeze_end: Optional[str] = None,
                        freeze_start: Optional[str] = None,
                        project_id: Optional[str] = None)
@overload
def ProjectFreezePeriod(resource_name: str,
                        args: ProjectFreezePeriodArgs,
                        opts: Optional[ResourceOptions] = None)
func NewProjectFreezePeriod(ctx *Context, name string, args ProjectFreezePeriodArgs, opts ...ResourceOption) (*ProjectFreezePeriod, error)
public ProjectFreezePeriod(string name, ProjectFreezePeriodArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ProjectFreezePeriodArgs
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 ProjectFreezePeriodArgs
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 ProjectFreezePeriodArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectFreezePeriodArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectFreezePeriod Resource Properties

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

Inputs

The ProjectFreezePeriod resource accepts the following input properties:

FreezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
FreezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
ProjectId string
The id of the project to add the schedule to.
CronTimezone string
The timezone.
FreezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
FreezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
ProjectId string
The id of the project to add the schedule to.
CronTimezone string
The timezone.
freezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
freezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
projectId string
The id of the project to add the schedule to.
cronTimezone string
The timezone.
freeze_end str
End of the Freeze Period in cron format (e.g. 0 2 * * *).
freeze_start str
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
project_id str
The id of the project to add the schedule to.
cron_timezone str
The timezone.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectFreezePeriod 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 ProjectFreezePeriod Resource

Get an existing ProjectFreezePeriod 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?: ProjectFreezePeriodState, opts?: CustomResourceOptions): ProjectFreezePeriod
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cron_timezone: Optional[str] = None,
        freeze_end: Optional[str] = None,
        freeze_start: Optional[str] = None,
        project_id: Optional[str] = None) -> ProjectFreezePeriod
func GetProjectFreezePeriod(ctx *Context, name string, id IDInput, state *ProjectFreezePeriodState, opts ...ResourceOption) (*ProjectFreezePeriod, error)
public static ProjectFreezePeriod Get(string name, Input<string> id, ProjectFreezePeriodState? 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:

CronTimezone string
The timezone.
FreezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
FreezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
ProjectId string
The id of the project to add the schedule to.
CronTimezone string
The timezone.
FreezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
FreezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
ProjectId string
The id of the project to add the schedule to.
cronTimezone string
The timezone.
freezeEnd string
End of the Freeze Period in cron format (e.g. 0 2 * * *).
freezeStart string
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
projectId string
The id of the project to add the schedule to.
cron_timezone str
The timezone.
freeze_end str
End of the Freeze Period in cron format (e.g. 0 2 * * *).
freeze_start str
Start of the Freeze Period in cron format (e.g. 0 1 * * *).
project_id str
The id of the project to add the schedule to.

Import

GitLab project freeze periods can be imported using an id made up of project_id:freeze_period_id, e.g.

 $ pulumi import gitlab:index/projectFreezePeriod:ProjectFreezePeriod schedule "12345:1337"

Package Details

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