Creating an EC2 instance
#
OverviewThis module deploys EC2 instances in the opionated way that we use them in Hackney. It supports the deployment of a Bastion host for external access and is also pre-configured to enable connection to AppStream.
#
UsageDeclare the module and provide the required inputs and optional inputs as needed:
The ec2_instances
is a map
variable that defines the required EC2 configuration. This could be read from external YAML or JSON files, using yamldecode()
or jsondecode()
functions:
Alternatively, the variable can be defined inside a tfvars
file or constructed dynamically. Below are some example configurations:
HCL
YAML:
JSON
#
Required Module VariablesSee 01-inputs-required.tf
#
Optional Module VariablesSee 02-inputs-optional.tf
#
Module Output VariablesSee 99-outputs.tf