Pull Through Cache Rule
Provides an Elastic Container Registry Pull Through Cache Rule. More information about pull through cache rules, including the set of supported upstream repositories, see Using pull through cache rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecr.PullThroughCacheRule("example", {
ecrRepositoryPrefix: "ecr-public",
upstreamRegistryUrl: "public.ecr.aws",
credentialArn: "arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.ecr.PullThroughCacheRule("example",
ecr_repository_prefix="ecr-public",
upstream_registry_url="public.ecr.aws",
credential_arn="arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ecr.PullThroughCacheRule("example", new()
{
EcrRepositoryPrefix = "ecr-public",
UpstreamRegistryUrl = "public.ecr.aws",
CredentialArn = "arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecr.NewPullThroughCacheRule(ctx, "example", &ecr.PullThroughCacheRuleArgs{
EcrRepositoryPrefix: pulumi.String("ecr-public"),
UpstreamRegistryUrl: pulumi.String("public.ecr.aws"),
CredentialArn: pulumi.String("arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecr.PullThroughCacheRule;
import com.pulumi.aws.ecr.PullThroughCacheRuleArgs;
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 example = new PullThroughCacheRule("example", PullThroughCacheRuleArgs.builder()
.ecrRepositoryPrefix("ecr-public")
.upstreamRegistryUrl("public.ecr.aws")
.credentialArn("arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic")
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:ecr:PullThroughCacheRule
properties:
ecrRepositoryPrefix: ecr-public
upstreamRegistryUrl: public.ecr.aws
credentialArn: arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic
Content copied to clipboard
Import
Using pulumi import
, import a pull-through cache rule using the ecr_repository_prefix
. For example:
$ pulumi import aws:ecr/pullThroughCacheRule:PullThroughCacheRule example ecr-public
Content copied to clipboard
Properties
Link copied to clipboard
ARN of the Secret which will be used to authenticate against the registry.
Link copied to clipboard
The repository name prefix to use when caching images from the source registry.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The registry ID where the repository was created.
Link copied to clipboard
The registry URL of the upstream public registry to use as the source.