Skip to content

Commit

Permalink
Remove duplicate variables and add required variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Oct 10, 2024
1 parent 6b49914 commit 9178232
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 136 deletions.
130 changes: 130 additions & 0 deletions modules/postgres-etl/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,74 @@
variable "aws_account_id" {
type = string
description = "ID of the account into which deployments are performed"
}

variable "aws_region" {
type = string
description = "Region for resource deployment"
}

variable "db_clients_security_group_id" {
type = string
description = "ID of VPC security group, membership of which allows access to the Postgres db"
}

variable "db_etl_fs_clients" {
type = string
description = "Entities permitted to access the EFS filesystem"
}

variable "ecs_cluster_arn" {
type = string
description = "ARN of cluster into which tasks will be deployed"
}

variable "ecs_extract_execution_role" {
type = object({
arn = string
name = string
})
description = "Details of the role which is assumed by the ECS execution processes"
}

variable "ecs_load_execution_role" {
type = object({
arn = string
name = string
})
description = "Details of the role which is assumed by the ECS execution processes"
}

variable "ecs_load_execution_role" {
type = object({
arn = string
name = string
})
description = "Details of the role which is assumed by the ECS execution processes"
}

variable "efs_subnet_ids" {
type = set(string)
default = []
description = "IDs of the subnest in which to create the EFS mount points"
}

variable "efs_access_point_id" {
type = string
description = "ID of the EFS access point"
}

variable "efs_file_system_id" {
type = string
description = "ID of the EFS file system"
}

variable "extract_task_cpu" {
type = number
default = 8192
description = "CPU resource to allocate to the extract task, in millicores"
}

variable "enable_extract" {
type = bool
description = "Whether to enable the extract task"
Expand All @@ -19,6 +85,60 @@ variable "environment_name" {
description = "Name of the environment in which the migrator is running"
}

variable "extract_task_memory" {
type = number
default = 16384
description = "Memory resource to allocate to the extract task, in MiB"
}

variable "load_task_cpu" {
type = number
default = 8192
description = "CPU resource to allocate to the load task, in millicores"
}

variable "load_task_memory" {
type = number
default = 16384
description = "Memory resource to allocate to the load task, in MiB"
}

variable "load_task_pgrestore_workers" {
type = number
default = 8
description = "Number of pgrestore workers, one per CPU core"
}

variable "migrator_name" {
description = "A name to distinguish this migrator"
type = string
}

variable "postgres_docker_image" {
type = string
description = "Canonical name of the Docker image from which to run psql"
}

variable "resource_name_prefixes" {
type = object({
normal = string,
hyphens = string,
hyphens_lower = string
})
description = "Prefix to apply to resources in AWS; options provided to satisfy divergent naming requirements across AWS"
}

variable "s3_extract_bucket_name" {
description = "Name of the S3 bucket to use for dumping the Postgres DB for ETL purposes"
type = string
}

variable "s3_load_bucket_name" {
description = "Name of the S3 bucket to use for loading the Postgres DB for ETL purposes"
type = string
default = ""
}

variable "source_db_connection_url_ssm_param_arn" {
type = string
description = "ARN of SSM param which contains the connection URL for the source Postgres database"
Expand All @@ -28,3 +148,13 @@ variable "destination_db_connection_url_ssm_param_arn" {
type = string
description = "ARN of SSM param which contains the connection URL for the source Postgres database"
}

variable "subnet_ids" {
type = set(string)
description = "IDs of the subnets in which to run the download/restore ECS tasks"
}

variable "vpc_id" {
type = string
description = "ID of the VPC in which to run the download/restore ECS tasks"
}
136 changes: 0 additions & 136 deletions modules/postgres-etl/variables2.tf

This file was deleted.

0 comments on commit 9178232

Please sign in to comment.