## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= v1.3.9 |
| [aws](#requirement\_aws) | >= 4.56.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 4.56.0 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| [cdu\_efs](#module\_cdu\_efs) | github.com/aws-samples/aws-tf-efs//modules/aws/efs | v1.0.0 |
| [cdu\_kms](#module\_cdu\_kms) | github.com/aws-samples/aws-tf-kms//modules/aws/kms | v1.0.0 |
## Resources
| Name | Type |
|------|------|
| [aws_autoscaling_group.cdu_asg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) | resource |
| [aws_cloudwatch_log_group.cdu_logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_iam_instance_profile.cdu_node_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_role.cdu_node_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.cdu_node_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_launch_template.cdu_lt](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) | resource |
| [aws_lb.cdu_nlb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) | resource |
| [aws_lb_listener.cdu_listener](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener) | resource |
| [aws_lb_target_group.cdu_tg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |
| [aws_route53_record.cdu_rec_ipv4](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_route53_record.cdu_rec_ipv6](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_s3_object.cdu_extra_file](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |
| [aws_s3_object.cdu_extra_files](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |
| [aws_s3_object.required_file](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |
| [aws_security_group.cdu_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group_rule.allow_cdu_ingress_to_efs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.egress_cdu_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.ingress_cdu_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_ssm_parameter.cert_password](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |
| [aws_ssm_parameter.keystore_password](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [cdu\_params](#input\_cdu\_params) | Connect:Direct Unix Node Parameters.
- `node_name`, required. Name of the C:D node. e.g. "USLDCDUC01"
- `s3_bucket`, required. Amazon S3 bucket name used for storing C:D Unix installation/config files. It may be same as the Terraform bootstrap bucket.
- `cd_bin`, optional. IBM Connect:Direct installation file. Default "IBM\_CD\_V6.2\_UNIX\_RedHat.Z.tar.Z"
- `secret_key_prefix`, optional. System Manager Parameter Store key prefix used to store `cdu_secrets`. Default "/`project`/`env_name`/cdu"
- `server_keycert`, optional. Name of the server keycert file. Default "`lower(node_name)`.cdu-keycert.txt"
- `root_cert`, optional. Name of the root certificate file. Default "ca-cert.cer"
- `issuing_cert`, optional. Name of the issuer certificate file. Default "issuer-cert.cer"
- `netmap_file`, optional. Name of the `netmap` file (e.g. "netmap\_a.cfg") in the "./`node_name`" folder. Default ""
- `users_file`, optional. Name of the `userfile` file (e.g. "userfile\_a.cfg") in the "./`node_name`" folder. Default ""
- `global_folder`, optional. Global folder where C:D installation will be linked to. Default "/opt/IBM/ConnectDirect"
- `local_folder`, optional. Local folder where C:D installation will be linked to. Default "/home/cdadmin"
- `cdadmin_uid`, optional. POSIX UID for the cdadmin user. Default 2001
- `cdadmin_gid`, optional.POSIX GID for the cdadmin user. Default 2001
- `overwrite`, optional. Should existing installing be overwritten "Y" or "N". Default "Y"
If any of the `cdu_params` are changed, then `overwrite` should be "Y" for the changes to take effect.
- `cw_log_group`, optional. Amazon CloudWatch log group where C:D server logs will be sent. Default "/`project`/`env_name`/cdu/`node_name`"
- `proxy_url`, optional. Proxy server URL, if your environment is using proxy server. Default `"NONE"` |
object({| n/a | yes | | [env\_name](#input\_env\_name) | Environment name e.g. dev, prod | `string` | n/a | yes | | [project](#input\_project) | Project name (prefix/suffix) to be used on all the resources identification | `string` | n/a | yes | | [region](#input\_region) | The AWS Region e.g. us-east-1 for the environment | `string` | n/a | yes | | [subnet\_tags](#input\_subnet\_tags) | Tags to discover target subnets in the VPC, these tags should identify one or more subnets | `map(string)` | n/a | yes | | [tags](#input\_tags) | Common and mandatory tags for the resources | `map(string)` | n/a | yes | | [vpc\_tags](#input\_vpc\_tags) | Tags to discover target VPC, these tags should uniquely identify a VPC | `map(string)` | n/a | yes | | [cdu\_efs\_specs](#input\_cdu\_efs\_specs) | Connect:Direct Unix EFS storage specification.
node_name = string
s3_bucket = string
cd_bin = optional(string)
secret_key_prefix = optional(string)
server_keycert = optional(string)
root_cert = optional(string)
issuing_cert = optional(string)
netmap_file = optional(string)
users_file = optional(string)
global_folder = optional(string)
local_folder = optional(string)
cdadmin_uid = optional(number)
cdadmin_gid = optional(number)
overwrite = optional(string)
cw_log_group = optional(string)
proxy_url = optional(string)
})
object({|
efs_id = string
efs_root = string
security_group_tags = map(string)
encrypted = bool
kms_alias = string
})
{| no | | [cdu\_encryption](#input\_cdu\_encryption) | Connect:Direct Unix solution encryption specification
"efs_id": null,
"efs_root": null,
"encrypted": true,
"kms_alias": null,
"security_group_tags": null
}
object({|
encrypted = bool
ebs_kms_alias = string
logs_kms_alias = string
ssm_kms_alias = string
})
{| no | | [cdu\_extra\_files](#input\_cdu\_extra\_files) | List of Connect:Direct Unix extra files that will be copied over to IBM C:D Unix server. These files may be tokenized files, where tokens will be replaced.
"ebs_kms_alias": "",
"encrypted": true,
"logs_kms_alias": "",
"ssm_kms_alias": ""
}
object({| `null` | no | | [cdu\_host\_specs](#input\_cdu\_host\_specs) | Connect:Direct Unix Host specification.
tokens = list(object({
name = string
value = string
}))
files = list(object({
source = string
target = string
}))
})
object({|
image_id = string
instance_type = string
ec2_instance_profile = string
ssh_key_name = string
enable_detailed_monitoring = bool
backup_plan = string
})
{| no | | [cdu\_ingress](#input\_cdu\_ingress) | Connect:Direct Unix ingress specifications.
"backup_plan": "",
"ec2_instance_profile": "",
"enable_detailed_monitoring": false,
"image_id": "",
"instance_type": "m5.large",
"ssh_key_name": ""
}
object({|
source_cidrs = list(string)
ingress_ports = list(string)
})
{| no | | [cdu\_lb\_target\_ports](#input\_cdu\_lb\_target\_ports) | Connect:Direct Unix Load-Balancer target(s) specifications.
"ingress_ports": [
"1363",
"1364",
"1365"
],
"source_cidrs": [
"0.0.0.0/0"
]
}
list(object({|
purpose = string
protocol = string
port = number
deregistration_delay = number
preserve_client_ip = bool
hc_protocol = string
hc_port = number
hc_interval = number
hc_healthy_threshold = number
hc_unhealthy_threshold = number
}))
[| no | | [cdu\_secrets](#input\_cdu\_secrets) | Connect:Direct Unix Secrets. These secrets are created in the System Manager Parameter Store.
{
"deregistration_delay": 300,
"hc_healthy_threshold": 3,
"hc_interval": 30,
"hc_port": 1365,
"hc_protocol": "TCP",
"hc_unhealthy_threshold": 3,
"port": 1363,
"preserve_client_ip": true,
"protocol": "TCP",
"purpose": "cli"
},
{
"deregistration_delay": 300,
"hc_healthy_threshold": 3,
"hc_interval": 30,
"hc_port": 1365,
"hc_protocol": "TCP",
"hc_unhealthy_threshold": 3,
"port": 1364,
"preserve_client_ip": true,
"protocol": "TCP",
"purpose": "comm"
},
{
"deregistration_delay": 300,
"hc_healthy_threshold": 3,
"hc_interval": 30,
"hc_port": 1365,
"hc_protocol": "TCP",
"hc_unhealthy_threshold": 3,
"port": 1365,
"preserve_client_ip": true,
"protocol": "TCP",
"purpose": "fa"
}
]
object({| `null` | no | | [enable\_dual\_stack](#input\_enable\_dual\_stack) | Enable Dual Stack IPV4/IPV6 for the C:D Unix server and load-balancer. This is experimental. | `bool` | `false` | no | | [kms\_admin\_roles](#input\_kms\_admin\_roles) | List Administrator roles for KMS.
cert_password = string
keystore_password = string
})