1. Registry
  2. Packages
  3. Gitlab Provider
  4. API Docs
  5. GroupDependencyProxyImageTtlPolicy
Viewing docs for GitLab v10.2.0
published on Wednesday, Aug 26, 2026 by Pulumi
gitlab logo
Viewing docs for GitLab v10.2.0
published on Wednesday, Aug 26, 2026 by Pulumi

    The gitlab.GroupDependencyProxyImageTtlPolicy resource allows managing a group’s Dependency Proxy image TTL (time-to-live) policy, which controls whether and how long cached images are kept before they’re removed.

    Every group has this policy already, so applying this resource only updates its settings. Destroying this resource reverts enabled and ttl to the values that were in place before Terraform started managing the group (captured on create or import).

    Upstream API: GitLab GraphQL API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const foo = new gitlab.GroupDependencyProxyImageTtlPolicy("foo", {
        group: "1234",
        enabled: true,
        ttl: 30,
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    foo = gitlab.GroupDependencyProxyImageTtlPolicy("foo",
        group="1234",
        enabled=True,
        ttl=30)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v10/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.NewGroupDependencyProxyImageTtlPolicy(ctx, "foo", &gitlab.GroupDependencyProxyImageTtlPolicyArgs{
    			Group:   pulumi.String("1234"),
    			Enabled: pulumi.Bool(true),
    			Ttl:     pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new GitLab.GroupDependencyProxyImageTtlPolicy("foo", new()
        {
            Group = "1234",
            Enabled = true,
            Ttl = 30,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.GroupDependencyProxyImageTtlPolicy;
    import com.pulumi.gitlab.GroupDependencyProxyImageTtlPolicyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 foo = new GroupDependencyProxyImageTtlPolicy("foo", GroupDependencyProxyImageTtlPolicyArgs.builder()
                .group("1234")
                .enabled(true)
                .ttl(30)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: gitlab:GroupDependencyProxyImageTtlPolicy
        properties:
          group: '1234'
          enabled: true
          ttl: 30
    
    pulumi {
      required_providers {
        gitlab = {
          source = "pulumi/gitlab"
        }
      }
    }
    
    resource "gitlab_groupdependencyproxyimagettlpolicy" "foo" {
      group   = "1234"
      enabled = true
      ttl     = 30
    }
    

    Create GroupDependencyProxyImageTtlPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GroupDependencyProxyImageTtlPolicy(name: string, args: GroupDependencyProxyImageTtlPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def GroupDependencyProxyImageTtlPolicy(resource_name: str,
                                           args: GroupDependencyProxyImageTtlPolicyArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def GroupDependencyProxyImageTtlPolicy(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           group: Optional[str] = None,
                                           enabled: Optional[bool] = None,
                                           ttl: Optional[int] = None)
    func NewGroupDependencyProxyImageTtlPolicy(ctx *Context, name string, args GroupDependencyProxyImageTtlPolicyArgs, opts ...ResourceOption) (*GroupDependencyProxyImageTtlPolicy, error)
    public GroupDependencyProxyImageTtlPolicy(string name, GroupDependencyProxyImageTtlPolicyArgs args, CustomResourceOptions? opts = null)
    public GroupDependencyProxyImageTtlPolicy(String name, GroupDependencyProxyImageTtlPolicyArgs args)
    public GroupDependencyProxyImageTtlPolicy(String name, GroupDependencyProxyImageTtlPolicyArgs args, CustomResourceOptions options)
    
    type: gitlab:GroupDependencyProxyImageTtlPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gitlab_group_dependency_proxy_image_ttl_policy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args GroupDependencyProxyImageTtlPolicyArgs
    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 GroupDependencyProxyImageTtlPolicyArgs
    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 GroupDependencyProxyImageTtlPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupDependencyProxyImageTtlPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupDependencyProxyImageTtlPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var groupDependencyProxyImageTtlPolicyResource = new GitLab.GroupDependencyProxyImageTtlPolicy("groupDependencyProxyImageTtlPolicyResource", new()
    {
        Group = "string",
        Enabled = false,
        Ttl = 0,
    });
    
    example, err := gitlab.NewGroupDependencyProxyImageTtlPolicy(ctx, "groupDependencyProxyImageTtlPolicyResource", &gitlab.GroupDependencyProxyImageTtlPolicyArgs{
    	Group:   pulumi.String("string"),
    	Enabled: pulumi.Bool(false),
    	Ttl:     pulumi.Int(0),
    })
    
    resource "gitlab_group_dependency_proxy_image_ttl_policy" "groupDependencyProxyImageTtlPolicyResource" {
      lifecycle {
        create_before_destroy = true
      }
      group   = "string"
      enabled = false
      ttl     = 0
    }
    
    var groupDependencyProxyImageTtlPolicyResource = new GroupDependencyProxyImageTtlPolicy("groupDependencyProxyImageTtlPolicyResource", GroupDependencyProxyImageTtlPolicyArgs.builder()
        .group("string")
        .enabled(false)
        .ttl(0)
        .build());
    
    group_dependency_proxy_image_ttl_policy_resource = gitlab.GroupDependencyProxyImageTtlPolicy("groupDependencyProxyImageTtlPolicyResource",
        group="string",
        enabled=False,
        ttl=0)
    
    const groupDependencyProxyImageTtlPolicyResource = new gitlab.GroupDependencyProxyImageTtlPolicy("groupDependencyProxyImageTtlPolicyResource", {
        group: "string",
        enabled: false,
        ttl: 0,
    });
    
    type: gitlab:GroupDependencyProxyImageTtlPolicy
    properties:
        enabled: false
        group: string
        ttl: 0
    

    GroupDependencyProxyImageTtlPolicy Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GroupDependencyProxyImageTtlPolicy resource accepts the following input properties:

    Group string
    The ID or URL-encoded path of the group.
    Enabled bool
    Indicates whether the policy is enabled or disabled.
    Ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    Group string
    The ID or URL-encoded path of the group.
    Enabled bool
    Indicates whether the policy is enabled or disabled.
    Ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    group string
    The ID or URL-encoded path of the group.
    enabled bool
    Indicates whether the policy is enabled or disabled.
    ttl number
    Number of days to retain a cached image file before it's removed from the cache.
    group String
    The ID or URL-encoded path of the group.
    enabled Boolean
    Indicates whether the policy is enabled or disabled.
    ttl Integer
    Number of days to retain a cached image file before it's removed from the cache.
    group string
    The ID or URL-encoded path of the group.
    enabled boolean
    Indicates whether the policy is enabled or disabled.
    ttl number
    Number of days to retain a cached image file before it's removed from the cache.
    group str
    The ID or URL-encoded path of the group.
    enabled bool
    Indicates whether the policy is enabled or disabled.
    ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    group String
    The ID or URL-encoded path of the group.
    enabled Boolean
    Indicates whether the policy is enabled or disabled.
    ttl Number
    Number of days to retain a cached image file before it's removed from the cache.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GroupDependencyProxyImageTtlPolicy 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 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.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GroupDependencyProxyImageTtlPolicy Resource

    Get an existing GroupDependencyProxyImageTtlPolicy 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?: GroupDependencyProxyImageTtlPolicyState, opts?: CustomResourceOptions): GroupDependencyProxyImageTtlPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            group: Optional[str] = None,
            ttl: Optional[int] = None) -> GroupDependencyProxyImageTtlPolicy
    func GetGroupDependencyProxyImageTtlPolicy(ctx *Context, name string, id IDInput, state *GroupDependencyProxyImageTtlPolicyState, opts ...ResourceOption) (*GroupDependencyProxyImageTtlPolicy, error)
    public static GroupDependencyProxyImageTtlPolicy Get(string name, Input<string> id, GroupDependencyProxyImageTtlPolicyState? state, CustomResourceOptions? opts = null)
    public static GroupDependencyProxyImageTtlPolicy get(String name, Output<String> id, GroupDependencyProxyImageTtlPolicyState state, CustomResourceOptions options)
    resources:  _:    type: gitlab:GroupDependencyProxyImageTtlPolicy    get:      id: ${id}
    import {
      to = gitlab_group_dependency_proxy_image_ttl_policy.example
      id = "${id}"
    }
    
    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.
    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:
    Enabled bool
    Indicates whether the policy is enabled or disabled.
    Group string
    The ID or URL-encoded path of the group.
    Ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    Enabled bool
    Indicates whether the policy is enabled or disabled.
    Group string
    The ID or URL-encoded path of the group.
    Ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    enabled bool
    Indicates whether the policy is enabled or disabled.
    group string
    The ID or URL-encoded path of the group.
    ttl number
    Number of days to retain a cached image file before it's removed from the cache.
    enabled Boolean
    Indicates whether the policy is enabled or disabled.
    group String
    The ID or URL-encoded path of the group.
    ttl Integer
    Number of days to retain a cached image file before it's removed from the cache.
    enabled boolean
    Indicates whether the policy is enabled or disabled.
    group string
    The ID or URL-encoded path of the group.
    ttl number
    Number of days to retain a cached image file before it's removed from the cache.
    enabled bool
    Indicates whether the policy is enabled or disabled.
    group str
    The ID or URL-encoded path of the group.
    ttl int
    Number of days to retain a cached image file before it's removed from the cache.
    enabled Boolean
    Indicates whether the policy is enabled or disabled.
    group String
    The ID or URL-encoded path of the group.
    ttl Number
    Number of days to retain a cached image file before it's removed from the cache.

    Import

    Starting in Terraform v1.5.0, you can use an import block to import gitlab.GroupDependencyProxyImageTtlPolicy. For example:

    Importing using the CLI is supported with the following syntax:

    You can import a group dependency proxy image TTL policy using the group id, e.g. 42.

    $ pulumi import gitlab:index/groupDependencyProxyImageTtlPolicy:GroupDependencyProxyImageTtlPolicy foo 42
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    Viewing docs for GitLab v10.2.0
    published on Wednesday, Aug 26, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial