Skip to content
Platform & Configuration
Terraform
Terraform Module - AWS ECS

Requirements

NameVersion
terraform~> 1.11
aws~> 5.97.0

Providers

NameVersion
aws5.97.0
aws.us_east_15.97.0
random3.7.2

Modules

No modules.

Resources

NameType
aws_acm_certificate.fides_cert (opens in a new tab)resource
aws_acm_certificate.fides_cloudfront (opens in a new tab)resource
aws_acm_certificate.privacy_center_cert (opens in a new tab)resource
aws_acm_certificate.privacy_center_cloudfront (opens in a new tab)resource
aws_acm_certificate_validation.fides_cert_validation (opens in a new tab)resource
aws_acm_certificate_validation.fides_cloudfront_validation (opens in a new tab)resource
aws_acm_certificate_validation.privacy_center_cloudfront_validation (opens in a new tab)resource
aws_acm_certificate_validation.privacy_center_validation (opens in a new tab)resource
aws_cloudfront_cache_policy.fides_cdn_gvl_translations_cache (opens in a new tab)resource
aws_cloudfront_cache_policy.privacy_center_cdn_cache (opens in a new tab)resource
aws_cloudfront_distribution.fides_distribution (opens in a new tab)resource
aws_cloudfront_distribution.privacy_center_distribution (opens in a new tab)resource
aws_cloudfront_monitoring_subscription.fides_monitoring_subscription (opens in a new tab)resource
aws_cloudfront_monitoring_subscription.privacy_center_monitoring_subscription (opens in a new tab)resource
aws_cloudfront_origin_request_policy.privacy_center_cdn_origin (opens in a new tab)resource
aws_cloudwatch_log_group.fides_ecs (opens in a new tab)resource
aws_cloudwatch_log_group.fides_rds (opens in a new tab)resource
aws_cloudwatch_log_group.fides_redis (opens in a new tab)resource
aws_db_instance.postgres (opens in a new tab)resource
aws_db_subnet_group.postgres_subnet_group (opens in a new tab)resource
aws_ecs_cluster.fides (opens in a new tab)resource
aws_ecs_service.fides_web_server (opens in a new tab)resource
aws_ecs_service.fides_worker (opens in a new tab)resource
aws_ecs_service.privacy_center (opens in a new tab)resource
aws_ecs_task_definition.fides_web_server (opens in a new tab)resource
aws_ecs_task_definition.fides_worker (opens in a new tab)resource
aws_ecs_task_definition.privacy_center (opens in a new tab)resource
aws_eip.fides_eip (opens in a new tab)resource
aws_elasticache_replication_group.fides_redis (opens in a new tab)resource
aws_elasticache_subnet_group.fides_redis (opens in a new tab)resource
aws_iam_policy.ecs_execution_policy_privacy_center (opens in a new tab)resource
aws_iam_policy.ecs_task_policy_privacy_center (opens in a new tab)resource
aws_iam_policy.ecs_web_server_execution_policy (opens in a new tab)resource
aws_iam_policy.ecs_web_server_task_policy (opens in a new tab)resource
aws_iam_policy.ecs_worker_execution_policy (opens in a new tab)resource
aws_iam_policy.ecs_worker_task_policy (opens in a new tab)resource
aws_iam_role.ecs_execution_role_privacy_center (opens in a new tab)resource
aws_iam_role.ecs_task_role_privacy_center (opens in a new tab)resource
aws_iam_role.ecs_web_server_execution_role (opens in a new tab)resource
aws_iam_role.ecs_web_server_task_role (opens in a new tab)resource
aws_iam_role.ecs_worker_execution_role (opens in a new tab)resource
aws_iam_role.ecs_worker_task_role (opens in a new tab)resource
aws_iam_role.rds_enhanced_monitoring (opens in a new tab)resource
aws_iam_role_policy_attachment.ecs_web_server_execution_role_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.ecs_web_server_task_role_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.ecs_worker_execution_role_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.ecs_worker_task_role_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.privacy_center_execution_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.privacy_center_task_policy_attachment (opens in a new tab)resource
aws_iam_role_policy_attachment.rds_enhanced_monitoring (opens in a new tab)resource
aws_lb.fides_lb (opens in a new tab)resource
aws_lb.privacy_center_lb (opens in a new tab)resource
aws_lb_listener.fides (opens in a new tab)resource
aws_lb_listener.fides_https (opens in a new tab)resource
aws_lb_listener.privacy_center (opens in a new tab)resource
aws_lb_listener.privacy_center_https (opens in a new tab)resource
aws_lb_listener_certificate.fides_cert (opens in a new tab)resource
aws_lb_listener_certificate.privacy_center_cert (opens in a new tab)resource
aws_lb_listener_rule.fides (opens in a new tab)resource
aws_lb_listener_rule.privacy_center (opens in a new tab)resource
aws_lb_target_group.fides (opens in a new tab)resource
aws_lb_target_group.privacy_center (opens in a new tab)resource
aws_route53_record.fides (opens in a new tab)resource
aws_route53_record.fides_cert_validations (opens in a new tab)resource
aws_route53_record.fides_cloudfront_validations (opens in a new tab)resource
aws_route53_record.privacy_center (opens in a new tab)resource
aws_route53_record.privacy_center_cloudfront_validations (opens in a new tab)resource
aws_route53_record.privacy_center_validations (opens in a new tab)resource
aws_s3_bucket.alb_logs (opens in a new tab)resource
aws_s3_bucket.dsr (opens in a new tab)resource
aws_s3_bucket.privacy_center_config (opens in a new tab)resource
aws_s3_bucket_cors_configuration.dsr (opens in a new tab)resource
aws_s3_bucket_lifecycle_configuration.alb_logs (opens in a new tab)resource
aws_s3_bucket_lifecycle_configuration.dsr (opens in a new tab)resource
aws_s3_bucket_ownership_controls.alb_logs (opens in a new tab)resource
aws_s3_bucket_ownership_controls.dsr (opens in a new tab)resource
aws_s3_bucket_ownership_controls.privacy_center_config (opens in a new tab)resource
aws_s3_bucket_policy.alb_logs (opens in a new tab)resource
aws_s3_bucket_public_access_block.alb_logs (opens in a new tab)resource
aws_s3_bucket_public_access_block.dsr (opens in a new tab)resource
aws_s3_bucket_server_side_encryption_configuration.alb_logs (opens in a new tab)resource
aws_s3_bucket_server_side_encryption_configuration.dsr (opens in a new tab)resource
aws_s3_bucket_versioning.dsr (opens in a new tab)resource
aws_s3_object.config_css (opens in a new tab)resource
aws_s3_object.config_json (opens in a new tab)resource
aws_secretsmanager_secret.docker_credentials (opens in a new tab)resource
aws_secretsmanager_secret_version.docker_credentials (opens in a new tab)resource
aws_security_group.alb_sg (opens in a new tab)resource
aws_security_group.db_sg (opens in a new tab)resource
aws_security_group.fides_sg (opens in a new tab)resource
aws_security_group.privacy_center_sg (opens in a new tab)resource
aws_security_group.redis_sg (opens in a new tab)resource
aws_security_group.web_server_sg (opens in a new tab)resource
aws_security_group.worker_sg (opens in a new tab)resource
aws_ssm_parameter.docker_credentials (opens in a new tab)resource
aws_ssm_parameter.fides_detection_and_discovery_website_monitor_api_key (opens in a new tab)resource
aws_ssm_parameter.fides_dictionary_api_key (opens in a new tab)resource
aws_ssm_parameter.fides_drp_jwt_secret (opens in a new tab)resource
aws_ssm_parameter.fides_encryption_key (opens in a new tab)resource
aws_ssm_parameter.fides_oauth_client_id (opens in a new tab)resource
aws_ssm_parameter.fides_oauth_client_secret (opens in a new tab)resource
aws_ssm_parameter.fides_root_password (opens in a new tab)resource
aws_ssm_parameter.fides_system_scanner_pixie_api_key (opens in a new tab)resource
aws_ssm_parameter.postgres_password (opens in a new tab)resource
aws_ssm_parameter.redis_auth_token (opens in a new tab)resource
random_password.fides_drp_jwt_secret (opens in a new tab)resource
random_password.fides_encryption_key (opens in a new tab)resource
random_password.fides_oauth_client_secret (opens in a new tab)resource
random_password.fides_root_password (opens in a new tab)resource
random_password.postgres_main (opens in a new tab)resource
random_password.redis_auth_token (opens in a new tab)resource
random_uuid.fides_oauth_client_id (opens in a new tab)resource
aws_caller_identity.current (opens in a new tab)data source
aws_cloudfront_cache_policy.caching_disabled (opens in a new tab)data source
aws_cloudfront_origin_request_policy.allviewer (opens in a new tab)data source
aws_elb_service_account.main (opens in a new tab)data source
aws_iam_policy_document.ecs_execution_policy_privacy_center (opens in a new tab)data source
aws_iam_policy_document.ecs_task_assume_role (opens in a new tab)data source
aws_iam_policy_document.ecs_task_policy_privacy_center (opens in a new tab)data source
aws_iam_policy_document.ecs_web_server_execution_policy (opens in a new tab)data source
aws_iam_policy_document.ecs_web_server_task_policy (opens in a new tab)data source
aws_iam_policy_document.ecs_worker_execution_policy (opens in a new tab)data source
aws_iam_policy_document.ecs_worker_task_policy (opens in a new tab)data source
aws_iam_policy_document.rds_enhanced_monitoring (opens in a new tab)data source
aws_region.current (opens in a new tab)data source
aws_route53_zone.primary_zone (opens in a new tab)data source
aws_subnet.alternate (opens in a new tab)data source
aws_subnet.primary (opens in a new tab)data source

