Skip to content

Commit d8a0c56

Browse files
authored
R53 Cert fix - Add LB SSL policy (#2)
* Bump action branch * Update action.yaml * Adding ssl_policy and fixing cert issue
1 parent 5b8b3a4 commit d8a0c56

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
deploy-ecs:
4242
runs-on: ubuntu-latest
4343
- name: Create Nginx example
44-
uses: bitovi/[email protected].2
44+
uses: bitovi/[email protected].3
4545
id: ecs
4646
with:
4747
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -80,7 +80,7 @@ jobs:
8080
url: ${{ steps.ecs.outputs.ecs_dns_record }}
8181
steps:
8282
- name: Create Nginx example
83-
uses: bitovi/[email protected].2
83+
uses: bitovi/[email protected].3
8484
id: ecs
8585
with:
8686
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -136,7 +136,7 @@ The following inputs can be used as `step.with` keys
136136
| `aws_secret_access_key` | String | AWS secret access key |
137137
| `aws_session_token` | String | AWS session token |
138138
| `aws_default_region` | String | AWS default region. Defaults to `us-east-1` |
139-
| `aws_resource_identifier` | String | Set to override the AWS resource identifier for the deployment. Defaults to `${GITHUB_ORG_NAME}-${GITHUB_REPO_NAME}-${GITHUB_BRANCH_NAME}`. Use with destroy to destroy specific resources. |
139+
| `aws_resource_identifier` | String | Set to override the AWS resource identifier for the deployment. Defaults to `${GITHUB_ORG_NAME}-${GITHUB_REPO_NAME}-${GITHUB_BRANCH_NAME}`. |
140140
| `aws_additional_tags` | JSON | Add additional tags to the terraform [default tags](https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider), any tags put here will be added to all provisioned resources.|
141141
<hr/>
142142
<br/>
@@ -178,6 +178,7 @@ The following inputs can be used as `step.with` keys
178178
| `aws_ecs_lb_port`| String | Comma serparated list of ports exposed by the load balancer. One for each. |
179179
| `aws_ecs_lb_redirect_enable`| String | Toggle redirect from HTTP and/or HTTPS to the main port. |
180180
| `aws_ecs_lb_container_path`| String | Comma separated list of paths for subsequent deployed containers. Need `aws_ecs_lb_redirect_enable` to be true. eg. api. (For http://bitovi.com/api/). If you have multiple, set them to `api,monitor,prom,,` (This example is for 6 containers) |
181+
| `aws_ecs_lb_ssl_policy` | String | SSL Policy for HTTPS listener in ALB. Will default to ELBSecurityPolicy-TLS13-1-2-2021-06 if none provided. See [this link](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html) for other policies. |
181182
| `aws_ecs_autoscaling_enable`| Boolean | Toggle ecs autoscaling policy. |
182183
| `aws_ecs_autoscaling_max_nodes`| String | Max ammount of nodes to scale up to. |
183184
| `aws_ecs_autoscaling_min_nodes`| String | Min ammount of nodes to scale down to. |
@@ -206,14 +207,14 @@ The following inputs can be used as `step.with` keys
206207
#### **VPC Inputs**
207208
| Name | Type | Description |
208209
|------------------|---------|------------------------------------|
209-
| `aws_vpc_create` | Boolean | Define if a VPC should be created |
210+
| `aws_vpc_create` | Boolean | Define if a VPC should be created. Defaults to `false`. |
210211
| `aws_vpc_name` | String | Define a name for the VPC. Defaults to `VPC for ${aws_resource_identifier}`. |
211212
| `aws_vpc_cidr_block` | String | Define Base CIDR block which is divided into subnet CIDR blocks. Defaults to `10.0.0.0/16`. |
212213
| `aws_vpc_public_subnets` | String | Comma separated list of public subnets. Defaults to `10.10.110.0/24`|
213214
| `aws_vpc_private_subnets` | String | Comma separated list of private subnets. If no input, no private subnet will be created. Defaults to `<none>`. |
214215
| `aws_vpc_availability_zones` | String | Comma separated list of availability zones. Defaults to `aws_default_region+<random>` value. If a list is defined, the first zone will be the one used for the EC2 instance. |
215-
| `aws_vpc_id` | String | AWS VPC ID. Accepts `vpc-###` values. |
216-
| `aws_vpc_subnet_id` | String | AWS VPC Subnet ID. If none provided, will pick one. (Ideal when there's only one) |
216+
| `aws_vpc_id` | String | **Existing** AWS VPC ID to use. Accepts `vpc-###` values. |
217+
| `aws_vpc_subnet_id` | String | **Existing** AWS VPC Subnet ID. If none provided, will pick one. (Ideal when there's only one). |
217218
| `aws_vpc_additional_tags` | JSON | Add additional tags to the terraform [default tags](https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider), any tags put here will be added to vpc provisioned resources.|
218219
<hr/>
219220
<br/>
@@ -222,9 +223,9 @@ The following inputs can be used as `step.with` keys
222223
#### **DNS Inputs**
223224
| Name | Type | Description |
224225
|------------------|---------|------------------------------------|
225-
| `aws_r53_enable` | Boolean | Set this to true if you wish to manage certificates through AWS Certificate Manager with Terraform. **See note**. Default is `false`. |
226+
| `aws_r53_enable` | Boolean | Set this to true if you wish to use an existing AWS Route53 domain. **See note**. Default is `false`. |
226227
| `aws_r53_domain_name` | String | Define the root domain name for the application. e.g. bitovi.com'. |
227-
| `aws_r53_sub_domain_name` | String | Define the sub-domain part of the URL. Defaults to `${GITHUB_ORG_NAME}-${GITHUB_REPO_NAME}-${GITHUB_BRANCH_NAME}`. |
228+
| `aws_r53_sub_domain_name` | String | Define the sub-domain part of the URL. Defaults to `aws_resource_identifier`. |
228229
| `aws_r53_root_domain_deploy` | Boolean | Deploy application to root domain. Will create root and www records. Default is `false`. |
229230
| `aws_r53_enable_cert` | Boolean | Set this to true if you wish to manage certificates through AWS Certificate Manager with Terraform. **See note**. Default is `false`. |
230231
| `aws_r53_cert_arn` | String | Define the certificate ARN to use for the application. **See note**. |

action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ inputs:
116116
aws_ecs_lb_container_path:
117117
description: 'Path for subsequent deployed images. eg. api.'
118118
required: false
119+
aws_ecs_lb_ssl_policy:
120+
description: 'SSL Policy for HTTPS listener in ALB. Will default to ELBSecurityPolicy-TLS13-1-2-2021-06 if none provided.'
121+
required: false
119122
aws_ecs_autoscaling_enable:
120123
description: 'Toggle ecs autoscaling policy'
121124
required: false
@@ -233,7 +236,7 @@ runs:
233236
steps:
234237
- name: Deploy with BitOps
235238
id: deploy
236-
uses: bitovi/[email protected].9
239+
uses: bitovi/[email protected].11
237240
with:
238241
# Current repo vars
239242
gh_action_repo: ${{ github.action_path }}
@@ -279,6 +282,7 @@ runs:
279282
aws_ecs_lb_port: ${{ inputs.aws_ecs_lb_port }}
280283
aws_ecs_lb_redirect_enable: ${{ inputs.aws_ecs_lb_redirect_enable }}
281284
aws_ecs_lb_container_path: ${{ inputs.aws_ecs_lb_container_path }}
285+
aws_ecs_lb_ssl_policy: ${{ inputs.aws_ecs_lb_ssl_policy }}
282286
aws_ecs_autoscaling_enable: ${{ inputs.aws_ecs_autoscaling_enable }}
283287
aws_ecs_autoscaling_max_nodes: ${{ inputs.aws_ecs_autoscaling_max_nodes }}
284288
aws_ecs_autoscaling_min_nodes: ${{ inputs.aws_ecs_autoscaling_min_nodes }}

0 commit comments

Comments
 (0)