harbor.Replication
Explore with Pulumi AI
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:
- Action string
- Registry
Id int - Deletion bool
- Description string
- Dest
Namespace string - Dest
Namespace intReplace - Enabled bool
- Filters
List<Pulumiverse.
Harbor. Inputs. Replication Filter> - Name string
- Override bool
- Schedule string
- Speed int
- Action string
- Registry
Id int - Deletion bool
- Description string
- Dest
Namespace string - Dest
Namespace intReplace - Enabled bool
- Filters
[]Replication
Filter Args - Name string
- Override bool
- Schedule string
- Speed int
- action String
- registry
Id Integer - deletion Boolean
- description String
- dest
Namespace String - dest
Namespace IntegerReplace - enabled Boolean
- filters
List<Replication
Filter> - name String
- override Boolean
- schedule String
- speed Integer
- action string
- registry
Id number - deletion boolean
- description string
- dest
Namespace string - dest
Namespace numberReplace - enabled boolean
- filters
Replication
Filter[] - name string
- override boolean
- schedule string
- speed number
- action str
- registry_
id int - deletion bool
- description str
- dest_
namespace str - dest_
namespace_ intreplace - enabled bool
- filters
Sequence[Replication
Filter Args] - name str
- override bool
- schedule str
- speed int
- action String
- registry
Id Number - deletion Boolean
- description String
- dest
Namespace String - dest
Namespace NumberReplace - enabled Boolean
- filters List<Property Map>
- name String
- override Boolean
- schedule String
- speed Number
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.
- Replication
Policy intId
- Id string
The provider-assigned unique ID for this managed resource.
- Replication
Policy intId
- id String
The provider-assigned unique ID for this managed resource.
- replication
Policy IntegerId
- id string
The provider-assigned unique ID for this managed resource.
- replication
Policy numberId
- id str
The provider-assigned unique ID for this managed resource.
- replication_
policy_ intid
- id String
The provider-assigned unique ID for this managed resource.
- replication
Policy NumberId
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.
- Action string
- Deletion bool
- Description string
- Dest
Namespace string - Dest
Namespace intReplace - Enabled bool
- Filters
List<Pulumiverse.
Harbor. Inputs. Replication Filter> - Name string
- Override bool
- Registry
Id int - Replication
Policy intId - Schedule string
- Speed int
- Action string
- Deletion bool
- Description string
- Dest
Namespace string - Dest
Namespace intReplace - Enabled bool
- Filters
[]Replication
Filter Args - Name string
- Override bool
- Registry
Id int - Replication
Policy intId - Schedule string
- Speed int
- action String
- deletion Boolean
- description String
- dest
Namespace String - dest
Namespace IntegerReplace - enabled Boolean
- filters
List<Replication
Filter> - name String
- override Boolean
- registry
Id Integer - replication
Policy IntegerId - schedule String
- speed Integer
- action string
- deletion boolean
- description string
- dest
Namespace string - dest
Namespace numberReplace - enabled boolean
- filters
Replication
Filter[] - name string
- override boolean
- registry
Id number - replication
Policy numberId - schedule string
- speed number
- action str
- deletion bool
- description str
- dest_
namespace str - dest_
namespace_ intreplace - enabled bool
- filters
Sequence[Replication
Filter Args] - name str
- override bool
- registry_
id int - replication_
policy_ intid - schedule str
- speed int
- action String
- deletion Boolean
- description String
- dest
Namespace String - dest
Namespace NumberReplace - enabled Boolean
- filters List<Property Map>
- name String
- override Boolean
- registry
Id Number - replication
Policy NumberId - schedule String
- speed Number
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.