Files
fleet-terraform/byo-vpc/byo-db/README.md
T
Robert Fairburn f378f62db2 Initial migration (#1)
This will be needed to make the initial tags. Once merged to main, I
will tag with the same module revisions as what exists in the Fleet
repo. We can then test the example module using the new settings.

Once validated, we'll then update the main fleet repo to redirect here
for /terraform and remove everything there. Anything referring to old
tags will still work in-place. Additionally any website references will
be updated as well to reflect these changes.
2025-02-04 10:07:51 -06:00

42 lines
11 KiB
Markdown

## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.62.2 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_alb"></a> [alb](#module\_alb) | terraform-aws-modules/alb/aws | 8.3.0 |
| <a name="module_cluster"></a> [cluster](#module\_cluster) | terraform-aws-modules/ecs/aws | 4.1.2 |
| <a name="module_ecs"></a> [ecs](#module\_ecs) | ./byo-ecs | n/a |
## Resources
| Name | Type |
|------|------|
| [aws_security_group.alb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alb_config"></a> [alb\_config](#input\_alb\_config) | n/a | <pre>object({<br> name = optional(string, "fleet")<br> subnets = list(string)<br> security_groups = optional(list(string), [])<br> access_logs = optional(map(string), {})<br> certificate_arn = string<br> allowed_cidrs = optional(list(string), ["0.0.0.0/0"])<br> allowed_ipv6_cidrs = optional(list(string), ["::/0"])<br> egress_cidrs = optional(list(string), ["0.0.0.0/0"])<br> egress_ipv6_cidrs = optional(list(string), ["::/0"])<br> extra_target_groups = optional(any, [])<br> https_listener_rules = optional(any, [])<br> tls_policy = optional(string, "ELBSecurityPolicy-TLS-1-2-2017-01")<br> idle_timeout = optional(number, 905)<br> })</pre> | n/a | yes |
| <a name="input_ecs_cluster"></a> [ecs\_cluster](#input\_ecs\_cluster) | The config for the terraform-aws-modules/ecs/aws module | <pre>object({<br> autoscaling_capacity_providers = optional(any, {})<br> cluster_configuration = optional(any, {<br> execute_command_configuration = {<br> logging = "OVERRIDE"<br> log_configuration = {<br> cloud_watch_log_group_name = "/aws/ecs/aws-ec2"<br> }<br> }<br> })<br> cluster_name = optional(string, "fleet")<br> cluster_settings = optional(map(string), {<br> "name" : "containerInsights",<br> "value" : "enabled",<br> })<br> create = optional(bool, true)<br> default_capacity_provider_use_fargate = optional(bool, true)<br> fargate_capacity_providers = optional(any, {<br> FARGATE = {<br> default_capacity_provider_strategy = {<br> weight = 100<br> }<br> }<br> FARGATE_SPOT = {<br> default_capacity_provider_strategy = {<br> weight = 0<br> }<br> }<br> })<br> tags = optional(map(string))<br> })</pre> | <pre>{<br> "autoscaling_capacity_providers": {},<br> "cluster_configuration": {<br> "execute_command_configuration": {<br> "log_configuration": {<br> "cloud_watch_log_group_name": "/aws/ecs/aws-ec2"<br> },<br> "logging": "OVERRIDE"<br> }<br> },<br> "cluster_name": "fleet",<br> "cluster_settings": {<br> "name": "containerInsights",<br> "value": "enabled"<br> },<br> "create": true,<br> "default_capacity_provider_use_fargate": true,<br> "fargate_capacity_providers": {<br> "FARGATE": {<br> "default_capacity_provider_strategy": {<br> "weight": 100<br> }<br> },<br> "FARGATE_SPOT": {<br> "default_capacity_provider_strategy": {<br> "weight": 0<br> }<br> }<br> },<br> "tags": {}<br>}</pre> | no |
| <a name="input_fleet_config"></a> [fleet\_config](#input\_fleet\_config) | The configuration object for Fleet itself. Fields that default to null will have their respective resources created if not specified. | <pre>object({<br> task_mem = optional(number, null)<br> task_cpu = optional(number, null)<br> mem = optional(number, 4096)<br> cpu = optional(number, 512)<br> pid_mode = optional(string, null)<br> image = optional(string, "fleetdm/fleet:v4.54.1")<br> family = optional(string, "fleet")<br> sidecars = optional(list(any), [])<br> depends_on = optional(list(any), [])<br> mount_points = optional(list(any), [])<br> volumes = optional(list(any), [])<br> extra_environment_variables = optional(map(string), {})<br> extra_iam_policies = optional(list(string), [])<br> extra_execution_iam_policies = optional(list(string), [])<br> extra_secrets = optional(map(string), {})<br> security_group_name = optional(string, "fleet")<br> iam_role_arn = optional(string, null)<br> repository_credentials = optional(string, "")<br> private_key_secret_name = optional(string, "fleet-server-private-key")<br> service = optional(object({<br> name = optional(string, "fleet")<br> }), {<br> name = "fleet"<br> })<br> database = optional(object({<br> password_secret_arn = string<br> user = string<br> database = string<br> address = string<br> rr_address = optional(string, null)<br> }), {<br> password_secret_arn = null<br> user = null<br> database = null<br> address = null<br> rr_address = null<br> })<br> redis = optional(object({<br> address = string<br> use_tls = optional(bool, true)<br> }), {<br> address = null<br> use_tls = true<br> })<br> awslogs = optional(object({<br> name = optional(string, null)<br> region = optional(string, null)<br> create = optional(bool, true)<br> prefix = optional(string, "fleet")<br> retention = optional(number, 5)<br> }), {<br> name = null<br> region = null<br> prefix = "fleet"<br> retention = 5<br> })<br> loadbalancer = optional(object({<br> arn = string<br> }), {<br> arn = null<br> })<br> extra_load_balancers = optional(list(any), [])<br> networking = optional(object({<br> subnets = optional(list(string), null)<br> security_groups = optional(list(string), null)<br> ingress_sources = optional(object({<br> cidr_blocks = optional(list(string), [])<br> ipv6_cidr_blocks = optional(list(string), [])<br> security_groups = optional(list(string), [])<br> prefix_list_ids = optional(list(string), [])<br> }), {<br> cidr_blocks = []<br> ipv6_cidr_blocks = []<br> security_groups = []<br> prefix_list_ids = []<br> })<br> }), {<br> subnets = null<br> security_groups = null<br> ingress_sources = {<br> cidr_blocks = []<br> ipv6_cidr_blocks = []<br> security_groups = []<br> prefix_list_ids = []<br> }<br> })<br> autoscaling = optional(object({<br> max_capacity = optional(number, 5)<br> min_capacity = optional(number, 1)<br> memory_tracking_target_value = optional(number, 80)<br> cpu_tracking_target_value = optional(number, 80)<br> }), {<br> max_capacity = 5<br> min_capacity = 1<br> memory_tracking_target_value = 80<br> cpu_tracking_target_value = 80<br> })<br> iam = optional(object({<br> role = optional(object({<br> name = optional(string, "fleet-role")<br> policy_name = optional(string, "fleet-iam-policy")<br> }), {<br> name = "fleet-role"<br> policy_name = "fleet-iam-policy"<br> })<br> execution = optional(object({<br> name = optional(string, "fleet-execution-role")<br> policy_name = optional(string, "fleet-execution-role")<br> }), {<br> name = "fleet-execution-role"<br> policy_name = "fleet-iam-policy-execution"<br> })<br> }), {<br> name = "fleetdm-execution-role"<br> })<br> software_installers = optional(object({<br> create_bucket = optional(bool, true)<br> bucket_name = optional(string, null)<br> bucket_prefix = optional(string, "fleet-software-installers-")<br> s3_object_prefix = optional(string, "")<br> }), {<br> create_bucket = true<br> bucket_name = null<br> bucket_prefix = "fleet-software-installers-"<br> s3_object_prefix = ""<br> })<br> })</pre> | <pre>{<br> "autoscaling": {<br> "cpu_tracking_target_value": 80,<br> "max_capacity": 5,<br> "memory_tracking_target_value": 80,<br> "min_capacity": 1<br> },<br> "awslogs": {<br> "create": true,<br> "name": null,<br> "prefix": "fleet",<br> "region": null,<br> "retention": 5<br> },<br> "cpu": 256,<br> "database": {<br> "address": null,<br> "database": null,<br> "password_secret_arn": null,<br> "rr_address": null,<br> "user": null<br> },<br> "depends_on": [],<br> "extra_environment_variables": {},<br> "extra_execution_iam_policies": [],<br> "extra_iam_policies": [],<br> "extra_load_balancers": [],<br> "extra_secrets": {},<br> "family": "fleet",<br> "iam": {<br> "execution": {<br> "name": "fleet-execution-role",<br> "policy_name": "fleet-iam-policy-execution"<br> },<br> "role": {<br> "name": "fleet-role",<br> "policy_name": "fleet-iam-policy"<br> }<br> },<br> "iam_role_arn": null,<br> "image": "fleetdm/fleet:v4.54.1",<br> "loadbalancer": {<br> "arn": null<br> },<br> "mem": 512,<br> "mount_points": [],<br> "networking": {<br> "ingress_sources": {<br> "cidr_blocks": [],<br> "ipv6_cidr_blocks": [],<br> "prefix_list_ids": [],<br> "security_groups": []<br> },<br> "security_groups": null,<br> "subnets": null<br> },<br> "pid_mode": null,<br> "private_key_secret_name": "fleet-server-private-key",<br> "redis": {<br> "address": null,<br> "use_tls": true<br> },<br> "repository_credentials": "",<br> "security_group_name": "fleet",<br> "security_groups": null,<br> "service": {<br> "name": "fleet"<br> },<br> "sidecars": [],<br> "software_installers": {<br> "bucket_name": null,<br> "bucket_prefix": "fleet-software-installers-",<br> "create_bucket": true,<br> "s3_object_prefix": ""<br> },<br> "task_cpu": null,<br> "task_mem": null,<br> "volumes": []<br>}</pre> | no |
| <a name="input_migration_config"></a> [migration\_config](#input\_migration\_config) | The configuration object for Fleet's migration task. | <pre>object({<br> mem = number<br> cpu = number<br> })</pre> | <pre>{<br> "cpu": 1024,<br> "mem": 2048<br>}</pre> | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | n/a | `string` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_alb"></a> [alb](#output\_alb) | n/a |
| <a name="output_byo-ecs"></a> [byo-ecs](#output\_byo-ecs) | n/a |
| <a name="output_cluster"></a> [cluster](#output\_cluster) | n/a |