1 data "vault_generic_secret" "fdio_docs" {
2 path = "kv/secret/data/etl/fdio_docs"
5 data "vault_aws_access_credentials" "creds" {
6 backend = "${var.vault_name}-path"
7 role = "${var.vault_name}-role"
10 module "elastic_beanstalk_environment" {
14 vpc_cidr_block = "192.168.0.0/24"
15 vpc_enable_dns_hostnames = true
16 vpc_enable_dns_support = true
17 vpc_instance_tenancy = "default"
20 subnet_availability_zone = "us-east-1a"
23 application_description = "FD.io CSIT Results Dashboard"
24 application_name = "fdio-csit-dash-app"
25 appversion_lifecycle_service_role_arn = ""
26 appversion_lifecycle_max_count = 2
27 appversion_lifecycle_delete_source_from_s3 = false
30 environment_description = "FD.io CSIT Results Dashboard"
31 environment_name = "fdio-csit-dash-env"
32 environment_solution_stack_name = "64bit Amazon Linux 2 v3.3.11 running Python 3.8"
33 environment_tier = "WebServer"
34 environment_wait_for_ready_timeout = "20m"
35 environment_version_label = ""
38 instances_instance_types = "t3a.2xlarge"
41 associate_public_ip_address = true
44 # aws:elbv2:listener:default
45 default_listener_enabled = true
47 # aws:elasticbeanstalk:environment
48 environment_loadbalancer_type = "network"
50 # aws:elasticbeanstalk:environment:process:default
51 environment_process_default_healthcheck_interval = 10
52 environment_process_default_healthy_threshold_count = 3
53 environment_process_default_port = 5000
54 environment_process_default_unhealthy_threshold_count = 3
56 # aws:elasticbeanstalk:healthreporting:system
57 healthreporting_system_type = "enhanced"
59 # aws:elasticbeanstalk:managedactions
60 managedactions_managed_actions_enabled = true
61 managedactions_preferred_start_time = "Sun:10:00"
63 # aws:elasticbeanstalk:managedactions:platformupdate
64 managedactions_platformupdate_update_level = "minor"
65 managedactions_platformupdate_instance_refresh_enabled = true
68 autoscaling_asg_minsize = 1
69 autoscaling_asg_maxsize = 2
71 # aws:autoscaling:trigger
72 autoscaling_trigger_measure_name = "CPUUtilization"
73 autoscaling_trigger_statistic = "Average"
74 autoscaling_trigger_unit = "Percent"
75 autoscaling_trigger_lower_threshold = 20
76 autoscaling_trigger_lower_breach_scale_increment = -1
77 autoscaling_trigger_upper_threshold = 80
78 autoscaling_trigger_upper_breach_scale_increment = 1
80 # aws:elasticbeanstalk:hostmanager
81 hostmanager_log_publication_control = true
83 # aws:elasticbeanstalk:cloudwatch:logs
84 cloudwatch_logs_stream_logs = true
85 cloudwatch_logs_delete_on_terminate = true
86 cloudwatch_logs_retention_in_days = 3
88 # aws:elasticbeanstalk:cloudwatch:logs:health
89 cloudwatch_logs_health_health_streaming_enabled = true
90 cloudwatch_logs_health_delete_on_terminate = true
91 cloudwatch_logs_health_retention_in_days = 3
93 environment_type = "LoadBalanced"
95 # aws:elasticbeanstalk:application:environment
96 environment_variables = {
97 "AWS_ACCESS_KEY_ID" = data.vault_generic_secret.fdio_docs.data["access_key"]
98 "AWS_SECRET_ACCESS_KEY" = data.vault_generic_secret.fdio_docs.data["secret_key"]
99 "AWS_DEFAULT_REGION" = data.vault_generic_secret.fdio_docs.data["region"]