Skip to content

Commit 147caaa

Browse files
authored
Merge pull request #47 from bitovi/enh/var-renames
Var renames to be consistent with the `tf_` and `aws_` groups
2 parents d15f59e + cb9a1f7 commit 147caaa

File tree

2 files changed

+47
-54
lines changed

2 files changed

+47
-54
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ The following inputs can be used as `steps.with` keys:
6868
| **AWS configuration** |
6969
| `aws_access_key_id` | string | | AWS access key ID (Required) |
7070
| `aws_secret_access_key` | string | | AWS secret access key (Required) |
71-
| `aws_session_token` | string | | AWS session token |
71+
| `aws_session_token` | string | | AWS session token, if you're using temporary credentials |
7272
| `aws_default_region` | string | `us-east-1` | AWS default region (Required) |
73-
| `ec2_instance_type` | string | `t2.medium` | The AWS EC2 instance type. |
74-
| `ec2_instance_profile` | string | | [The AWS IAM instance profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) to use for the EC2 instance. Use if you want to pass an AWS role with specific permissions granted to the instance |
75-
| `aws_resource_identifier` | string | `${org}-{repo}-{branch}` | Auto-generated by default so it's unique for org/repo/branch. Set to override with custom naming the unique AWS resource identifier for the deployment. |
73+
| `aws_ec2_instance_type` | string | `t2.medium` | The AWS EC2 instance type. |
74+
| `aws_ec2_instance_profile` | string | | [The AWS IAM instance profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) to use for the EC2 instance. Use if you want to pass an AWS role with specific permissions granted to the instance |
75+
| `aws_resource_identifier` | string | `${org}-${repo}-${branch}` | Auto-generated by default so it's unique for org/repo/branch. Set to override with custom naming the unique AWS resource identifier for the deployment. |
7676
| `aws_create_vpc` | bool | `false` | Whether an AWS VPC should be created in the action. Otherwise, the existing default VPC will be used. |
77-
| `infrastructure_only` | bool | `false` | Does infrastructure (i.e. terraform) but **not** the deployment (i.e. ansible) |
77+
| `infrastructure_only` | bool | `false` | Set to true to provision infrastructure (with Terraform) but skip the app deployment (with ansible) |
7878
| **Teraform configuration** |
79-
| `tf_state_bucket` | string | `${org}-${repo}-{branch}-tf-state` | AWS S3 bucket to use for Terraform state. By default, a new deployment will be created for each unique branch. Hardcode if you want to keep a shared resource state between the several branches. |
79+
| `tf_state_bucket` | string | `${org}-${repo}-${branch}-tf-state` | AWS S3 bucket to use for Terraform state. By default, a new deployment will be created for each unique branch. Hardcode if you want to keep a shared resource state between the several branches. |
8080
| **StackStorm configuration** |
8181
| `st2_auth_username` | string | | Username used by StackStorm standalone authentication. Set as a secret in GH Actions. |
8282
| `st2_auth_password` | string | | Password used by StackStorm standalone authentication. Set as a secret in GH Actions. |
8383
| `st2_packs` | string |`"st2"` | Comma separated list of packs to install. If you modify this option, be sure to also include `st2` in the list. |
8484
| **Cleanup** |
85-
| `stack_destroy` | bool | `false` | Set to `true` to Destroy the created AWS infrastructure for this instance |
86-
| `tf_state_bucket_destroy` | bool | `false` | Force purge and deletion of `tf_state_bucket` defined. Any file contained there will be destroyed. `stack_destroy` must also be `true`. Use if you want to clean up the resources |
85+
| `tf_stack_destroy` | bool | `false` | Set to `true` to Destroy the created AWS infrastructure for this instance |
86+
| `tf_state_bucket_destroy` | bool | `false` | Force purge and deletion of `tf_state_bucket` defined. Any file contained there will be destroyed. `tf_stack_destroy` must also be `true` |
8787

8888

8989
## Note about AWS resource identifiers

