1. Packages
  2. AWS
  3. API Docs
  4. ecr
  5. getRepositoryCreationTemplate
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.ecr.getRepositoryCreationTemplate

Explore with Pulumi AI

The ECR Repository Creation Template data source allows the template details to be retrieved for a Repository Creation Template.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.ecr.getRepositoryCreationTemplate({
    prefix: "example",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.ecr.get_repository_creation_template(prefix="example")
Copy
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.LookupRepositoryCreationTemplate(ctx, &ecr.LookupRepositoryCreationTemplateArgs{
			Prefix: "example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Ecr.GetRepositoryCreationTemplate.Invoke(new()
    {
        Prefix = "example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecr.EcrFunctions;
import com.pulumi.aws.ecr.inputs.GetRepositoryCreationTemplateArgs;
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) {
        final var example = EcrFunctions.getRepositoryCreationTemplate(GetRepositoryCreationTemplateArgs.builder()
            .prefix("example")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:ecr:getRepositoryCreationTemplate
      arguments:
        prefix: example
Copy

Using getRepositoryCreationTemplate

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getRepositoryCreationTemplate(args: GetRepositoryCreationTemplateArgs, opts?: InvokeOptions): Promise<GetRepositoryCreationTemplateResult>
function getRepositoryCreationTemplateOutput(args: GetRepositoryCreationTemplateOutputArgs, opts?: InvokeOptions): Output<GetRepositoryCreationTemplateResult>
Copy
def get_repository_creation_template(prefix: Optional[str] = None,
                                     resource_tags: Optional[Mapping[str, str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetRepositoryCreationTemplateResult
def get_repository_creation_template_output(prefix: Optional[pulumi.Input[str]] = None,
                                     resource_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryCreationTemplateResult]
Copy
func LookupRepositoryCreationTemplate(ctx *Context, args *LookupRepositoryCreationTemplateArgs, opts ...InvokeOption) (*LookupRepositoryCreationTemplateResult, error)
func LookupRepositoryCreationTemplateOutput(ctx *Context, args *LookupRepositoryCreationTemplateOutputArgs, opts ...InvokeOption) LookupRepositoryCreationTemplateResultOutput
Copy

> Note: This function is named LookupRepositoryCreationTemplate in the Go SDK.

public static class GetRepositoryCreationTemplate 
{
    public static Task<GetRepositoryCreationTemplateResult> InvokeAsync(GetRepositoryCreationTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryCreationTemplateResult> Invoke(GetRepositoryCreationTemplateInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRepositoryCreationTemplateResult> getRepositoryCreationTemplate(GetRepositoryCreationTemplateArgs args, InvokeOptions options)
public static Output<GetRepositoryCreationTemplateResult> getRepositoryCreationTemplate(GetRepositoryCreationTemplateArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:ecr/getRepositoryCreationTemplate:getRepositoryCreationTemplate
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Prefix
This property is required.
Changes to this property will trigger replacement.
string
The repository name prefix that the template matches against.
ResourceTags Dictionary<string, string>
A map of tags to assign to any created repositories.
Prefix
This property is required.
Changes to this property will trigger replacement.
string
The repository name prefix that the template matches against.
ResourceTags map[string]string
A map of tags to assign to any created repositories.
prefix
This property is required.
Changes to this property will trigger replacement.
String
The repository name prefix that the template matches against.
resourceTags Map<String,String>
A map of tags to assign to any created repositories.
prefix
This property is required.
Changes to this property will trigger replacement.
string
The repository name prefix that the template matches against.
resourceTags {[key: string]: string}
A map of tags to assign to any created repositories.
prefix
This property is required.
Changes to this property will trigger replacement.
str
The repository name prefix that the template matches against.
resource_tags Mapping[str, str]
A map of tags to assign to any created repositories.
prefix
This property is required.
Changes to this property will trigger replacement.
String
The repository name prefix that the template matches against.
resourceTags Map<String>
A map of tags to assign to any created repositories.

getRepositoryCreationTemplate Result

The following output properties are available:

AppliedFors List<string>
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
CustomRoleArn string
The ARN of the custom role used for repository creation.
Description string
The description for this template.
EncryptionConfigurations List<GetRepositoryCreationTemplateEncryptionConfiguration>
Encryption configuration for any created repositories. See Encryption Configuration below.
Id string
The provider-assigned unique ID for this managed resource.
ImageTagMutability string
The tag mutability setting for any created repositories.
LifecyclePolicy string
The lifecycle policy document to apply to any created repositories.
Prefix string
RegistryId string
The registry ID the repository creation template applies to.
RepositoryPolicy string
The registry policy document to apply to any created repositories.
ResourceTags Dictionary<string, string>
A map of tags to assign to any created repositories.
AppliedFors []string
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
CustomRoleArn string
The ARN of the custom role used for repository creation.
Description string
The description for this template.
EncryptionConfigurations []GetRepositoryCreationTemplateEncryptionConfiguration
Encryption configuration for any created repositories. See Encryption Configuration below.
Id string
The provider-assigned unique ID for this managed resource.
ImageTagMutability string
The tag mutability setting for any created repositories.
LifecyclePolicy string
The lifecycle policy document to apply to any created repositories.
Prefix string
RegistryId string
The registry ID the repository creation template applies to.
RepositoryPolicy string
The registry policy document to apply to any created repositories.
ResourceTags map[string]string
A map of tags to assign to any created repositories.
appliedFors List<String>
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
customRoleArn String
The ARN of the custom role used for repository creation.
description String
The description for this template.
encryptionConfigurations List<GetRepositoryCreationTemplateEncryptionConfiguration>
Encryption configuration for any created repositories. See Encryption Configuration below.
id String
The provider-assigned unique ID for this managed resource.
imageTagMutability String
The tag mutability setting for any created repositories.
lifecyclePolicy String
The lifecycle policy document to apply to any created repositories.
prefix String
registryId String
The registry ID the repository creation template applies to.
repositoryPolicy String
The registry policy document to apply to any created repositories.
resourceTags Map<String,String>
A map of tags to assign to any created repositories.
appliedFors string[]
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
customRoleArn string
The ARN of the custom role used for repository creation.
description string
The description for this template.
encryptionConfigurations GetRepositoryCreationTemplateEncryptionConfiguration[]
Encryption configuration for any created repositories. See Encryption Configuration below.
id string
The provider-assigned unique ID for this managed resource.
imageTagMutability string
The tag mutability setting for any created repositories.
lifecyclePolicy string
The lifecycle policy document to apply to any created repositories.
prefix string
registryId string
The registry ID the repository creation template applies to.
repositoryPolicy string
The registry policy document to apply to any created repositories.
resourceTags {[key: string]: string}
A map of tags to assign to any created repositories.
applied_fors Sequence[str]
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
custom_role_arn str
The ARN of the custom role used for repository creation.
description str
The description for this template.
encryption_configurations Sequence[GetRepositoryCreationTemplateEncryptionConfiguration]
Encryption configuration for any created repositories. See Encryption Configuration below.
id str
The provider-assigned unique ID for this managed resource.
image_tag_mutability str
The tag mutability setting for any created repositories.
lifecycle_policy str
The lifecycle policy document to apply to any created repositories.
prefix str
registry_id str
The registry ID the repository creation template applies to.
repository_policy str
The registry policy document to apply to any created repositories.
resource_tags Mapping[str, str]
A map of tags to assign to any created repositories.
appliedFors List<String>
Which features this template applies to. Contains one or more of PULL_THROUGH_CACHE or REPLICATION.
customRoleArn String
The ARN of the custom role used for repository creation.
description String
The description for this template.
encryptionConfigurations List<Property Map>
Encryption configuration for any created repositories. See Encryption Configuration below.
id String
The provider-assigned unique ID for this managed resource.
imageTagMutability String
The tag mutability setting for any created repositories.
lifecyclePolicy String
The lifecycle policy document to apply to any created repositories.
prefix String
registryId String
The registry ID the repository creation template applies to.
repositoryPolicy String
The registry policy document to apply to any created repositories.
resourceTags Map<String>
A map of tags to assign to any created repositories.

Supporting Types

GetRepositoryCreationTemplateEncryptionConfiguration

EncryptionType This property is required. string
Encryption type to use for any created repositories, either AES256 or KMS.
KmsKey This property is required. string
If encryption_type is KMS, the ARN of the KMS key used.
EncryptionType This property is required. string
Encryption type to use for any created repositories, either AES256 or KMS.
KmsKey This property is required. string
If encryption_type is KMS, the ARN of the KMS key used.
encryptionType This property is required. String
Encryption type to use for any created repositories, either AES256 or KMS.
kmsKey This property is required. String
If encryption_type is KMS, the ARN of the KMS key used.
encryptionType This property is required. string
Encryption type to use for any created repositories, either AES256 or KMS.
kmsKey This property is required. string
If encryption_type is KMS, the ARN of the KMS key used.
encryption_type This property is required. str
Encryption type to use for any created repositories, either AES256 or KMS.
kms_key This property is required. str
If encryption_type is KMS, the ARN of the KMS key used.
encryptionType This property is required. String
Encryption type to use for any created repositories, either AES256 or KMS.
kmsKey This property is required. String
If encryption_type is KMS, the ARN of the KMS key used.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.