Skip to content

Commit

Permalink
fix: Updates variables.tf and Readme.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
13archit committed Aug 11, 2023
1 parent ef0f884 commit f0c0330
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 36 deletions.
51 changes: 35 additions & 16 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ github_repo: clouddrove/terraform-aws-ecr

# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-aws-subnet.svg"
url: "https://github.com/clouddrove/terraform-aws-subnet/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-subnet/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-subnet/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-ecr/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-ecr/actions/workflows/tfsec.yml"
- name: "static-checks"
image: "https://github.com/clouddrove/terraform-aws-ecr/actions/workflows/terraform.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-ecr/actions/workflows/terraform.yml"

prerequesties:
- name: Terraform 1.5.4
url: https://learn.hashicorp.com/terraform/getting-started/install.html
# description of this project
description: |-
This terraform module is used to create ECR on AWS.
Expand All @@ -38,14 +38,33 @@ include:

# How to use this project
usage : |-
### Simple Example
Here is an example of how you can use this module in your inventory structure:
Here are examples of how you can use this module in your inventory structure:
### Private ECR
```hcl
module "ecr" {
source = "clouddrove/ecr/aws"
version = "1.3.0"
name = "ecr"
module "privat_-ecr" {
source = "clouddrove/ecr/aws"
version = "1.3.0"
enable_private_ecr = true
name = "private-ecr"
environment = "test"
scan_on_push = true
image_tag_mutability = "MUTABLE"
max_image_count = 7
}
```
### Public ECR
```hcl
module "public_ecr" {
source = "clouddrove/ecr/aws"
version = "1.3.0"
enable_public_ecr = true
name = "public-ecr"
environment = "test"
max_untagged_image_count = 1
max_image_count = 7
public_repository_catalog_data = {
description = "Docker container for some things"
operating_systems = ["Linux"]
architectures = ["x86"]
}
}
```
16 changes: 6 additions & 10 deletions _example/private_ecr/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ provider "aws" {
}

module "private_ecr" {
source = "./../../"

enable_private_ecr = true
name = "private-ecr"
environment = "test"
label_order = ["environment", "name"]
scan_on_push = true
max_image_count = 7
image_tag_mutability = "IMMUTABLE"
encryption_type = "KMS"
source = "./../../"
enable_private_ecr = true
name = "private-ecr"
environment = "test"
scan_on_push = true
max_image_count = 7
}
12 changes: 4 additions & 8 deletions _example/public_ecr/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ provider "aws" {


module "public_ecr" {
source = "./../../"

enable_public_ecr = true
name = "public-ecr"
environment = "test"
label_order = ["environment", "name"]

source = "./../../"
enable_public_ecr = true
name = "public-ecr"
environment = "test"
max_untagged_image_count = 1
max_image_count = 7

public_repository_catalog_data = {
description = "Docker container for some things"
operating_systems = ["Linux"]
Expand Down
5 changes: 3 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ variable "environment" {

variable "label_order" {
type = list(any)
default = []
default = ["name", "environment"]
description = "Label order, e.g. `name`,`application`."
}

Expand Down Expand Up @@ -105,9 +105,10 @@ variable "repository_force_delete" {

variable "encryption_type" {
type = string
default = null
default = "KMS"
description = "The encryption type for the repository. Must be one of: `KMS` or `AES256`. Defaults to `AES256`"
}

variable "kms_key" {
type = string
default = null
Expand Down

0 comments on commit f0c0330

Please sign in to comment.