1. Packages
  2. Harbor
  3. API Docs
  4. ImmutableTagRule
Harbor v3.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse

harbor.ImmutableTagRule

Explore with Pulumi AI

harbor logo
Harbor v3.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse

    Example Usage

    resource "harbor_project" "main" {
    	name = "acctest"
    }
    
    resource "harbor_immutable_tag_rule" "main" {
    	project_id = harbor_project.main.id
    	repo_matching = "**"
    	tag_excluding = "latest"
    }
    

    Create ImmutableTagRule Resource

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

    Constructor syntax

    new ImmutableTagRule(name: string, args: ImmutableTagRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ImmutableTagRule(resource_name: str,
                         args: ImmutableTagRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ImmutableTagRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         project_id: Optional[str] = None,
                         disabled: Optional[bool] = None,
                         repo_excluding: Optional[str] = None,
                         repo_matching: Optional[str] = None,
                         tag_excluding: Optional[str] = None,
                         tag_matching: Optional[str] = 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.
    
    

    Parameters

    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.

    Example

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

    var immutableTagRuleResource = new Harbor.ImmutableTagRule("immutableTagRuleResource", new()
    {
        ProjectId = "string",
        Disabled = false,
        RepoExcluding = "string",
        RepoMatching = "string",
        TagExcluding = "string",
        TagMatching = "string",
    });
    
    example, err := harbor.NewImmutableTagRule(ctx, "immutableTagRuleResource", &harbor.ImmutableTagRuleArgs{
    	ProjectId:     pulumi.String("string"),
    	Disabled:      pulumi.Bool(false),
    	RepoExcluding: pulumi.String("string"),
    	RepoMatching:  pulumi.String("string"),
    	TagExcluding:  pulumi.String("string"),
    	TagMatching:   pulumi.String("string"),
    })
    
    var immutableTagRuleResource = new ImmutableTagRule("immutableTagRuleResource", ImmutableTagRuleArgs.builder()        
        .projectId("string")
        .disabled(false)
        .repoExcluding("string")
        .repoMatching("string")
        .tagExcluding("string")
        .tagMatching("string")
        .build());
    
    immutable_tag_rule_resource = harbor.ImmutableTagRule("immutableTagRuleResource",
        project_id="string",
        disabled=False,
        repo_excluding="string",
        repo_matching="string",
        tag_excluding="string",
        tag_matching="string")
    
    const immutableTagRuleResource = new harbor.ImmutableTagRule("immutableTagRuleResource", {
        projectId: "string",
        disabled: false,
        repoExcluding: "string",
        repoMatching: "string",
        tagExcluding: "string",
        tagMatching: "string",
    });
    
    type: harbor:ImmutableTagRule
    properties:
        disabled: false
        projectId: string
        repoExcluding: string
        repoMatching: string
        tagExcluding: string
        tagMatching: string
    

    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.

    Import

    Harbor immutable tag rule can be imported using the project and immutabletagrule ids eg, <break><break> ```sh<break> $ pulumi import harbor:index/immutableTagRule:ImmutableTagRule main /projects/4/immutabletagrules/25 <break>```<break><break>

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

    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.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse