1. Packages
  2. Harbor
  3. API Docs
  4. Replication
Harbor v3.10.4 published on Sunday, Oct 22, 2023 by Pulumiverse

harbor.Replication

Explore with Pulumi AI

harbor logo
Harbor v3.10.4 published on Sunday, Oct 22, 2023 by Pulumiverse

    Example Usage

    resource "harbor_registry" "main" {
      provider_name = "docker-hub"
      name          = "test_docker_harbor"
      endpoint_url  = "https://hub.docker.com"
    
    }
    
    
    resource "harbor_replication" "push" {
      name        = "test_push"
      action      = "push"
      registry_id = harbor_registry.main.registry_id
    }
    
    resource "harbor_replication" "alpine" {
      name        = "alpine"
      action      = "pull"
      registry_id = harbor_registry.main.registry_id
      schedule = "0 0/15 * * * *"
      filters {
        name = "library/alpine"
      }
      filters {
        tag = "3.*.*"
      }
      filters {
        resource = "artifact"
      }
      filters {
        labels = ["qa"]
      }
    }
    
    resource "harbor_replication" "alpine" {
      name        = "alpine"
      action      = "pull"
      registry_id = harbor_registry.main.registry_id
      schedule = "event_based"
      filters {
        name = "library/alpine"
      }
      filters {
        tag = "3.*.*"
      }
    }
    

    Create Replication Resource

    new Replication(name: string, args: ReplicationArgs, opts?: CustomResourceOptions);
    @overload
    def Replication(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    action: Optional[str] = None,
                    deletion: Optional[bool] = None,
                    description: Optional[str] = None,
                    dest_namespace: Optional[str] = None,
                    dest_namespace_replace: Optional[int] = None,
                    enabled: Optional[bool] = None,
                    filters: Optional[Sequence[ReplicationFilterArgs]] = None,
                    name: Optional[str] = None,
                    override: Optional[bool] = None,
                    registry_id: Optional[int] = None,
                    schedule: Optional[str] = None,
                    speed: Optional[int] = None)
    @overload
    def Replication(resource_name: str,
                    args: ReplicationArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewReplication(ctx *Context, name string, args ReplicationArgs, opts ...ResourceOption) (*Replication, error)
    public Replication(string name, ReplicationArgs args, CustomResourceOptions? opts = null)
    public Replication(String name, ReplicationArgs args)
    public Replication(String name, ReplicationArgs args, CustomResourceOptions options)
    
    type: harbor:Replication
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ReplicationArgs
    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 ReplicationArgs
    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 ReplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReplicationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Replication 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 Replication resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Replication resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    ReplicationPolicyId int
    Id string

    The provider-assigned unique ID for this managed resource.

    ReplicationPolicyId int
    id String

    The provider-assigned unique ID for this managed resource.

    replicationPolicyId Integer
    id string

    The provider-assigned unique ID for this managed resource.

    replicationPolicyId number
    id str

    The provider-assigned unique ID for this managed resource.

    replication_policy_id int
    id String

    The provider-assigned unique ID for this managed resource.

    replicationPolicyId Number

    Look up Existing Replication Resource

    Get an existing Replication 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?: ReplicationState, opts?: CustomResourceOptions): Replication
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            deletion: Optional[bool] = None,
            description: Optional[str] = None,
            dest_namespace: Optional[str] = None,
            dest_namespace_replace: Optional[int] = None,
            enabled: Optional[bool] = None,
            filters: Optional[Sequence[ReplicationFilterArgs]] = None,
            name: Optional[str] = None,
            override: Optional[bool] = None,
            registry_id: Optional[int] = None,
            replication_policy_id: Optional[int] = None,
            schedule: Optional[str] = None,
            speed: Optional[int] = None) -> Replication
    func GetReplication(ctx *Context, name string, id IDInput, state *ReplicationState, opts ...ResourceOption) (*Replication, error)
    public static Replication Get(string name, Input<string> id, ReplicationState? state, CustomResourceOptions? opts = null)
    public static Replication get(String name, Output<String> id, ReplicationState 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:

    Supporting Types

    ReplicationFilter, ReplicationFilterArgs

    Decoration string
    Labels List<string>
    Name string
    Resource string
    Tag string
    Decoration string
    Labels []string
    Name string
    Resource string
    Tag string
    decoration String
    labels List<String>
    name String
    resource String
    tag String
    decoration string
    labels string[]
    name string
    resource string
    tag string
    decoration str
    labels Sequence[str]
    name str
    resource str
    tag str
    decoration String
    labels List<String>
    name String
    resource String
    tag String

    Import

    Harbor project can be imported using the replication id eg, <break><break>```sh<break> $ pulumi import harbor:index/replication:Replication main /replication/policies/1 <break>```<break><break>

    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.4 published on Sunday, Oct 22, 2023 by Pulumiverse