From b6addb79541321af265c6d171d35d369c082482c Mon Sep 17 00:00:00 2001 From: badra001 Date: Wed, 3 Jul 2024 14:52:25 -0400 Subject: [PATCH] fix docs --- README.md | 7 +++---- main.tf | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 42e7773..29f7632 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,6 @@ This is very much like the prefix policy above, but for a pattern. It is an obj } ``` -This would create a policy on This will set a policy on repos `sub app/newapp1` and `subapp/newapp2`, with 2 rules , one of which is untagged images (keep 5), and the other looking for a pattern of `*.rc.*` (keeping 5). Note this is not the same as a pattern list (see the [docs](https://docs.aws.amazon.com/AmazonECR/latest/userguide/lpp_creation.html)) in a single rule, which would have to match ALL the patterns. To do more complicated policies, use the [explicit](#lifecycle-policy-explicit) variable. @@ -165,7 +164,7 @@ This is an object with several keys: * repos: list of repositories (from the `application_list`) to apply a lifecycle policy with the policy defined in `policy` * policy: a formatted ECR lifecycle policy JSON string -``` +```hcl lifecycle_policy_explicit = { repos = [ "subapp/new1app3", @@ -173,6 +172,7 @@ This is an object with several keys: policy = data.aws_ecr_lifecycle_policy_document.pushed.json } } +``` This will apply a custom policy `data.aws_ecr_lifecycle_policy_document.pushed.json` to the repo `subapp/new1app3`. @@ -181,8 +181,7 @@ This will apply a custom policy `data.aws_ecr_lifecycle_policy_document.pushed.j * [Lifecycle Policy](examples/lifecycle-policy) # Caveats -Currently, a destroy of the images (null_resources) does **NOT** remove the repository. That is a work in progress. -``` +Currently, a destroy of the images (null\_resources) does **NOT** remove the repository. That is a work in progress. ## Requirements diff --git a/main.tf b/main.tf index cfc50d6..96b2b96 100644 --- a/main.tf +++ b/main.tf @@ -149,7 +149,6 @@ * } * ``` * -* This would create a policy on * This will set a policy on repos `sub app/newapp1` and `subapp/newapp2`, with 2 rules , one of which is untagged images (keep 5), and the other looking for a pattern of `*.rc.*` (keeping 5). * Note this is not the same as a pattern list (see the [docs](https://docs.aws.amazon.com/AmazonECR/latest/userguide/lpp_creation.html)) in a single rule, * which would have to match ALL the patterns. To do more complicated policies, use the [explicit](#lifecycle-policy-explicit) variable. @@ -165,7 +164,7 @@ * * repos: list of repositories (from the `application_list`) to apply a lifecycle policy with the policy defined in `policy` * * policy: a formatted ECR lifecycle policy JSON string * -* ``` +* ```hcl * lifecycle_policy_explicit = { * repos = [ * "subapp/new1app3", @@ -173,6 +172,7 @@ * policy = data.aws_ecr_lifecycle_policy_document.pushed.json * } * } +* ``` * * This will apply a custom policy `data.aws_ecr_lifecycle_policy_document.pushed.json` to the repo `subapp/new1app3`. *