bitovi/Deploy Pixel Tracker to AWS EC2
Deploy a simple pixel tracker to an AWS Virtual Machine (EC2)
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Feb 15, 2024
- License
- MIT
Pinned Snippet
uses: bitovi/github-actions-deploy-pixel-tracker@55aefc2084a9ffa3062292b529c9fe89bc0e8e40 # v0.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| checkout | Specifies if this action should checkout the code | no | true |
| aws_access_key_id | AWS access key ID | yes | — |
| aws_secret_access_key | AWS secret access key | yes | — |
| aws_session_token | AWS session token, if you're using temporary credentials | no | — |
| aws_default_region | AWS default region | yes | us-east-1 |
| aws_resource_identifier | 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}`. | — | — |
| aws_extra_tags | A list of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | {} |
| aws_ec2_instance_type | The AWS EC2 instance type | no | t3.medium |
| aws_ec2_instance_profile | 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 | no | — |
| aws_ec2_create_keypair_sm | Creates a Secret in AWS secret manager to store a kypair | no | false |
| aws_ec2_instance_vol_size | Root disk size for the EC2 instance | no | 10 |
| aws_ec2_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| aws_ec2_ami_filter | AMI filter to use when searching for an AMI to use for the EC2 instance. Defaults to `ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*` | no | ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* |
| env_ghs | Set to true to include a Github Secrets (.env formatted) in the environment variables | no | "" |
| grafana_datasource_dir | Path to the grafana datasource directory | no | observability/grafana/datasources |
| prometheus_config | Path to the prometheus config file | no | observability/prometheus/prometheus.yml |
| grafana_scrape_interval | How frequently to scrape targets by default in the Prometheus data-source. | no | — |
| prometheus_scrape_interval | How frequently to scrape targets by default | no | 15s |
| prometheus_retention_period | When to remove old data. Defaults to 15d. | no | 15d |
| cadvisor_enable | Enable cadvisor container in docker-compose | no | — |
| cadvisor_extra_targets | Add cadvisor target | no | — |
| node_exporter_enable | Enable node-exporter container in docker-compose | no | — |
| node_exporter_extra_targets | Add node-exporter target | no | — |
| print_yaml_files | — | no | — |
| tf_stack_destroy | Set to "true" to Destroy the created AWS infrastructure for this instance | — | false |
| tf_state_file_name | Change this to be anything you want to. Carefull to be consistent here. A missing file could trigger recreation, or stepping over destruction of non-defined objects. | no | — |
| tf_state_file_name_append | Append a string to the tf-state-file. Setting this to `unique` will generate `tf-state-aws-unique`. Can co-exist with the tf_state_file_name variable. | no | — |
| tf_state_bucket | AWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state-aws` | no | — |
| tf_state_bucket_destroy | Force purge and deletion of S3 tf_state_bucket defined. Any file contained there will be destroyed. `tf_stack_destroy` must also be `true` | no | — |
| aws_domain_name | Define the root domain name for the application. e.g. bitovi.com. If empty, ELB URL will be provided. | no | — |
| aws_sub_domain | Define the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}` | — | — |
| aws_root_domain | Deploy application to root domain. Will create root and www DNS records. Domain must exist in Route53. | no | — |
| aws_cert_arn | Existing certificate ARN to be used in the ELB. Use if you manage a certificate outside of this action. See https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-list.html for how to find the certificate ARN. | no | — |
| aws_create_root_cert | Generates and manage the root certificate for the application to be used in the ELB. | no | — |
| aws_create_sub_cert | Generates and manage the sub-domain certificate for the application to be used in the ELB. | no | — |
| aws_no_cert | Set this to true if you want not to use a certificate in the ELB. | no | false |
| aws_vpc_create | Define if a VPC should be created | no | — |
| aws_vpc_name | Set a specific name for the VPC | no | — |
| aws_vpc_cidr_block | Define Base CIDR block which is divided into subnet CIDR blocks. Defaults to 10.0.0.0/16. | no | — |
| aws_vpc_public_subnets | Comma separated list of public subnets. Defaults to 10.10.110.0/24 | no | — |
| aws_vpc_private_subnets | Comma separated list of private subnets. If none, none will be created. | no | — |
| aws_vpc_availability_zones | Comma separated list of availability zones. Defaults to `aws_default_region. | no | — |
| aws_vpc_id | AWS VPC ID. Accepts `vpc-###` values. | no | — |
| aws_vpc_subnet_id | Specify a Subnet to be used with the instance. If none provided, will pick one. | no | — |
| aws_vpc_enable_nat_gateway | Enables NAT gateway | no | — |
| aws_vpc_single_nat_gateway | Creates only one NAT gateway | no | — |
| aws_vpc_external_nat_ip_ids | Comma separated list of IP IDS to reuse in the NAT gateways | no | — |
| aws_vpc_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| docker_cloudwatch_enable | Toggle cloudwatch creation for Docker containers. | no | true |
| docker_cloudwatch_skip_destroy | Toggle deletion or not when destroying the stack. | no | false |
| aws_ec2_instance_public_ip | Add a public IP to the instance or not. (Not an Elastic IP) | no | true |
| aws_ec2_port_list | List of ports to be enabled as an ingress rule in the EC2 SG, in a [xx,yy] format - Not the ELB | no | — |
| aws_elb_app_port | Port to expose for the app | no | 8000,3000 |
| aws_elb_listen_port | Load balancer listening port. Defaults to 80 if NO FQDN provided, 443 if FQDN provided | no | 443,3000 |
Outputs
| name | description |
|---|---|
| aws_vpc_id | The selected VPC ID used. |
| vm_url | The URL of the generated app |
| instance_endpoint | The URL of the generated ec2 instance |
| ec2_sg_id | SG ID for the EC2 instance |