We recommend new projects start with resources from the AWS provider.
aws-native.ecr.ReplicationConfiguration
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::ECR::ReplicationConfiguration resource creates or updates the replication configuration for a private registry. The first time a replication configuration is applied to a private registry, a service-linked IAM role is created in your account for the replication process. For more information, see Using Service-Linked Roles for Amazon ECR in the Amazon Elastic Container Registry User Guide.
When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a private registry permissions policy. For more information, see AWS::ECR::RegistryPolicy.
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() => 
{
    var myReplicationConfig = new AwsNative.Ecr.ReplicationConfiguration("myReplicationConfig", new()
    {
        ReplicationConfigurationValue = new AwsNative.Ecr.Inputs.ReplicationConfigurationArgs
        {
            Rules = new[]
            {
                new AwsNative.Ecr.Inputs.ReplicationConfigurationReplicationRuleArgs
                {
                    Destinations = new[]
                    {
                        new AwsNative.Ecr.Inputs.ReplicationConfigurationReplicationDestinationArgs
                        {
                            Region = "us-east-2",
                            RegistryId = "123456789012",
                        },
                        new AwsNative.Ecr.Inputs.ReplicationConfigurationReplicationDestinationArgs
                        {
                            Region = "us-west-1",
                            RegistryId = "123456789012",
                        },
                    },
                },
            },
        },
    });
});
package main
import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ecr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecr.NewReplicationConfiguration(ctx, "myReplicationConfig", &ecr.ReplicationConfigurationArgs{
			ReplicationConfiguration: &ecr.ReplicationConfigurationTypeArgs{
				Rules: ecr.ReplicationConfigurationReplicationRuleArray{
					&ecr.ReplicationConfigurationReplicationRuleArgs{
						Destinations: ecr.ReplicationConfigurationReplicationDestinationArray{
							&ecr.ReplicationConfigurationReplicationDestinationArgs{
								Region:     pulumi.String("us-east-2"),
								RegistryId: pulumi.String("123456789012"),
							},
							&ecr.ReplicationConfigurationReplicationDestinationArgs{
								Region:     pulumi.String("us-west-1"),
								RegistryId: pulumi.String("123456789012"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myReplicationConfig = new aws_native.ecr.ReplicationConfiguration("myReplicationConfig", {replicationConfiguration: {
    rules: [{
        destinations: [
            {
                region: "us-east-2",
                registryId: "123456789012",
            },
            {
                region: "us-west-1",
                registryId: "123456789012",
            },
        ],
    }],
}});
import pulumi
import pulumi_aws_native as aws_native
my_replication_config = aws_native.ecr.ReplicationConfiguration("myReplicationConfig", replication_configuration={
    "rules": [{
        "destinations": [
            {
                "region": "us-east-2",
                "registry_id": "123456789012",
            },
            {
                "region": "us-west-1",
                "registry_id": "123456789012",
            },
        ],
    }],
})
Coming soon!
Create ReplicationConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ReplicationConfiguration(name: string, args: ReplicationConfigurationArgs, opts?: CustomResourceOptions);@overload
def ReplicationConfiguration(resource_name: str,
                             args: ReplicationConfigurationInitArgs,
                             opts: Optional[ResourceOptions] = None)
@overload
def ReplicationConfiguration(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             replication_configuration: Optional[ReplicationConfigurationArgs] = None)func NewReplicationConfiguration(ctx *Context, name string, args ReplicationConfigurationArgs, opts ...ResourceOption) (*ReplicationConfiguration, error)public ReplicationConfiguration(string name, ReplicationConfigurationArgs args, CustomResourceOptions? opts = null)
public ReplicationConfiguration(String name, ReplicationConfigurationArgs args)
public ReplicationConfiguration(String name, ReplicationConfigurationArgs args, CustomResourceOptions options)
type: aws-native:ecr:ReplicationConfiguration
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 ReplicationConfigurationArgs
- 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 ReplicationConfigurationInitArgs
- 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 ReplicationConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReplicationConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReplicationConfigurationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ReplicationConfiguration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ReplicationConfiguration resource accepts the following input properties:
- ReplicationConfiguration Pulumi.Value Aws Native. Ecr. Inputs. Replication Configuration 
- The replication configuration for a registry.
- ReplicationConfiguration ReplicationConfiguration Type Args 
- The replication configuration for a registry.
- replicationConfiguration ReplicationConfiguration 
- The replication configuration for a registry.
- replicationConfiguration ReplicationConfiguration 
- The replication configuration for a registry.
- replication_configuration ReplicationConfiguration Args 
- The replication configuration for a registry.
- replicationConfiguration Property Map
- The replication configuration for a registry.
Outputs
All input properties are implicitly available as output properties. Additionally, the ReplicationConfiguration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- RegistryId string
- The account ID of the destination registry.
- Id string
- The provider-assigned unique ID for this managed resource.
- RegistryId string
- The account ID of the destination registry.
- id String
- The provider-assigned unique ID for this managed resource.
- registryId String
- The account ID of the destination registry.
- id string
- The provider-assigned unique ID for this managed resource.
- registryId string
- The account ID of the destination registry.
- id str
- The provider-assigned unique ID for this managed resource.
- registry_id str
- The account ID of the destination registry.
- id String
- The provider-assigned unique ID for this managed resource.
- registryId String
- The account ID of the destination registry.
Supporting Types
ReplicationConfiguration, ReplicationConfigurationArgs    
- Rules
List<Pulumi.Aws Native. Ecr. Inputs. Replication Configuration Replication Rule> 
- An array of objects representing the replication destinations and repository filters for a replication configuration.
- Rules
[]ReplicationConfiguration Replication Rule 
- An array of objects representing the replication destinations and repository filters for a replication configuration.
- rules
List<ReplicationConfiguration Replication Rule> 
- An array of objects representing the replication destinations and repository filters for a replication configuration.
- rules
ReplicationConfiguration Replication Rule[] 
- An array of objects representing the replication destinations and repository filters for a replication configuration.
- rules
Sequence[ReplicationConfiguration Replication Rule] 
- An array of objects representing the replication destinations and repository filters for a replication configuration.
- rules List<Property Map>
- An array of objects representing the replication destinations and repository filters for a replication configuration.
ReplicationConfigurationFilterType, ReplicationConfigurationFilterTypeArgs        
- PrefixMatch 
- PREFIX_MATCH
- ReplicationConfiguration Filter Type Prefix Match 
- PREFIX_MATCH
- PrefixMatch 
- PREFIX_MATCH
- PrefixMatch 
- PREFIX_MATCH
- PREFIX_MATCH
- PREFIX_MATCH
- "PREFIX_MATCH"
- PREFIX_MATCH
ReplicationConfigurationReplicationDestination, ReplicationConfigurationReplicationDestinationArgs        
- Region string
- The Region to replicate to.
- RegistryId string
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
- Region string
- The Region to replicate to.
- RegistryId string
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
- region String
- The Region to replicate to.
- registryId String
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
- region string
- The Region to replicate to.
- registryId string
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
- region str
- The Region to replicate to.
- registry_id str
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
- region String
- The Region to replicate to.
- registryId String
- The AWS account ID of the Amazon ECR private registry to replicate to. When configuring cross-Region replication within your own registry, specify your own account ID.
ReplicationConfigurationReplicationRule, ReplicationConfigurationReplicationRuleArgs        
- Destinations
List<Pulumi.Aws Native. Ecr. Inputs. Replication Configuration Replication Destination> 
- An array of objects representing the destination for a replication rule.
- RepositoryFilters List<Pulumi.Aws Native. Ecr. Inputs. Replication Configuration Repository Filter> 
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
- Destinations
[]ReplicationConfiguration Replication Destination 
- An array of objects representing the destination for a replication rule.
- RepositoryFilters []ReplicationConfiguration Repository Filter 
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
- destinations
List<ReplicationConfiguration Replication Destination> 
- An array of objects representing the destination for a replication rule.
- repositoryFilters List<ReplicationConfiguration Repository Filter> 
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
- destinations
ReplicationConfiguration Replication Destination[] 
- An array of objects representing the destination for a replication rule.
- repositoryFilters ReplicationConfiguration Repository Filter[] 
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
- destinations
Sequence[ReplicationConfiguration Replication Destination] 
- An array of objects representing the destination for a replication rule.
- repository_filters Sequence[ReplicationConfiguration Repository Filter] 
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
- destinations List<Property Map>
- An array of objects representing the destination for a replication rule.
- repositoryFilters List<Property Map>
- An array of objects representing the filters for a replication rule. Specifying a repository filter for a replication rule provides a method for controlling which repositories in a private registry are replicated.
ReplicationConfigurationRepositoryFilter, ReplicationConfigurationRepositoryFilterArgs        
- Filter string
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- FilterType Pulumi.Aws Native. Ecr. Replication Configuration Filter Type 
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
- Filter string
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- FilterType ReplicationConfiguration Filter Type 
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
- filter String
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- filterType ReplicationConfiguration Filter Type 
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
- filter string
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- filterType ReplicationConfiguration Filter Type 
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
- filter str
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- filter_type ReplicationConfiguration Filter Type 
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
- filter String
- The repository filter details. When the PREFIX_MATCHfilter type is specified, this value is required and should be the repository name prefix to configure replication for.
- filterType "PREFIX_MATCH"
- The repository filter type. The only supported value is PREFIX_MATCH, which is a repository name prefix specified with thefilterparameter.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.