Skip to content

insight-infrastructure/terraform-aws-ansible-docker-compose

Repository files navigation

terraform-aws-ansible-docker-compose

open-issues open-pr

Features

This module sets up a generic ec2 instance with an ansible role.

Terraform Versions

For Terraform v0.12.0+

Usage

module "this" {
    source = "github.com/insight-infrastructure/terraform-aws-ansible-docker-compose"

}

Examples

Known Issues

No issue is creating limit on this module.

Requirements

No requirements.

Providers

Name Version
aws n/a
local n/a
random n/a

Inputs

Name Description Type Default Required
additional_roles A list of role names from Ansible Galaxy to include list(string) null no
additional_security_groups List of additional security groups list(string) [] no
certbot_admin_email Admin email for SSL cert - must be in same domain string "" no
create Boolean to determine if you should create the instance or destroy all associated resources bool true no
create_ansible Bool to create ansible bool true no
create_dns Bool to create dns record bool false no
create_iam Bool to create IAM instance profile string false no
create_security_group Bool to create security group bool true no
domain_name The domain name string "" no
hostname The hostname - ie hostname.example.com string "" no
iam_managed_policies A list of managed policies to associate with instance profile list(string) [] no
instance_profile_id The id of the instance profile to associat with instance string "" no
instance_type Instance type string "t2.medium" no
json_policy A json policy to associate with instance string "" no
json_policy_name A name to associate with json policy. Blank to autogenerate string null no
key_name The key pair to import string "" no
name A unique id for the deployment string "" no
open_ports A list of open ports list(string) [] no
playbook_vars Extra vars to include, can be hcl or json map(string) {} no
private_key_path The path to the private ssh key string n/a yes
public_key_path The path to the public ssh key string n/a yes
root_volume_size Root volume size string 8 no
ssh_ips List of IPs to restrict ssh traffic to list(string) null no
subnet_id The id of the subnet. Must be supplied if given vpc_id string null no
tags Tags that are added to resources map(string) {} no
vpc_id The vpc id to associate with. Must be supplied if given subnet_id string "" no

Outputs

Name Description
fqdn n/a
instance_id The instance ID created
instance_profile_id The key pair name created
key_name The key pair name created
public_ip The public IP of the instance created

Testing

This module has been packaged with terratest tests

To run them:

  1. Install Go
  2. Run make test-init from the root of this repo
  3. Run make test again from root

Authors

Module managed by insight-infrastructure

Credits

License

Apache 2 Licensed. See LICENSE for full details.

About

Generic ec2 instance with ansible and docker-compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published