AWS v6.73.0 published on Wednesday, Mar 19, 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",
});
import pulumi
import pulumi_aws as aws
example = aws.ecr.get_repository_creation_template(prefix="example")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:ecr:getRepositoryCreationTemplate
      arguments:
        prefix: example
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>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]func LookupRepositoryCreationTemplate(ctx *Context, args *LookupRepositoryCreationTemplateArgs, opts ...InvokeOption) (*LookupRepositoryCreationTemplateResult, error)
func LookupRepositoryCreationTemplateOutput(ctx *Context, args *LookupRepositoryCreationTemplateOutputArgs, opts ...InvokeOption) LookupRepositoryCreationTemplateResultOutput> 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)
}public static CompletableFuture<GetRepositoryCreationTemplateResult> getRepositoryCreationTemplate(GetRepositoryCreationTemplateArgs args, InvokeOptions options)
public static Output<GetRepositoryCreationTemplateResult> getRepositoryCreationTemplate(GetRepositoryCreationTemplateArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ecr/getRepositoryCreationTemplate:getRepositoryCreationTemplate
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Prefix string
- The repository name prefix that the template matches against.
- Dictionary<string, string>
- A map of tags to assign to any created repositories.
- Prefix string
- The repository name prefix that the template matches against.
- map[string]string
- A map of tags to assign to any created repositories.
- prefix String
- The repository name prefix that the template matches against.
- Map<String,String>
- A map of tags to assign to any created repositories.
- prefix string
- The repository name prefix that the template matches against.
- {[key: string]: string}
- A map of tags to assign to any created repositories.
- prefix str
- The repository name prefix that the template matches against.
- Mapping[str, str]
- A map of tags to assign to any created repositories.
- prefix String
- The repository name prefix that the template matches against.
- 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_CACHEorREPLICATION.
- CustomRole stringArn 
- The ARN of the custom role used for repository creation.
- Description string
- The description for this template.
- EncryptionConfigurations List<GetRepository Creation Template Encryption Configuration> 
- Encryption configuration for any created repositories. See Encryption Configuration below.
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageTag stringMutability 
- 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.
- 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_CACHEorREPLICATION.
- CustomRole stringArn 
- The ARN of the custom role used for repository creation.
- Description string
- The description for this template.
- EncryptionConfigurations []GetRepository Creation Template Encryption Configuration 
- Encryption configuration for any created repositories. See Encryption Configuration below.
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageTag stringMutability 
- 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.
- 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_CACHEorREPLICATION.
- customRole StringArn 
- The ARN of the custom role used for repository creation.
- description String
- The description for this template.
- encryptionConfigurations List<GetRepository Creation Template Encryption Configuration> 
- Encryption configuration for any created repositories. See Encryption Configuration below.
- id String
- The provider-assigned unique ID for this managed resource.
- imageTag StringMutability 
- 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.
- 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_CACHEorREPLICATION.
- customRole stringArn 
- The ARN of the custom role used for repository creation.
- description string
- The description for this template.
- encryptionConfigurations GetRepository Creation Template Encryption Configuration[] 
- Encryption configuration for any created repositories. See Encryption Configuration below.
- id string
- The provider-assigned unique ID for this managed resource.
- imageTag stringMutability 
- 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.
- {[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_CACHEorREPLICATION.
- custom_role_ strarn 
- The ARN of the custom role used for repository creation.
- description str
- The description for this template.
- encryption_configurations Sequence[GetRepository Creation Template Encryption Configuration] 
- Encryption configuration for any created repositories. See Encryption Configuration below.
- id str
- The provider-assigned unique ID for this managed resource.
- image_tag_ strmutability 
- 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.
- 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_CACHEorREPLICATION.
- customRole StringArn 
- 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.
- imageTag StringMutability 
- 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.
- Map<String>
- A map of tags to assign to any created repositories.
Supporting Types
GetRepositoryCreationTemplateEncryptionConfiguration     
- EncryptionType string
- Encryption type to use for any created repositories, either AES256orKMS.
- KmsKey string
- If encryption_typeisKMS, the ARN of the KMS key used.
- EncryptionType string
- Encryption type to use for any created repositories, either AES256orKMS.
- KmsKey string
- If encryption_typeisKMS, the ARN of the KMS key used.
- encryptionType String
- Encryption type to use for any created repositories, either AES256orKMS.
- kmsKey String
- If encryption_typeisKMS, the ARN of the KMS key used.
- encryptionType string
- Encryption type to use for any created repositories, either AES256orKMS.
- kmsKey string
- If encryption_typeisKMS, the ARN of the KMS key used.
- encryption_type str
- Encryption type to use for any created repositories, either AES256orKMS.
- kms_key str
- If encryption_typeisKMS, the ARN of the KMS key used.
- encryptionType String
- Encryption type to use for any created repositories, either AES256orKMS.
- kmsKey String
- If encryption_typeisKMS, 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 awsTerraform Provider.