AWS CodeArtifact Repository Permissions Policy

This page shows how to write Terraform and CloudFormation for CodeArtifact Repository Permissions Policy and write them securely.

aws_codeartifact_repository_permissions_policy (Terraform)

The Repository Permissions Policy in CodeArtifact can be configured in Terraform with the resource name aws_codeartifact_repository_permissions_policy. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_codeartifact_repository_permissions_policy" "maven_sizebay_repository_emmett_brown" {
  repository      = aws_codeartifact_repository.maven_sizebay_repository_sizebay_catalog_api_client.repository
  domain          = var.domain
  policy_document = <<EOF
    "Version": "2012-10-17",
resource "aws_codeartifact_repository_permissions_policy" "codeartifact_repository_permissions_policy" {
  count = var.enable_codeartifact_repository_permissions_policy ? 1 : 0

  repository      = var.codeartifact_repository_permissions_policy_repository != "" ? var.codeartifact_repository_permissions_policy_repository : (var.enable_codeartifact_repository ? aws_codeartifact_repository.codeartifact_repository[0].repository : null)
  domain          = var.codeartifact_repository_permissions_policy_domain != "" ? var.codeartifact_repository_permissions_policy_domain : (var.enable_codeartifact_domain ? aws_codeartifact_domain.codeartifact_domain[0].domain : null)
  policy_document = var.codeartifact_repository_permissions_policy_document

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Provides a CodeArtifact Repostory Permissions Policy Resource.

AWS::CodeArtifact::Repository (CloudFormation)

The Repository in CodeArtifact can be configured in CloudFormation with the resource name AWS::CodeArtifact::Repository. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

The AWS::CodeArtifact::Repository resource creates an AWS CodeArtifact repository. CodeArtifact repositories contain a set of package versions. For more information about repositories, see the Repository concepts information in the CodeArtifact User Guide. For more information about the CreateRepository API, see CreateRepository in the CodeArtifact API Reference.

Frequently asked questions

What is AWS CodeArtifact Repository Permissions Policy?

AWS CodeArtifact Repository Permissions Policy is a resource for CodeArtifact of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS CodeArtifact Repository Permissions Policy?

For Terraform, the sizebay/Sizebay-Catalog-API-Client and SebastianUA/terraform source code examples are useful. See the Terraform Example section for further details.