Skip to content

Commit

Permalink
Merge pull request #24 from byu-oit/fix-length
Browse files Browse the repository at this point in the history
fix: app_name max length to 28
  • Loading branch information
yoshutch authored Mar 11, 2022
2 parents f832452 + dbf98f4 commit 07069ab
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 15 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: '/' # Check files in .github/workflows
schedule:
interval: monthly
target-branch: main

- package-ecosystem: terraform
directory: '/'
schedule:
interval: monthly
target-branch: main
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: CI

on:
pull_request:
branches: [master]
branches: [main]

jobs:
env:
name: Set Env Vars
runs-on: ubuntu-latest
steps:
- name: Set up DEV Environment Variables
if: github.base_ref == 'master'
- name: Set up Environment Variables
if: github.base_ref == 'main'
run: |
matrix='{
"env":[
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
matrix: ${{ fromJson(needs.env.outputs.matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Also Note: CodePipeline and CodeDeploy cannot be used together to deploy a Lambd
For a Zip file lambda
```hcl
module "lambda_api" {
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-lambda-codedeploy-dev"
env = "dev"
zip_filename = "./src/lambda.zip"
Expand All @@ -51,7 +51,7 @@ module "lambda_api" {
For a docker image lambda:
```hcl
module "lambda_api" {
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-docker-lambda"
image_uri = "my-image-from-my-ecr:latest"
hosted_zone = module.acs.route53_zone
Expand Down Expand Up @@ -92,7 +92,7 @@ module "lambda_api" {
## Inputs
| Name | Type | Description | Default |
| --- | --- | --- | --- |
| app_name | string | Application name to name your Lambda API and other resources (Must be <= 24 alphanumeric characters) | |
| app_name | string | Application name to name your Lambda API and other resources (Must be <= 28 alphanumeric characters) | |
| image_uri | string | ECR Image URI containing the function's deployment package (conflicts with `zip_file`)| null |
| zip_filename | string | File that contains your compiled or zipped source code. |
| zip_handler | string | Lambda event handler |
Expand Down Expand Up @@ -231,4 +231,4 @@ If manual rollback is needed after the deployment has completed, that can be don

If you require additional variables please create an [issue](https://github.com/byu-oit/terraform-aws-lambda-api/issues)
and/or a [pull request](https://github.com/byu-oit/terraform-aws-lambda-api/pulls) to add the variable and reach
out to the Terraform Working Group on slack (`#terraform` channel).
out to the Application Engineering SpecOps Green team (`IT Collaboration` -> `OIT ENG AppEng - SpecOps Green` channel).
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
- removed `use_codedeploy` variable - just include the codedeploy variables to enable codedeploy
- removed `env` variable - just include the env inside the `app_name` variable
- added `domain_url` variable to enable a custom API URL

## v2.0.1
3/11/2022 - increased `app_name` variable length
- increased `app_name` variable length from 24 to 28
2 changes: 1 addition & 1 deletion examples/docker-lambda/docker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "acs" {

module "lambda_api" {
# source = "../../"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-docker-lambda"
image_uri = "my-image-from-my-ecr:latest"
hosted_zone = module.acs.route53_zone
Expand Down
2 changes: 1 addition & 1 deletion examples/no-codedeploy/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "acs" {

module "lambda_api" {
# source = "../../"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-lambda-dev"
zip_filename = "./src/lambda.zip"
zip_handler = "index.handler"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-lambda-in-vpc/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "acs" {

module "lambda_api" {
# source = "../../"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-lambda-dev"
zip_filename = "./src/lambda.zip"
zip_handler = "index.handler"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-lambda-with-deploy-test/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "acs" {

module "lambda_api" {
# source = "../../"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.0"
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
app_name = "my-lambda-codedeploy-dev"
env = "dev"
zip_filename = "./src/lambda.zip"
Expand Down
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "app_name" {
type = string
description = "Application name to name your Fargate API and other resources. Must be <= 24 characters."
description = "Application name to name your Fargate API and other resources. Must be <= 28 characters."
validation {
condition = length(var.app_name) <= 24
error_message = "Must be <= 24 characters."
condition = length(var.app_name) <= 28
error_message = "Must be <= 28 characters."
}
}

Expand Down

0 comments on commit 07069ab

Please sign in to comment.