Provides a CodeArtifact Domain Resource.
resource "aws_codeartifact_domain" "example" {
domain = "example"
}
This resource supports the following arguments:
domain
- (Required) The name of the domain to create. All domain names in an AWS Region that are in the same AWS account must be unique. The domain name is used as the prefix in DNS hostnames. Do not use sensitive information in a domain name because it is publicly discoverable.encryption_key
- (Optional) The encryption key for the domain. This is used to encrypt content stored in a domain. The KMS Key Amazon Resource Name (ARN). The default aws/codeartifact AWS KMS master key is used if this element is absent.tags
- (Optional) Key-value map of resource tags. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.This resource exports the following attributes in addition to the arguments above:
id
- The ARN of the Domain.arn
- The ARN of the Domain.owner
- The AWS account ID that owns the domain.repository_count
- The number of repositories in the domain.s3_bucket_arn
- The ARN of the Amazon S3 bucket that is used to store package assets in the domain.created_time
- A timestamp that represents the date and time the domain was created in RFC3339 format.asset_size_bytes
- The total size of all assets in the domain.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.In Terraform v1.5.0 and later, use an import
block to import CodeArtifact Domain using the CodeArtifact Domain arn. For example:
import {
to = aws_codeartifact_domain.example
id = "arn:aws:codeartifact:us-west-2:012345678912:domain/tf-acc-test-8593714120730241305"
}
Using terraform import
, import CodeArtifact Domain using the CodeArtifact Domain arn. For example:
% terraform import aws_codeartifact_domain.example arn:aws:codeartifact:us-west-2:012345678912:domain/tf-acc-test-8593714120730241305