action.yaml

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,63 @@ inputs:
77
checkout:
88
description: 'Specifies if this action should checkout the code'
99
required: false
10-
default: 'true'
10+
default: "true"
11+
12+
# AWS Configuration
1113
aws_access_key_id:
1214
description: 'AWS access key ID'
1315
required: true
1416
aws_secret_access_key:
1517
description: 'AWS secret access key'
1618
required: true
1719
aws_session_token:
18-
description: 'AWS session token'
20+
description: "AWS session token, if you're using temporary credentials"
1921
required: false
2022
aws_default_region:
2123
description: 'AWS default region'
2224
required: true
23-
default: 'us-east-1'
24-
tf_state_bucket:
25-
description: 'AWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state`'
26-
required: false
27-
tf_state_bucket_destroy:
28-
description: 'Force purge and deletion of S3 bucket defined. Any file contained there will be destroyed `stack_destroy` must also be `true`'
29-
required: false
30-
default: 'false'
31-
ec2_instance_profile:
32-
description: 'The AWS IAM instance profile to use for the EC2 instance'
33-
ec2_instance_type:
34-
description: 'The AWS EC2 instance type. Default is "t2.medium"'
35-
stack_destroy:
36-
description: 'Set to "true" to Destroy the stack'
25+
default: us-east-1
26+
aws_ec2_instance_type:
27+
description: 'The AWS EC2 instance type'
28+
default: t2.medium
29+
aws_ec2_instance_profile:
30+
description: 'The AWS IAM instance profile to use for the EC2 instance. Use if you want to pass an AWS role with specific permissions granted to the instance'
3731
aws_resource_identifier:
38-
description: 'Set to override the AWS resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources.'
39-
# domain_name:
40-
# description: 'Define the root domain name for the application. e.g. app.com'
41-
# required: true
42-
# create_domain:
43-
# description: "Bool, whether the domain should be created in the action. Default is false"
44-
# default: false
45-
# sub_domain:
46-
# description: 'Define the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}`'
47-
# create_hosted_zone:
48-
# description: "Bool, whether the hosted zone should be created in the action. Default is false"
49-
# default: false
32+
description: "Auto-generated by default so it's unique for org/repo/branch. Set to override with custom naming the unique AWS resource identifier for the deployment. Defaults to `${org}-${repo}-${branch}`."
5033
aws_create_vpc:
51-
description: "Bool, whether an AWS VPC should be created in the action. Default is false"
52-
default: false
34+
description: 'Bool, whether an AWS VPC should be created in the action. Otherwise, the existing default VPC will be used.'
35+
default: "false"
5336
infrastructure_only:
54-
description: "Bool, does infrastructure (i.e. terraform) but **not** the deployment (i.e. ansible) . Default is false"
55-
default: false
37+
description: 'Set to true to provision infrastructure (with Terraform) but skip the app deployment (with ansible)'
38+
default: "false"
5639

40+
# Terraform configuration
41+
tf_state_bucket:
42+
description: 'AWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-${branch}-tf-state`'
43+
required: false
5744

58-
# ST2 config
45+
# StackStorm configuration
5946
st2_auth_username:
60-
description: Username used by StackStorm standalone authentication
47+
description: 'Username used by StackStorm standalone authentication. Set as a secret in GH Actions.'
48+
required: true
6149
st2_auth_password:
62-
description: Password used by StackStorm standalone authentication
50+
description: 'Password used by StackStorm standalone authentication. Set as a secret in GH Actions.'
51+
required: true
6352
st2_packs:
64-
description: String. Comma separated list of packs to install. This flag does not work with a --python3 only pack. (default `"st2"`). If you modify this option, be sure to also include `st2` in the list.
53+
description: 'Comma separated list of packs to install. If you modify this option, be sure to also include `st2` in the list.'
6554
default: "st2"
55+
56+
# Cleanup
57+
tf_stack_destroy:
58+
description: 'Set to "true" to Destroy the created AWS infrastructure for this instance'
59+
default: "false"
60+
tf_state_bucket_destroy:
61+
description: 'Force purge and deletion of tf_state_bucket defined. Any file contained there will be destroyed. tf_stack_destroy must also be true.'
62+
default: "false"
63+
6664
outputs:
6765
lb_url:
68-
description: "The URL of the generated app"
66+
description: 'The URL of the generated app'
6967
value: ${{ steps.deploy.outputs.lb_url }}
7068

7169
runs:
@@ -89,21 +87,16 @@ runs:
8987
TF_STATE_BUCKET_DESTROY: ${{ inputs.tf_state_bucket_destroy }}
9088

9189
APP_PORT: ${{ inputs.app_port }}
92-
EC2_INSTANCE_PROFILE: ${{ inputs.ec2_instance_profile }}
93-
EC2_INSTANCE_TYPE: ${{ inputs.ec2_instance_type }}
94-
STACK_DESTROY: ${{ inputs.stack_destroy }}
90+
EC2_INSTANCE_PROFILE: ${{ inputs.aws_ec2_instance_profile }}
91+
EC2_INSTANCE_TYPE: ${{ inputs.aws_ec2_instance_type }}
92+
STACK_DESTROY: ${{ inputs.tf_stack_destroy }}
9593
AWS_RESOURCE_IDENTIFIER: ${{ inputs.aws_resource_identifier }}
96-
# DOMAIN_NAME: ${{ inputs.domain_name }}
97-
# CREATE_DOMAIN: ${{ inputs.CREATE_DOMAIN }}
98-
# SUB_DOMAIN: ${{ inputs.sub_domain }}
99-
# CREATE_HOSTED_ZONE: ${{ inputs.CREATE_HOSTED_ZONE }}
100-
10194
CREATE_VPC: ${{ inputs.aws_create_vpc }}
10295

10396
# Skip ansible deployment if deploying only infrastructure
10497
ANSIBLE_SKIP_DEPLOY: ${{ inputs.infrastructure_only }}
10598

106-
BITOPS_FAST_FAIL: true
99+
BITOPS_FAST_FAIL: "true"
107100

108101
# ST2 config
109102
ST2_AUTH_USERNAME: ${{ inputs.st2_auth_username }}

0 commit comments

Comments
 (0)