https://github.com/dfds/terraform-aws-ssm-agent
This repo contains a terraform module for creating and managing AWS RDS SSM Agents
https://github.com/dfds/terraform-aws-ssm-agent
Last synced: 5 months ago
JSON representation
This repo contains a terraform module for creating and managing AWS RDS SSM Agents
- Host: GitHub
- URL: https://github.com/dfds/terraform-aws-ssm-agent
- Owner: dfds
- License: gpl-3.0
- Created: 2024-03-20T09:15:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-11T09:05:20.000Z (7 months ago)
- Last Synced: 2025-12-12T08:06:03.271Z (7 months ago)
- Language: HCL
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# aws-modules-template
Terraform module for provisioning AWS SSM Agents
# Documentation
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.6.0 |
| [aws](#requirement\_aws) | >= 6.23.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 6.23.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_iam_role.scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_instance.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
| [aws_scheduler_schedule.start_instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/scheduler_schedule) | resource |
| [aws_scheduler_schedule.stop_instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/scheduler_schedule) | resource |
| [aws_scheduler_schedule_group.schedule_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/scheduler_schedule_group) | resource |
| [aws_ami.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [aws_security_group.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group) | data source |
| [aws_subnet.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet) | data source |
| [aws_vpc.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [automation\_initiator\_location](#input\_automation\_initiator\_location) | Specify the URL to the repo of automation script.
Valid Values: URL to repo. Example: `"https://github.com/dfds/terraform-aws-rds"`
Notes: This set the dfds.automation.initiator.location tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `string` | `null` | no |
| [aws\_ami\_name](#input\_aws\_ami\_name) | Optional. Specify the name of the AMI image to use for the EC2 instance
Valid Values: Any suitable EC2 instance filter string
Notes:
- The value will be used to filter the AMI image to use for the EC2 instance.
- If not specified, it will use the default value as a filter. | `string` | `"al2023-ami-2023.*-x86_64"` | no |
| [aws\_iam\_instance\_profile](#input\_aws\_iam\_instance\_profile) | Optional. Specify the name of the IAM instance profile to use for the EC2 instance
Valid Values: Any valid IAM Instance Profile name
Notes:
- The value will be used to set the IAM instance profile for the EC2 instance.
- If not specified, it will use the default value. | `string` | `"ssm-tunnel"` | no |
| [aws\_security\_group\_name](#input\_aws\_security\_group\_name) | Optional. Specify the name of the security group to use for the EC2 instance
Valid Values: Any valid AWS Security Group name
Notes:
- The value will be used to attach the correct security group to the EC2 instance.
- If not specified, it will use the default value. | `string` | `"ssm-tunnel"` | no |
| [aws\_subnet\_name](#input\_aws\_subnet\_name) | Optional. Specify the name of the subnet to use for the EC2 instance
Valid Values: Any valid VPC Subnet name
Notes:
- The value will be used to place the EC2 instance in the correct subnet.
- If not specified, it will use the default value. | `string` | `"peering-a"` | no |
| [aws\_vpc\_name](#input\_aws\_vpc\_name) | Optional. Specify the name of the VPC to use for the EC2 instance
Valid Values: Any valid VPC name
Notes:
- The value will be used to place the EC2 instance in the correct VPC.
- If not specified, it will use the default value. | `string` | `"peering"` | no |
| [cost\_centre](#input\_cost\_centre) | Provide a cost centre for the resource.
Valid Values: .
Notes: This set the dfds.cost\_centre tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `string` | n/a | yes |
| [environment](#input\_environment) | Specify the staging environment.
Valid Values: "dev", "test", "staging", "uat", "training", "prod".
Notes: The value will set configuration defaults according to DFDS policies. | `string` | n/a | yes |
| [name](#input\_name) | Specify the name of the EC2 instance
Valid Values: Any string
Notes: The value will be used as the Name tag for the EC2 instance. | `string` | `"ssm-tunnel"` | no |
| [optional\_tags](#input\_optional\_tags) | Provide list of optional dfds.* tags to be applied on all resources.
Valid Values: .
Notes:
- Use this only for optional tags. Required tags are supplied through dedicated variables.
- See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `map(string)` | `{}` | no |
| [pipeline\_location](#input\_pipeline\_location) | Specify a valid URL path to the pipeline file used for automation script.
Valid Values: URL to repo. Example: `"https://github.com/dfds/terraform-aws-rds/actions/workflows/qa.yml"`
Notes: This set the dfds.automation.initiator.pipeline tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `string` | `null` | no |
| [regional\_postfix](#input\_regional\_postfix) | Enable region as postfix in resources names where applicable
Valid Values: true, false
Notes: If set to true, the region will be added as a postfix to the resource names. | `bool` | `false` | no |
| [resource\_owner\_contact\_email](#input\_resource\_owner\_contact\_email) | Provide an email address for the resource owner (e.g. team or individual).
Valid Values: .
Notes: This set the dfds.owner tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `string` | `null` | no |
| [service\_availability](#input\_service\_availability) | Specify service availability.
Valid Values: low, medium, high
Notes: This set the dfds.service.availability tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | `string` | n/a | yes |
| [sleep\_schedule](#input\_sleep\_schedule) | Specify the cron expression for the sleep schedule
Valid Values: Any valid cron expression
Notes: The cron expression will be used to stop the EC2 instance running the SSM agent | `string` | `"cron(0 18 ? * MON-FRI *)"` | no |
| [sleep\_schedule\_is\_enabled](#input\_sleep\_schedule\_is\_enabled) | Enable or disable the sleep schedule.
Valid Values: true, false
Notes:
- If set to true, the wakeup and sleep schedule will take effect based on be enabled schedules specified in wakeup\_schedule and sleep\_schedule variables.
- If set to false, the EC2 instance will be running 24/7. | `bool` | `true` | no |
| [wakeup\_schedule](#input\_wakeup\_schedule) | Specify the cron expression for the wakeup schedule
Valid Values: Any valid cron expression
Notes: The cron expression will be used to start the EC2 instance running the SSM agent | `string` | `"cron(0 8 ? * MON-FRI *)"` | no |
## Outputs
| Name | Description |
|------|-------------|
| [connection\_command](#output\_connection\_command) | n/a |
| [instance\_id](#output\_instance\_id) | n/a |