Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-simon-barry1 committed Nov 20, 2024
1 parent cd9dc9d commit 71d2437
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 35 deletions.
44 changes: 22 additions & 22 deletions modules/docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,28 @@ No modules.

## Inputs

| Name | Description | Type | Default | Required |
|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|----------------|:--------:|
| <a name="input_build_args"></a> [build\_args](#input\_build\_args) | A map of Docker build arguments. | `map(string)` | `{}` | no |
| <a name="input_cache_from"></a> [cache\_from](#input\_cache\_from) | List of images to use as cache when building the image. | `list(string)` | `[]` | no |
| <a name="input_create_ecr_repo"></a> [create\_ecr\_repo](#input\_create\_ecr\_repo) | Controls whether ECR repository for Lambda image should be created | `bool` | `false` | no |
| <a name="input_create_sam_metadata"></a> [create\_sam\_metadata](#input\_create\_sam\_metadata) | Controls whether the SAM metadata null resource should be created | `bool` | `false` | no |
| <a name="input_docker_file_path"></a> [docker\_file\_path](#input\_docker\_file\_path) | Path to Dockerfile in source package | `string` | `"Dockerfile"` | no |
| <a name="input_ecr_address"></a> [ecr\_address](#input\_ecr\_address) | Address of ECR repository for cross-account container image pulling (optional). Option `create_ecr_repo` must be `false` | `string` | `null` | no |
| <a name="input_ecr_force_delete"></a> [ecr\_force\_delete](#input\_ecr\_force\_delete) | If true, will delete the repository even if it contains images. | `bool` | `true` | no |
| <a name="input_ecr_repo"></a> [ecr\_repo](#input\_ecr\_repo) | Name of ECR repository to use or to create | `string` | `null` | no |
| <a name="input_ecr_repo_lifecycle_policy"></a> [ecr\_repo\_lifecycle\_policy](#input\_ecr\_repo\_lifecycle\_policy) | A JSON formatted ECR lifecycle policy to automate the cleaning up of unused images. | `string` | `null` | no |
| <a name="input_ecr_repo_tags"></a> [ecr\_repo\_tags](#input\_ecr\_repo\_tags) | A map of tags to assign to ECR repository | `map(string)` | `{}` | no |
| <a name="input_force_remove"></a> [force\_remove](#input\_force\_remove) | Whether to remove image forcibly when the resource is destroyed. | `bool` | `false` | no |
| <a name="input_image_tag"></a> [image\_tag](#input\_image\_tag) | Image tag to use. If not specified current timestamp in format 'YYYYMMDDhhmmss' will be used. This can lead to unnecessary rebuilds. | `string` | `null` | no |
| <a name="input_image_tag_mutability"></a> [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"MUTABLE"` | no |
| <a name="input_keep_locally"></a> [keep\_locally](#input\_keep\_locally) | Whether to delete the Docker image locally on destroy operation. | `bool` | `false` | no |
| <a name="input_keep_remotely"></a> [keep\_remotely](#input\_keep\_remotely) | Whether to keep Docker image in the remote registry on destroy operation. | `bool` | `false` | no |
| <a name="input_platform"></a> [platform](#input\_platform) | The target architecture platform to build the image for. | `string` | `null` | no |
| <a name="input_scan_on_push"></a> [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository | `bool` | `false` | no |
| <a name="input_source_path"></a> [source\_path](#input\_source\_path) | Path to folder containing application code | `string` | `null` | no |
| <a name="input_triggers"></a> [triggers](#input\_triggers) | A map of arbitrary strings that, when changed, will force the docker\_image resource to be replaced. This can be used to rebuild an image when contents of source code folders change | `map(string)` | `{}` | no |
| <a name="input_use_image_tag"></a> [use\_image\_tag](#input\_use\_image\_tag) | Controls whether to use image tag in ECR repository URI or not. Disable this to deploy latest image using ID (sha256:...) | `bool` | `true` | no |
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_build_args"></a> [build\_args](#input\_build\_args) | A map of Docker build arguments. | `map(string)` | `{}` | no |
| <a name="input_cache_from"></a> [cache\_from](#input\_cache\_from) | List of images to consider as cache sources when building the image. | `list(string)` | `[]` | no |
| <a name="input_create_ecr_repo"></a> [create\_ecr\_repo](#input\_create\_ecr\_repo) | Controls whether ECR repository for Lambda image should be created | `bool` | `false` | no |
| <a name="input_create_sam_metadata"></a> [create\_sam\_metadata](#input\_create\_sam\_metadata) | Controls whether the SAM metadata null resource should be created | `bool` | `false` | no |
| <a name="input_docker_file_path"></a> [docker\_file\_path](#input\_docker\_file\_path) | Path to Dockerfile in source package | `string` | `"Dockerfile"` | no |
| <a name="input_ecr_address"></a> [ecr\_address](#input\_ecr\_address) | Address of ECR repository for cross-account container image pulling (optional). Option `create_ecr_repo` must be `false` | `string` | `null` | no |
| <a name="input_ecr_force_delete"></a> [ecr\_force\_delete](#input\_ecr\_force\_delete) | If true, will delete the repository even if it contains images. | `bool` | `true` | no |
| <a name="input_ecr_repo"></a> [ecr\_repo](#input\_ecr\_repo) | Name of ECR repository to use or to create | `string` | `null` | no |
| <a name="input_ecr_repo_lifecycle_policy"></a> [ecr\_repo\_lifecycle\_policy](#input\_ecr\_repo\_lifecycle\_policy) | A JSON formatted ECR lifecycle policy to automate the cleaning up of unused images. | `string` | `null` | no |
| <a name="input_ecr_repo_tags"></a> [ecr\_repo\_tags](#input\_ecr\_repo\_tags) | A map of tags to assign to ECR repository | `map(string)` | `{}` | no |
| <a name="input_force_remove"></a> [force\_remove](#input\_force\_remove) | Whether to remove image forcibly when the resource is destroyed. | `bool` | `false` | no |
| <a name="input_image_tag"></a> [image\_tag](#input\_image\_tag) | Image tag to use. If not specified current timestamp in format 'YYYYMMDDhhmmss' will be used. This can lead to unnecessary rebuilds. | `string` | `null` | no |
| <a name="input_image_tag_mutability"></a> [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"MUTABLE"` | no |
| <a name="input_keep_locally"></a> [keep\_locally](#input\_keep\_locally) | Whether to delete the Docker image locally on destroy operation. | `bool` | `false` | no |
| <a name="input_keep_remotely"></a> [keep\_remotely](#input\_keep\_remotely) | Whether to keep Docker image in the remote registry on destroy operation. | `bool` | `false` | no |
| <a name="input_platform"></a> [platform](#input\_platform) | The target architecture platform to build the image for. | `string` | `null` | no |
| <a name="input_scan_on_push"></a> [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository | `bool` | `false` | no |
| <a name="input_source_path"></a> [source\_path](#input\_source\_path) | Path to folder containing application code | `string` | `null` | no |
| <a name="input_triggers"></a> [triggers](#input\_triggers) | A map of arbitrary strings that, when changed, will force the docker\_image resource to be replaced. This can be used to rebuild an image when contents of source code folders change | `map(string)` | `{}` | no |
| <a name="input_use_image_tag"></a> [use\_image\_tag](#input\_use\_image\_tag) | Controls whether to use image tag in ECR repository URI or not. Disable this to deploy latest image using ID (sha256:...) | `bool` | `true` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion modules/docker-build/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ variable "triggers" {
}

variable "cache_from" {
description = "List of images to consider as cache sources when building the image"
description = "List of images to consider as cache sources when building the image."
type = list(string)
default = []
}
6 changes: 3 additions & 3 deletions wrappers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers"
source = "tfr:///terraform-aws-modules/lambda-fork/aws//wrappers"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers?ref=master"
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda-fork.git//wrappers?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers"
source = "terraform-aws-modules/lambda-fork/aws//wrappers"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/alias/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/alias"
source = "tfr:///terraform-aws-modules/lambda-fork/aws//wrappers/alias"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/alias?ref=master"
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda-fork.git//wrappers/alias?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/alias"
source = "terraform-aws-modules/lambda-fork/aws//wrappers/alias"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/deploy"
source = "tfr:///terraform-aws-modules/lambda-fork/aws//wrappers/deploy"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/deploy?ref=master"
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda-fork.git//wrappers/deploy?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/deploy"
source = "terraform-aws-modules/lambda-fork/aws//wrappers/deploy"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/docker-build"
source = "tfr:///terraform-aws-modules/lambda-fork/aws//wrappers/docker-build"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/docker-build?ref=master"
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda-fork.git//wrappers/docker-build?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/docker-build"
source = "terraform-aws-modules/lambda-fork/aws//wrappers/docker-build"
defaults = { # Default values
create = true
Expand Down
1 change: 1 addition & 0 deletions wrappers/docker-build/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module "wrapper" {
for_each = var.items

build_args = try(each.value.build_args, var.defaults.build_args, {})
cache_from = try(each.value.cache_from, var.defaults.cache_from, [])
create_ecr_repo = try(each.value.create_ecr_repo, var.defaults.create_ecr_repo, false)
create_sam_metadata = try(each.value.create_sam_metadata, var.defaults.create_sam_metadata, false)
docker_file_path = try(each.value.docker_file_path, var.defaults.docker_file_path, "Dockerfile")
Expand Down

0 comments on commit 71d2437

Please sign in to comment.