harbor.ImmutableTagRule
Explore with Pulumi AI
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:
- Project
Id string - Disabled bool
Specify if the rule is disable or not. Defaults to
false
- Repo
Excluding string For the repositories excuding.
- Repo
Matching string For the repositories matching.
- Tag
Excluding string For the tag excuding.
- Tag
Matching string For the tag matching.
- Project
Id string - Disabled bool
Specify if the rule is disable or not. Defaults to
false
- Repo
Excluding string For the repositories excuding.
- Repo
Matching string For the repositories matching.
- Tag
Excluding string For the tag excuding.
- Tag
Matching string For the tag matching.
- project
Id String - disabled Boolean
Specify if the rule is disable or not. Defaults to
false
- repo
Excluding String For the repositories excuding.
- repo
Matching String For the repositories matching.
- tag
Excluding String For the tag excuding.
- tag
Matching String For the tag matching.
- project
Id string - disabled boolean
Specify if the rule is disable or not. Defaults to
false
- repo
Excluding string For the repositories excuding.
- repo
Matching string For the repositories matching.
- tag
Excluding string For the tag excuding.
- tag
Matching 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.
- project
Id String - disabled Boolean
Specify if the rule is disable or not. Defaults to
false
- repo
Excluding String For the repositories excuding.
- repo
Matching String For the repositories matching.
- tag
Excluding String For the tag excuding.
- 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 - Repo
Excluding string For the repositories excuding.
- Repo
Matching string For the repositories matching.
- Tag
Excluding string For the tag excuding.
- Tag
Matching string For the tag matching.
- Disabled bool
Specify if the rule is disable or not. Defaults to
false
- Project
Id string - Repo
Excluding string For the repositories excuding.
- Repo
Matching string For the repositories matching.
- Tag
Excluding string For the tag excuding.
- Tag
Matching string For the tag matching.
- disabled Boolean
Specify if the rule is disable or not. Defaults to
false
- project
Id String - repo
Excluding String For the repositories excuding.
- repo
Matching String For the repositories matching.
- tag
Excluding String For the tag excuding.
- tag
Matching String For the tag matching.
- disabled boolean
Specify if the rule is disable or not. Defaults to
false
- project
Id string - repo
Excluding string For the repositories excuding.
- repo
Matching string For the repositories matching.
- tag
Excluding string For the tag excuding.
- tag
Matching 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
- project
Id String - repo
Excluding String For the repositories excuding.
- repo
Matching String For the repositories matching.
- tag
Excluding String For the tag excuding.
- tag
Matching 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.