harbor.ImmutableTagRule
Explore with Pulumi AI
Example Usage
resource "harbor_project" "main" {
name = "acctest"
}
resource "harbor_immutable_tag_rule" "main" {
disabled = true
project_id = harbor_project.main.id
repo_matching = "**"
tag_matching = "v2.*"
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.
Constructor 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:
- Project
Id string - The project id of which you would like to apply this policy.
- Disabled bool
- Specify if the rule is disable or not. Defaults to
false
- Repo
Excluding string - For the repositories excluding.
- Repo
Matching string - For the repositories matching.
- Tag
Excluding string - For the tag excluding.
- Tag
Matching string - For the tag matching.
- Project
Id string - The project id of which you would like to apply this policy.
- Disabled bool
- Specify if the rule is disable or not. Defaults to
false
- Repo
Excluding string - For the repositories excluding.
- Repo
Matching string - For the repositories matching.
- Tag
Excluding string - For the tag excluding.
- Tag
Matching string - For the tag matching.
- project
Id String - The project id of which you would like to apply this policy.
- disabled Boolean
- Specify if the rule is disable or not. Defaults to
false
- repo
Excluding String - For the repositories excluding.
- repo
Matching String - For the repositories matching.
- tag
Excluding String - For the tag excluding.
- tag
Matching String - For the tag matching.
- project
Id string - The project id of which you would like to apply this policy.
- disabled boolean
- Specify if the rule is disable or not. Defaults to
false
- repo
Excluding string - For the repositories excluding.
- repo
Matching string - For the repositories matching.
- tag
Excluding string - For the tag excluding.
- tag
Matching string - For the tag matching.
- project_
id str - The project id of which you would like to apply this policy.
- disabled bool
- Specify if the rule is disable or not. Defaults to
false
- repo_
excluding str - For the repositories excluding.
- repo_
matching str - For the repositories matching.
- tag_
excluding str - For the tag excluding.
- tag_
matching str - For the tag matching.
- project
Id String - The project id of which you would like to apply this policy.
- disabled Boolean
- Specify if the rule is disable or not. Defaults to
false
- repo
Excluding String - For the repositories excluding.
- repo
Matching String - For the repositories matching.
- tag
Excluding String - For the tag excluding.
- tag
Matching 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.
- Disabled bool
- Specify if the rule is disable or not. Defaults to
false
- Project
Id string - The project id of which you would like to apply this policy.
- Repo
Excluding string - For the repositories excluding.
- Repo
Matching string - For the repositories matching.
- Tag
Excluding string - For the tag excluding.
- Tag
Matching string - For the tag matching.
- Disabled bool
- Specify if the rule is disable or not. Defaults to
false
- Project
Id string - The project id of which you would like to apply this policy.
- Repo
Excluding string - For the repositories excluding.
- Repo
Matching string - For the repositories matching.
- Tag
Excluding string - For the tag excluding.
- Tag
Matching string - For the tag matching.
- disabled Boolean
- Specify if the rule is disable or not. Defaults to
false
- project
Id String - The project id of which you would like to apply this policy.
- repo
Excluding String - For the repositories excluding.
- repo
Matching String - For the repositories matching.
- tag
Excluding String - For the tag excluding.
- tag
Matching String - For the tag matching.
- disabled boolean
- Specify if the rule is disable or not. Defaults to
false
- project
Id string - The project id of which you would like to apply this policy.
- repo
Excluding string - For the repositories excluding.
- repo
Matching string - For the repositories matching.
- tag
Excluding string - For the tag excluding.
- tag
Matching string - For the tag matching.
- disabled bool
- Specify if the rule is disable or not. Defaults to
false
- project_
id str - The project id of which you would like to apply this policy.
- repo_
excluding str - For the repositories excluding.
- repo_
matching str - For the repositories matching.
- tag_
excluding str - For the tag excluding.
- tag_
matching str - For the tag matching.
- disabled Boolean
- Specify if the rule is disable or not. Defaults to
false
- project
Id String - The project id of which you would like to apply this policy.
- repo
Excluding String - For the repositories excluding.
- repo
Matching String - For the repositories matching.
- tag
Excluding String - For the tag excluding.
- tag
Matching String - For the tag matching.
Import
$ pulumi import harbor:index/immutableTagRule:ImmutableTagRule main /projects/4/immutabletagrules/25
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.