diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fff35f..cd84791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.1.1](https://github.com/enter-at/terraform-aws-lambda-layer/compare/v1.1.0...v1.1.1) (2019-12-13) + + +### Bug Fixes + +* **main:** define description ([4eb8e1a](https://github.com/enter-at/terraform-aws-lambda-layer/commit/4eb8e1ab8fd1910c84f54304d19949896287df74)) + # [1.1.0](https://github.com/enter-at/terraform-aws-lambda-layer/compare/v1.0.0...v1.1.0) (2019-12-13) diff --git a/README.md b/README.md index a85c303..ba6d9c9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ # terraform-module-template [![Build Status](https://github.com/enter-at/terraform-module-template/workflows/Terraform%20Lint/badge.svg)](https://github.com/enter-at/terraform-module-template/actions) [![Latest Release](https://img.shields.io/github/release/enter-at/terraform-module-template.svg)](https://github.com/enter-at/terraform-module-template/releases/latest) [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) -Terraform module designed to facilitate ... +Terraform module designed to facilitate the creation of AWS Lambda layers. --- @@ -51,14 +51,30 @@ module "module" { | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| enabled | (Optional) Set whether to enable the module. Defaults to true. | bool | `true` | no | +| compatible_runtimes | (Optional) A list of Runtimes this layer is compatible with. Up to 5 runtimes can be specified. | list(string) | `null` | no | +| description | (Optional) Description of what the Lambda layer does. | string | `null` | no | +| layer_name | (Required) A unique name for the Lambda Layer. | string | - | yes | +| package_file | (Optional) The location of the package manager config file. Can be one of (package.json, requirements.txt, Pipfile) | string | `null` | no | +| rsync_pattern | (Optional) A list of rsync pattern to include or exclude files and directories. | list(string) | `` | no | +| source_dir | (Optional) The location of the Lamvda layer source code. Requires source_type to be defined. | string | `null` | no | +| source_type | (Optional) The location of the Lambda layer source type. Can be one of (nodejs, python) | string | `null` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | The Amazon Resource Name (ARN) of the Lambda layer with version. | +| created_date | The date the layer was created. | +| layer_arn | The Amazon Resource Name (ARN) of the Lambda layer without version. | +| source_code_size | The size in bytes of the layer .zip file. | +| version | The Lamba layer version. | ## Share the Love -Like this project? +Like this project? Please give it a ★ on [our GitHub](https://github.com/enter-at/terraform-module-template)! @@ -128,11 +144,12 @@ See [LICENSE](LICENSE) for full details. ### Contributors -| [![Steffen Leistner][sleistner_avatar]][sleistner_homepage]
[Steffen Leistner][sleistner_homepage] | -|---| + +[![Steffen Leistner][sleistner_avatar]][sleistner_homepage] + [sleistner_homepage]: https://github.com/sleistner - [sleistner_avatar]: https://res.cloudinary.com/enter-at/image/fetch/w_100,h_100,c_thumb/https://github.com/sleistner.png + [sleistner_avatar]: https://res.cloudinary.com/enter-at/image/fetch/f_png,r_max,w_100,h_100,c_thumb/https://github.com/sleistner.png diff --git a/README.yaml b/README.yaml index 35b737d..ccf7fb2 100644 --- a/README.yaml +++ b/README.yaml @@ -5,7 +5,7 @@ # # Name of this project -name: terraform-module-template +name: terraform-aws-lambda-layer # Tags of this project tags: @@ -20,16 +20,16 @@ categories: license: "APACHE2" # Canonical GitHub repo -github_repo: enter-at/terraform-module-template +github_repo: enter-at/terraform-aws-lambda-layer # Badges to display badges: - name: "Build Status" - image: "https://github.com/enter-at/terraform-module-template/workflows/Terraform%20Lint/badge.svg" - url: "https://github.com/enter-at/terraform-module-template/actions" + image: "https://github.com/enter-at/terraform-aws-lambda-layer/workflows/Terraform%20Lint/badge.svg" + url: "https://github.com/enter-at/terraform-aws-lambda-layer/actions" - name: "Latest Release" - image: "https://img.shields.io/github/release/enter-at/terraform-module-template.svg" - url: "https://github.com/enter-at/terraform-module-template/releases/latest" + image: "https://img.shields.io/github/release/enter-at/terraform-aws-lambda-layer.svg" + url: "https://github.com/enter-at/terraform-aws-lambda-layer/releases/latest" - name: "Semantic Release" image: "https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" url: "https://github.com/semantic-release/semantic-release" @@ -48,8 +48,27 @@ usage: |- ### Simple Example ```hcl - module "module" { - source = "git::https://github.com/enter-at/terraform-module-template.git?ref=master" + module "layer" { + source = "git::https://github.com/enter-at/terraform-aws-lambda-layer.git?ref=master" + layer_name = "dependencies" + package_file = "../Pipfile" + } + ``` + + ### Advanced Example + + ```hcl + module "layer" { + source = "git::https://github.com/enter-at/terraform-aws-lambda-layer.git?ref=master" + layer_name = "dependencies" + source_dir = "../src/lib" + source_type = "python" + + rsync_pattern = [ + "--exclude=**tests**" + "--exclude="**__pycache__**" + "--include=*.py" + ] } ``` diff --git a/docs/terraform.md b/docs/terraform.md index b31ff6a..650e53e 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -2,5 +2,21 @@ | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| enabled | (Optional) Set whether to enable the module. Defaults to true. | bool | `true` | no | +| compatible_runtimes | (Optional) A list of Runtimes this layer is compatible with. Up to 5 runtimes can be specified. | list(string) | `null` | no | +| description | (Optional) Description of what the Lambda layer does. | string | `null` | no | +| layer_name | (Required) A unique name for the Lambda Layer. | string | - | yes | +| package_file | (Optional) The location of the package manager config file. Can be one of (package.json, requirements.txt, Pipfile) | string | `null` | no | +| rsync_pattern | (Optional) A list of rsync pattern to include or exclude files and directories. | list(string) | `` | no | +| source_dir | (Optional) The location of the Lamvda layer source code. Requires source_type to be defined. | string | `null` | no | +| source_type | (Optional) The location of the Lambda layer source type. Can be one of (nodejs, python) | string | `null` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | The Amazon Resource Name (ARN) of the Lambda layer with version. | +| created_date | The date the layer was created. | +| layer_arn | The Amazon Resource Name (ARN) of the Lambda layer without version. | +| source_code_size | The size in bytes of the layer .zip file. | +| version | The Lamba layer version. | diff --git a/main.tf b/main.tf index a2fd6d3..e632a11 100644 --- a/main.tf +++ b/main.tf @@ -3,4 +3,5 @@ resource "aws_lambda_layer_version" "main" { layer_name = var.layer_name source_code_hash = data.archive_file.layer.output_base64sha256 compatible_runtimes = var.compatible_runtimes + description = var.description }