1. Packages
  2. Harbor
  3. API Docs
  4. ImmutableTagRule
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

harbor.ImmutableTagRule

Explore with Pulumi AI

harbor logo
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

    Import

    Harbor immutable tag rule can be imported using the project and immutabletagrule ids eg, `

     $ pulumi import harbor:index/immutableTagRule:ImmutableTagRule main /projects/4/immutabletagrules/25
    

    `

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harbor = Pulumiverse.Harbor;
    
    return await Deployment.RunAsync(() => 
    {
        var mainProject = new Harbor.Project("mainProject");
    
        var mainImmutableTagRule = new Harbor.ImmutableTagRule("mainImmutableTagRule", new()
        {
            ProjectId = mainProject.Id,
            RepoMatching = "**",
            TagExcluding = "latest",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mainProject, err := harbor.NewProject(ctx, "mainProject", nil)
    		if err != nil {
    			return err
    		}
    		_, err = harbor.NewImmutableTagRule(ctx, "mainImmutableTagRule", &harbor.ImmutableTagRuleArgs{
    			ProjectId:    mainProject.ID(),
    			RepoMatching: pulumi.String("**"),
    			TagExcluding: pulumi.String("latest"),
    		})
    		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.harbor.Project;
    import com.pulumi.harbor.ImmutableTagRule;
    import com.pulumi.harbor.ImmutableTagRuleArgs;
    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 mainProject = new Project("mainProject");
    
            var mainImmutableTagRule = new ImmutableTagRule("mainImmutableTagRule", ImmutableTagRuleArgs.builder()        
                .projectId(mainProject.id())
                .repoMatching("**")
                .tagExcluding("latest")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_harbor as harbor
    
    main_project = harbor.Project("mainProject")
    main_immutable_tag_rule = harbor.ImmutableTagRule("mainImmutableTagRule",
        project_id=main_project.id,
        repo_matching="**",
        tag_excluding="latest")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harbor from "@pulumiverse/harbor";
    
    const mainProject = new harbor.Project("mainProject", {});
    const mainImmutableTagRule = new harbor.ImmutableTagRule("mainImmutableTagRule", {
        projectId: mainProject.id,
        repoMatching: "**",
        tagExcluding: "latest",
    });
    
    resources:
      mainProject:
        type: harbor:Project
      mainImmutableTagRule:
        type: harbor:ImmutableTagRule
        properties:
          projectId: ${mainProject.id}
          repoMatching: '**'
          tagExcluding: latest
    

    Create ImmutableTagRule Resource

    new ImmutableTagRule(name: string, args: ImmutableTagRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ImmutableTagRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         disabled: Optional[bool] = None,
                         project_id: Optional[str] = None,
                         repo_excluding: Optional[str] = None,
                         repo_matching: Optional[str] = None,
                         tag_excluding: Optional[str] = None,
                         tag_matching: Optional[str] = None)
    @overload
    def ImmutableTagRule(resource_name: str,
                         args: ImmutableTagRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewImmutableTagRule(ctx *Context, name string, args ImmutableTagRuleArgs, opts ...ResourceOption) (*ImmutableTagRule, error)
    public ImmutableTagRule(string name, ImmutableTagRuleArgs args, CustomResourceOptions? opts = null)
    public ImmutableTagRule(String name, ImmutableTagRuleArgs args)
    public ImmutableTagRule(String name, ImmutableTagRuleArgs args, CustomResourceOptions options)
    
    type: harbor:ImmutableTagRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ImmutableTagRuleArgs
    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 ImmutableTagRuleArgs
    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 ImmutableTagRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImmutableTagRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImmutableTagRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ImmutableTagRule Resource Properties

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

    Inputs

    The ImmutableTagRule resource accepts the following input properties:

    ProjectId string
    Disabled bool

    Specify if the rule is disable or not. Defaults to false

    RepoExcluding string

    For the repositories excuding.

    RepoMatching string

    For the repositories matching.

    TagExcluding string

    For the tag excuding.

    TagMatching string

    For the tag matching.

    ProjectId string
    Disabled bool

    Specify if the rule is disable or not. Defaults to false

    RepoExcluding string

    For the repositories excuding.

    RepoMatching string

    For the repositories matching.

    TagExcluding string

    For the tag excuding.

    TagMatching string

    For the tag matching.

    projectId String
    disabled Boolean

    Specify if the rule is disable or not. Defaults to false

    repoExcluding String

    For the repositories excuding.

    repoMatching String

    For the repositories matching.

    tagExcluding String

    For the tag excuding.

    tagMatching String

    For the tag matching.

    projectId string
    disabled boolean

    Specify if the rule is disable or not. Defaults to false

    repoExcluding string

    For the repositories excuding.

    repoMatching string

    For the repositories matching.

    tagExcluding string

    For the tag excuding.

    tagMatching string

    For the tag matching.

    project_id str
    disabled bool

    Specify if the rule is disable or not. Defaults to false

    repo_excluding str

    For the repositories excuding.

    repo_matching str

    For the repositories matching.

    tag_excluding str

    For the tag excuding.

    tag_matching str

    For the tag matching.

    projectId String
    disabled Boolean

    Specify if the rule is disable or not. Defaults to false

    repoExcluding String

    For the repositories excuding.

    repoMatching String

    For the repositories matching.

    tagExcluding String

    For the tag excuding.

    tagMatching String

    For the tag matching.

    Outputs

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

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ImmutableTagRule Resource

    Get an existing ImmutableTagRule 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?: ImmutableTagRuleState, opts?: CustomResourceOptions): ImmutableTagRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disabled: Optional[bool] = None,
            project_id: Optional[str] = None,
            repo_excluding: Optional[str] = None,
            repo_matching: Optional[str] = None,
            tag_excluding: Optional[str] = None,
            tag_matching: Optional[str] = None) -> ImmutableTagRule
    func GetImmutableTagRule(ctx *Context, name string, id IDInput, state *ImmutableTagRuleState, opts ...ResourceOption) (*ImmutableTagRule, error)
    public static ImmutableTagRule Get(string name, Input<string> id, ImmutableTagRuleState? state, CustomResourceOptions? opts = null)
    public static ImmutableTagRule get(String name, Output<String> id, ImmutableTagRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Disabled bool

    Specify if the rule is disable or not. Defaults to false

    ProjectId string
    RepoExcluding string

    For the repositories excuding.

    RepoMatching string

    For the repositories matching.

    TagExcluding string

    For the tag excuding.

    TagMatching string

    For the tag matching.

    Disabled bool

    Specify if the rule is disable or not. Defaults to false

    ProjectId string
    RepoExcluding string

    For the repositories excuding.

    RepoMatching string

    For the repositories matching.

    TagExcluding string

    For the tag excuding.

    TagMatching string

    For the tag matching.

    disabled Boolean

    Specify if the rule is disable or not. Defaults to false

    projectId String
    repoExcluding String

    For the repositories excuding.

    repoMatching String

    For the repositories matching.

    tagExcluding String

    For the tag excuding.

    tagMatching String

    For the tag matching.

    disabled boolean

    Specify if the rule is disable or not. Defaults to false

    projectId string
    repoExcluding string

    For the repositories excuding.

    repoMatching string

    For the repositories matching.

    tagExcluding string

    For the tag excuding.

    tagMatching string

    For the tag matching.

    disabled bool

    Specify if the rule is disable or not. Defaults to false

    project_id str
    repo_excluding str

    For the repositories excuding.

    repo_matching str

    For the repositories matching.

    tag_excluding str

    For the tag excuding.

    tag_matching str

    For the tag matching.

    disabled Boolean

    Specify if the rule is disable or not. Defaults to false

    projectId String
    repoExcluding String

    For the repositories excuding.

    repoMatching String

    For the repositories matching.

    tagExcluding String

    For the tag excuding.

    tagMatching String

    For the tag matching.

    Package Details

    Repository
    harbor pulumiverse/pulumi-harbor
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the harbor Terraform Provider.

    harbor logo
    Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse