artifactory.ReplicationConfig
Explore with Pulumi AI
This resource is deprecated in favor of
artifactory.PushReplication
resource.
Provides an Artifactory replication config resource. This can be used to create and manage Artifactory replications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
// Create a replication between two artifactory local repositories
const providerTestSource = new artifactory.LocalMavenRepository("provider_test_source", {key: "provider_test_source"});
const providerTestDest = new artifactory.LocalMavenRepository("provider_test_dest", {key: "provider_test_dest"});
const foo_rep = new artifactory.ReplicationConfig("foo-rep", {
repoKey: providerTestSource.key,
cronExp: "0 0 * * * ?",
enableEventReplication: true,
replications: [{
url: "$var.artifactory_url",
username: "$var.artifactory_username",
password: "$var.artifactory_password",
}],
});
import pulumi
import pulumi_artifactory as artifactory
# Create a replication between two artifactory local repositories
provider_test_source = artifactory.LocalMavenRepository("provider_test_source", key="provider_test_source")
provider_test_dest = artifactory.LocalMavenRepository("provider_test_dest", key="provider_test_dest")
foo_rep = artifactory.ReplicationConfig("foo-rep",
repo_key=provider_test_source.key,
cron_exp="0 0 * * * ?",
enable_event_replication=True,
replications=[artifactory.ReplicationConfigReplicationArgs(
url="$var.artifactory_url",
username="$var.artifactory_username",
password="$var.artifactory_password",
)])
package main
import (
"github.com/pulumi/pulumi-artifactory/sdk/v6/go/artifactory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a replication between two artifactory local repositories
providerTestSource, err := artifactory.NewLocalMavenRepository(ctx, "provider_test_source", &artifactory.LocalMavenRepositoryArgs{
Key: pulumi.String("provider_test_source"),
})
if err != nil {
return err
}
_, err = artifactory.NewLocalMavenRepository(ctx, "provider_test_dest", &artifactory.LocalMavenRepositoryArgs{
Key: pulumi.String("provider_test_dest"),
})
if err != nil {
return err
}
_, err = artifactory.NewReplicationConfig(ctx, "foo-rep", &artifactory.ReplicationConfigArgs{
RepoKey: providerTestSource.Key,
CronExp: pulumi.String("0 0 * * * ?"),
EnableEventReplication: pulumi.Bool(true),
Replications: artifactory.ReplicationConfigReplicationArray{
&artifactory.ReplicationConfigReplicationArgs{
Url: pulumi.String("$var.artifactory_url"),
Username: pulumi.String("$var.artifactory_username"),
Password: pulumi.String("$var.artifactory_password"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
return await Deployment.RunAsync(() =>
{
// Create a replication between two artifactory local repositories
var providerTestSource = new Artifactory.LocalMavenRepository("provider_test_source", new()
{
Key = "provider_test_source",
});
var providerTestDest = new Artifactory.LocalMavenRepository("provider_test_dest", new()
{
Key = "provider_test_dest",
});
var foo_rep = new Artifactory.ReplicationConfig("foo-rep", new()
{
RepoKey = providerTestSource.Key,
CronExp = "0 0 * * * ?",
EnableEventReplication = true,
Replications = new[]
{
new Artifactory.Inputs.ReplicationConfigReplicationArgs
{
Url = "$var.artifactory_url",
Username = "$var.artifactory_username",
Password = "$var.artifactory_password",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.LocalMavenRepository;
import com.pulumi.artifactory.LocalMavenRepositoryArgs;
import com.pulumi.artifactory.ReplicationConfig;
import com.pulumi.artifactory.ReplicationConfigArgs;
import com.pulumi.artifactory.inputs.ReplicationConfigReplicationArgs;
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) {
// Create a replication between two artifactory local repositories
var providerTestSource = new LocalMavenRepository("providerTestSource", LocalMavenRepositoryArgs.builder()
.key("provider_test_source")
.build());
var providerTestDest = new LocalMavenRepository("providerTestDest", LocalMavenRepositoryArgs.builder()
.key("provider_test_dest")
.build());
var foo_rep = new ReplicationConfig("foo-rep", ReplicationConfigArgs.builder()
.repoKey(providerTestSource.key())
.cronExp("0 0 * * * ?")
.enableEventReplication(true)
.replications(ReplicationConfigReplicationArgs.builder()
.url("$var.artifactory_url")
.username("$var.artifactory_username")
.password("$var.artifactory_password")
.build())
.build());
}
}
resources:
# Create a replication between two artifactory local repositories
providerTestSource:
type: artifactory:LocalMavenRepository
name: provider_test_source
properties:
key: provider_test_source
providerTestDest:
type: artifactory:LocalMavenRepository
name: provider_test_dest
properties:
key: provider_test_dest
foo-rep:
type: artifactory:ReplicationConfig
properties:
repoKey: ${providerTestSource.key}
cronExp: 0 0 * * * ?
enableEventReplication: true
replications:
- url: $var.artifactory_url
username: $var.artifactory_username
password: $var.artifactory_password
Create ReplicationConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ReplicationConfig(name: string, args: ReplicationConfigArgs, opts?: CustomResourceOptions);
@overload
def ReplicationConfig(resource_name: str,
args: ReplicationConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ReplicationConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
cron_exp: Optional[str] = None,
repo_key: Optional[str] = None,
enable_event_replication: Optional[bool] = None,
replications: Optional[Sequence[ReplicationConfigReplicationArgs]] = None)
func NewReplicationConfig(ctx *Context, name string, args ReplicationConfigArgs, opts ...ResourceOption) (*ReplicationConfig, error)
public ReplicationConfig(string name, ReplicationConfigArgs args, CustomResourceOptions? opts = null)
public ReplicationConfig(String name, ReplicationConfigArgs args)
public ReplicationConfig(String name, ReplicationConfigArgs args, CustomResourceOptions options)
type: artifactory:ReplicationConfig
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 ReplicationConfigArgs
- 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 ReplicationConfigArgs
- 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 ReplicationConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReplicationConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReplicationConfigArgs
- 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 replicationConfigResource = new Artifactory.ReplicationConfig("replicationConfigResource", new()
{
CronExp = "string",
RepoKey = "string",
EnableEventReplication = false,
Replications = new[]
{
new Artifactory.Inputs.ReplicationConfigReplicationArgs
{
Enabled = false,
Password = "string",
PathPrefix = "string",
Proxy = "string",
SocketTimeoutMillis = 0,
SyncDeletes = false,
SyncProperties = false,
SyncStatistics = false,
Url = "string",
Username = "string",
},
},
});
example, err := artifactory.NewReplicationConfig(ctx, "replicationConfigResource", &artifactory.ReplicationConfigArgs{
CronExp: pulumi.String("string"),
RepoKey: pulumi.String("string"),
EnableEventReplication: pulumi.Bool(false),
Replications: artifactory.ReplicationConfigReplicationArray{
&artifactory.ReplicationConfigReplicationArgs{
Enabled: pulumi.Bool(false),
Password: pulumi.String("string"),
PathPrefix: pulumi.String("string"),
Proxy: pulumi.String("string"),
SocketTimeoutMillis: pulumi.Int(0),
SyncDeletes: pulumi.Bool(false),
SyncProperties: pulumi.Bool(false),
SyncStatistics: pulumi.Bool(false),
Url: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
})
var replicationConfigResource = new ReplicationConfig("replicationConfigResource", ReplicationConfigArgs.builder()
.cronExp("string")
.repoKey("string")
.enableEventReplication(false)
.replications(ReplicationConfigReplicationArgs.builder()
.enabled(false)
.password("string")
.pathPrefix("string")
.proxy("string")
.socketTimeoutMillis(0)
.syncDeletes(false)
.syncProperties(false)
.syncStatistics(false)
.url("string")
.username("string")
.build())
.build());
replication_config_resource = artifactory.ReplicationConfig("replicationConfigResource",
cron_exp="string",
repo_key="string",
enable_event_replication=False,
replications=[artifactory.ReplicationConfigReplicationArgs(
enabled=False,
password="string",
path_prefix="string",
proxy="string",
socket_timeout_millis=0,
sync_deletes=False,
sync_properties=False,
sync_statistics=False,
url="string",
username="string",
)])
const replicationConfigResource = new artifactory.ReplicationConfig("replicationConfigResource", {
cronExp: "string",
repoKey: "string",
enableEventReplication: false,
replications: [{
enabled: false,
password: "string",
pathPrefix: "string",
proxy: "string",
socketTimeoutMillis: 0,
syncDeletes: false,
syncProperties: false,
syncStatistics: false,
url: "string",
username: "string",
}],
});
type: artifactory:ReplicationConfig
properties:
cronExp: string
enableEventReplication: false
replications:
- enabled: false
password: string
pathPrefix: string
proxy: string
socketTimeoutMillis: 0
syncDeletes: false
syncProperties: false
syncStatistics: false
url: string
username: string
repoKey: string
ReplicationConfig 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 ReplicationConfig resource accepts the following input properties:
- Cron
Exp string - Cron expression to control the operation frequency.
- Repo
Key string - Enable
Event boolReplication - Replications
List<Replication
Config Replication>
- Cron
Exp string - Cron expression to control the operation frequency.
- Repo
Key string - Enable
Event boolReplication - Replications
[]Replication
Config Replication Args
- cron
Exp String - Cron expression to control the operation frequency.
- repo
Key String - enable
Event BooleanReplication - replications
List<Replication
Config Replication>
- cron
Exp string - Cron expression to control the operation frequency.
- repo
Key string - enable
Event booleanReplication - replications
Replication
Config Replication[]
- cron_
exp str - Cron expression to control the operation frequency.
- repo_
key str - enable_
event_ boolreplication - replications
Sequence[Replication
Config Replication Args]
- cron
Exp String - Cron expression to control the operation frequency.
- repo
Key String - enable
Event BooleanReplication - replications List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the ReplicationConfig 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 ReplicationConfig Resource
Get an existing ReplicationConfig 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?: ReplicationConfigState, opts?: CustomResourceOptions): ReplicationConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cron_exp: Optional[str] = None,
enable_event_replication: Optional[bool] = None,
replications: Optional[Sequence[ReplicationConfigReplicationArgs]] = None,
repo_key: Optional[str] = None) -> ReplicationConfig
func GetReplicationConfig(ctx *Context, name string, id IDInput, state *ReplicationConfigState, opts ...ResourceOption) (*ReplicationConfig, error)
public static ReplicationConfig Get(string name, Input<string> id, ReplicationConfigState? state, CustomResourceOptions? opts = null)
public static ReplicationConfig get(String name, Output<String> id, ReplicationConfigState 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.
- Cron
Exp string - Cron expression to control the operation frequency.
- Enable
Event boolReplication - Replications
List<Replication
Config Replication> - Repo
Key string
- Cron
Exp string - Cron expression to control the operation frequency.
- Enable
Event boolReplication - Replications
[]Replication
Config Replication Args - Repo
Key string
- cron
Exp String - Cron expression to control the operation frequency.
- enable
Event BooleanReplication - replications
List<Replication
Config Replication> - repo
Key String
- cron
Exp string - Cron expression to control the operation frequency.
- enable
Event booleanReplication - replications
Replication
Config Replication[] - repo
Key string
- cron_
exp str - Cron expression to control the operation frequency.
- enable_
event_ boolreplication - replications
Sequence[Replication
Config Replication Args] - repo_
key str
- cron
Exp String - Cron expression to control the operation frequency.
- enable
Event BooleanReplication - replications List<Property Map>
- repo
Key String
Supporting Types
ReplicationConfigReplication, ReplicationConfigReplicationArgs
- Enabled bool
- Password string
- Requires password encryption to be turned off
POST /api/system/decrypt
. - Path
Prefix string - Proxy string
- Proxy key from Artifactory Proxies setting
- Socket
Timeout intMillis - Sync
Deletes bool - Sync
Properties bool - Sync
Statistics bool - Url string
- Username string
- Enabled bool
- Password string
- Requires password encryption to be turned off
POST /api/system/decrypt
. - Path
Prefix string - Proxy string
- Proxy key from Artifactory Proxies setting
- Socket
Timeout intMillis - Sync
Deletes bool - Sync
Properties bool - Sync
Statistics bool - Url string
- Username string
- enabled Boolean
- password String
- Requires password encryption to be turned off
POST /api/system/decrypt
. - path
Prefix String - proxy String
- Proxy key from Artifactory Proxies setting
- socket
Timeout IntegerMillis - sync
Deletes Boolean - sync
Properties Boolean - sync
Statistics Boolean - url String
- username String
- enabled boolean
- password string
- Requires password encryption to be turned off
POST /api/system/decrypt
. - path
Prefix string - proxy string
- Proxy key from Artifactory Proxies setting
- socket
Timeout numberMillis - sync
Deletes boolean - sync
Properties boolean - sync
Statistics boolean - url string
- username string
- enabled bool
- password str
- Requires password encryption to be turned off
POST /api/system/decrypt
. - path_
prefix str - proxy str
- Proxy key from Artifactory Proxies setting
- socket_
timeout_ intmillis - sync_
deletes bool - sync_
properties bool - sync_
statistics bool - url str
- username str
- enabled Boolean
- password String
- Requires password encryption to be turned off
POST /api/system/decrypt
. - path
Prefix String - proxy String
- Proxy key from Artifactory Proxies setting
- socket
Timeout NumberMillis - sync
Deletes Boolean - sync
Properties Boolean - sync
Statistics Boolean - url String
- username String
Import
Replication configs can be imported using their repo key, e.g.
$ pulumi import artifactory:index/replicationConfig:ReplicationConfig foo-rep provider_test_source
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
artifactory
Terraform Provider.