Skip to content
Terraform
Terraform Module - AWS ECS

Terraform Module for AWS ECS

The following Terraform module is used to deploy Fides and Privacy Center to AWS ECS using RDS and Elasticache.

Requirements

NameVersion
terraform~> 1.2
aws~> 4.47

Providers

NameVersion
aws4.47.0
random3.4.3

Modules

No modules.

Resources

NameType
aws_acm_certificate.fides_cert (opens in a new tab)resource
aws_acm_certificate.privacy_center_cert (opens in a new tab)resource
aws_acm_certificate_validation.fides_cert_validation (opens in a new tab)resource
aws_acm_certificate_validation.privacy_center_validation (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 (opens in a new tab)resource
aws_ecs_service.privacy_center (opens in a new tab)resource
aws_ecs_task_definition.fides (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_task_policy (opens in a new tab)resource
aws_iam_policy.ecs_task_policy_privacy_center (opens in a new tab)resource
aws_iam_role.ecs_role (opens in a new tab)resource
aws_iam_role.ecs_role_privacy_center (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.privacy_center (opens in a new tab)resource
aws_route53_record.privacy_center_validations (opens in a new tab)resource
aws_s3_bucket.privacy_center_config (opens in a new tab)resource
aws_s3_bucket_acl.privacy_center_config (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_security_group.fides_sg (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.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_iam_policy_document.ecs_task_assume_role (opens in a new tab)data source
aws_iam_policy_document.ecs_task_policy (opens in a new tab)data source
aws_iam_policy_document.ecs_task_policy_privacy_center (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
allowed_ipsA list of IP addresses/ranges that are allowed to make inbound requests to the Fidesops 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
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 devstring"dev"no
fides_additional_cors_originsA list of CORS origins besides the privacy center and Fides Admin UI to allow.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_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_identity_verificationWhether to require subject identity verification for privacy requests.boolfalseno
fides_imageThe Fides Docker image to deploy.string"ethyca/fides"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_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_versionThe Fides version to deploy. Must be a valid Docker tag.string"2.24.1"no
lb_nameThe name of the load balancer. If one is not provided, one will be generated.string""no
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_memoryThe amount of memory, in MiB, to dedicate to the Privacy Center container.number1024no
privacy_center_versionThe Privacy Center version to deploy. Must be a valid Docker tag.string"2.24.1"no
rds_allocated_storageThe amount of storage, in GiB, to assign to the RDS instance.number10no
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"13.7"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 })n/ayes
ssm_parameter_prefixThe prefix for AWS SSM Parameter Store entries related to Fides.string"/fides"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.