Terraform module that sends a docker image from Docker Hub to Amazon ECR using local-exec and null-resource.
You must have docker and bash installed because this module only executes it on your behalf.
resource "aws_ecr_repository" "this" {
name = "my-nginx-copy"
image_tag_mutability = "MUTABLE"
force_delete = true
}
module "this" {
source = "../../"
dockerhub_repository_name = "nginx"
dockerhub_repository_tag = "latest"
ecr_repository_url = aws_ecr_repository.this.repository_url
}
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 3 |
null | >= 3 |
Name | Version |
---|---|
aws | >= 3 |
null | >= 3 |
No modules.
Name | Type |
---|---|
null_resource.this | resource |
aws_region.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
dockerhub_repository_name | Docker Hub source repository name. | string |
n/a | yes |
dockerhub_repository_tag | Docker Hub source/destination repository tag. | string |
n/a | yes |
ecr_repository_url | ECR destination repository name. | string |
n/a | yes |
No outputs.
Docs made with terraform-docs!