Inputs

NameDescriptionTypeDefaultRequired
alb_logs_retention_daysNumber of days to retain ALB access logsnumber90no
allowed_ipsA list of IP addresses/ranges that are allowed to make inbound requests to the Fides API.list(string)n/ayes
aws_regionThe AWS region to which the Fides resources will be deployed.string"us-east-1"no
cloudwatch_log_groupThe ARN of the CloudWatch Logs group to use. If not specified, one will be created.string""no
custom_domainCustom domain name to use for the CloudFront distributionstring""no
custom_domain_points_to_cdnWhether the custom domain points to the CloudFront distribution. If true, the custom domain will be added as an alias to the CloudFront distribution.boolfalseno
docker_credentialsDocker Hub credentials configuration for private images. If username and password are provided, private images will be used.object({ username = string password = string registry = string }){ "password": "", "registry": "docker.io", "username": "" }no
elasticache_auto_failoverEnable automatic failover on the Elasticache cluster.boolfalseno
elasticache_node_typeThe node type of the Fides Elasticache cluster.string"cache.t3.micro"no
environment_nameThe environment name or identifier used to delineate separate Fides instances, e.g. qa, staging, production, etc.string"staging"no
environment_typeThe environment type, prod or dev, prod is recommended for non-development environments. This controls which endpoints require authentication.string"prod"no
fides_additional_cors_originsA list of CORS origins besides the privacy center and Fides Admin UI to allow. These can also be specified in the Fides Admin UI.list(string)[]no
fides_additional_environment_variablesAdditional environment variables to be passed to the container.list(object({ name = string, value = string }))[]no
fides_alternate_subnetThe subnet ID of the alternate subnet that may contain Fides resources. This subnet should be in a different availability zone from "var.fides_primary_subnet".stringn/ayes
fides_celeryCelery configuration for Fides.object({ event_queue_prefix = optional(string, "fides_worker") task_default_queue = optional(string, "fides") }){}no
fides_consent_tcfConsent configuration for Fides. Requires a Fides Enterprise license.object({ tcf_enabled = bool # Enables the IAB Transparency and Consent Framework. This feature requires additional configuration in the privacy center as well as a Fides Enterprise license. ac_enabled = optional(bool, false) # Enables the Google Ads additional consent string. Requires TCF and a Fides Enterprise license. override_vendor_purposes = optional(bool, false) # Allows for overriding the flexible legal legal basis of some TCF purposes. tcf_publisher_country_code = optional(string, "") # The country code of the country that determines the legislation of reference. Commonly, this corresponds to the country in which the publisher's business entity is established. privacy_experiences_tcf_db_cache_enabled = optional(bool, true) # Enables caching of the TCF database in the privacy center. privacy_experiences_error_on_cache_miss = optional(bool, false) # When set to True, the privacy center will display an error message if the TCF database cache is missed. gvl_source_url = optional(string, "https://vendor-list.consensu.org/v3/vendor-list.json") # The URL from which to fetch the official GVL vendor list. }){ "tcf_enabled": false }no
fides_consent_translationsTranslation configuration for Fides.object({ enable_translations = optional(bool, false) # Enables a customer to set their own content in various languages. enable_oob_translations = optional(bool, false) # Enables translations on out-of-the-box Experiences and Notices. enable_auto_tcf_translations = optional(bool, false) # Enables automatic (server-side) translations of the minimal TCF experience response to the user's preferred language based on the Accept-Language header. WARNING: this can significantly decrease cache hit ratios and reduce performance. }){}no
fides_consent_webhook_access_token_expire_minutesThe time in minutes for which consent webhook access tokens will be valid.number129600no
fides_cors_origin_regexA regex to use to allowlist CORS origins, in addition to the 'fides_additional_cors_origins' list. For example: 'https://.*.example.com (opens in a new tab)'string""no
fides_cpuThe number of CPU units to dedicate to the Fides container.number1024no
fides_database_api_engine_keepalives_countMaximum number of TCP keepalive retries before the client considers the connection dead and closes it.number5no
fides_database_api_engine_keepalives_idleThe number of seconds to wait before sending a keepalive to the database.number30no
fides_database_api_engine_keepalives_intervalThe number of seconds to wait between keepalives.number10no
fides_database_api_engine_max_overflowThe maximum number of connections to keep open to the database.number50no
fides_database_api_engine_pool_sizeThe number of connections to keep open to the database.number50no
fides_database_task_engine_keepalives_countMaximum number of TCP keepalive retries before the client considers the connection dead and closes it.number5no
fides_database_task_engine_keepalives_idleNumber of seconds of inactivity before the client sends a TCP keepalive packet to verify the database connection is still alive.number30no
fides_database_task_engine_keepalives_intervalNumber of seconds between TCP keepalive retries if the initial keepalive packet receives no response.number10no
fides_database_task_engine_max_overflowThe maximum number of connections to keep open to the database.number50no
fides_database_task_engine_pool_sizeThe number of connections to keep open to the database.number50no
fides_detection_and_discovery_website_monitorDetection and discovery configuration for Fides.object({ enabled = optional(bool, false) service_url = optional(string, "") polling_timeout_seconds = optional(number, 300) website_monitor_results_page_size = optional(number, 100) }){}no
fides_detection_and_discovery_website_monitor_api_keyThe API key for the website monitor.string""no
fides_dictionaryCompass configuration for Fides.object({ enabled = optional(bool, false) dictionary_service_url = optional(string, "") }){}no
fides_dictionary_api_keyThe API key for the dictionary service.string""no
fides_endpoint_cache_get_property_by_path_cache_ttlThe TTL for the get property by path cache. Set to 0 to disable caching.number3600no
fides_endpoint_cache_privacy_experience_cache_ttlThe TTL for the privacy experience cache. Set to 0 to disable caching.number3600no
fides_endpoint_cache_privacy_experience_gvl_translations_cache_ttlThe TTL for the GVL translations cache. Set to 0 to disable caching.number86400no
fides_endpoint_cache_privacy_experience_meta_cache_sizeThe size of the meta cache. Set to 0 to disable caching.number1000no
fides_endpoint_cache_privacy_experience_meta_cache_ttlThe TTL for the privacy experience meta cache. Set to 0 to disable caching.number3600no
fides_execution_custom_privacy_request_fieldsAllows the collection and execution of custom privacy request fields from incoming privacy requests.object({ allow_collection = bool allow_execution = optional(bool, false) }){ "allow_collection": false, "allow_execution": false }no
fides_execution_interrupted_task_requeue_intervalSeconds between polling for interrupted tasks to requeue.number300no
fides_execution_masking_strictIf set to True, only use UPDATE requests to mask data. If False, Fides will use any defined DELETE or GDPR DELETE endpoints to remove PII, which may extend beyond the specific data categories that configured in your execution policy.boolfalseno
fides_execution_request_task_ttlThe number of seconds a Request Task should live (Privacy Request subtasks). Older request tasks will be cleaned up from completed Privacy Requests periodically.number604800no
fides_execution_state_polling_intervalThe number of seconds between a scheduled process that checks to see if a Privacy Request's subtasks have "completed" and the overall Privacy Request needs to be placed in an errored state so it can be reprocessed.number30no
fides_execution_use_dsr_3_0Enables DSR 3.0 for Fides versions <2.70.0.booltrueno
fides_identity_verificationWhether to require subject identity verification for privacy requests.boolfalseno
fides_imageThe Fides Docker image to deploy.string"ethyca/fides"no
fides_log_formatThe format of the log messages.string"json"no
fides_log_levelThe logging level of Fides.string"INFO"no
fides_memoryThe amount of memory, in MiB, to dedicate to the Fides container.number2048no
fides_primary_subnetThe subnet ID of the primary subnet that will contain Fides resources.stringn/ayes
fides_redis_default_ttl_secondsThe default TTL for Redis keys.number604800no
fides_redis_identity_verification_code_ttl_secondsThe TTL for Redis keys used for identity verification codes.number600no
fides_require_manual_request_approvalWhether to require privacy requests to be approved before processing.boolfalseno
fides_root_passwordThe root user password to create. If one is not provided, one will be generated.string""no
fides_root_userThe root username to create.string"fidesroot"no
fides_security_dsr_testing_tools_enabledWhether to enable DSR testing tools. This should be disabled in production environments.boolfalseno
fides_security_identity_verification_attempt_limitThe number of attempts allowed for identity verification.number3no
fides_security_oauth_access_token_expire_minutesThe number of minutes before the access token expires.number11520no
fides_security_public_request_rate_limit_per_minuteThe number of requests per minute allowed for the Fides API.number1000no
fides_security_request_rate_limit_per_minuteThe number of requests per minute allowed for the Fides API.number1000no
fides_system_scannerSystem scanner configuration for Fides.object({ enabled = optional(bool, false) cluster_id = optional(string, "") use_encryption = optional(bool, false) pixie_cloud_server_url = optional(string, "work.getcosmic.ai") }){}no
fides_system_scanner_pixie_api_keyThe API key for the Pixie system scanner.string""no
fides_versionThe Fides version to deploy. Must be a valid Docker tag.string"2.60.0"no
lb_nameThe name of the load balancer. If one is not provided, one will be generated.string""no
privacy_center_allow_html_descriptionAllow HTML description in privacy center.boolfalseno
privacy_center_configuration_fileThe file path of a config.json file with which to configure the Privacy Center.string""no
privacy_center_cpuThe number of CPU units to dedicate to the Privacy Center container.number512no
privacy_center_css_fileThe file path of a config.css file with which to style the Privacy Center.string""no
privacy_center_imageThe Fides Docker image to deploy.string"ethyca/fides-privacy-center"no
privacy_center_is_overlay_enabledEnable overlay mode for privacy center.booltrueno
privacy_center_memoryThe amount of memory, in MiB, to dedicate to the Privacy Center container.number1024no
privacy_center_root_property_pathRoot property path for privacy center.string""no
privacy_center_use_api_configUse API-based configuration instead of static files.boolfalseno
privacy_center_versionThe Privacy Center version to deploy. Must be a valid Docker tag.string"2.60.0"no
rds_allocated_storageThe amount of storage, in GiB, to assign to the RDS instance.number10no
rds_apply_immediatelyApply RDS changes immediately.boolfalseno
rds_instance_classThe instance class of the RDS instance.string"db.t3.micro"no
rds_multi_azConfigure RDS to use a multi-AZ deployment.boolfalseno
rds_nameThe name of the RDS instance. If one is not provided, one will be generated.string""no
rds_postgres_versionThe version of the RDS PostgreSQL engine.string"14.17"no
route53_configRoute53 DNS configuration for Fides and Privacy Center. Setting these values also creates a TLS certificate and serves traffic over port 443. In order to use these, you must have a hosted zone for the root domain.object({ existing_hosted_zone_name = string # e.g. example.com fides_subdomain = string # e.g. fides.example.com privacy_center_subdomain = string # e.g. privacy.example.com })nullno
s3_bucket_name_prefixThe prefix for all S3 buckets to ensure a globally unique name.stringn/ayes
ssm_parameter_prefixThe prefix for AWS SSM Parameter Store entries related to Fides.string"/fides"no
workersThe configuration for the worker container.list(object({ name = string queues = optional(list(string)) exclude_queues = optional(list(string)) count = optional(number, 1) cpu = number memory = number }))[ { "cpu": 1024, "memory": 2048, "name": "dsr", "queues": [ "fides.dsr" ] }, { "cpu": 512, "memory": 1024, "name": "privacy-preferences", "queues": [ "fides.privacy_preferences" ] }, { "cpu": 512, "exclude_queues": [ "fides.dsr", "fides.privacy_preferences" ], "memory": 1024, "name": "other" } ]no

Outputs

NameDescription
elasticache_arnThe primary endpoint for the Fides Redis instance.
fides_endpointThe URL of the Fides load balancer.
fides_root_passwordThe root Fides user's password.
fides_root_usernameThe root Fides user's username.
postgres_endpointThe connection endpoint for the Fides Postgres database.
privacy_center_endpointThe URL of the Privacy Center load balancer.
rds_arnThe ARN of the RDS instance.
redis_endpointThe primary endpoint for the Fides Redis instance.