This Terraform module adds a security group rule that allows traffic from a node. This is a simplistic module created for Consul-Terraform-Sync demoing purposes.
This module uses the AWS Terraform provider to create a new security group rule, allowing ingress TCP traffic on all ports from an EC2 instance.
Ecosystem | Version |
---|---|
consul | >= 1.7 |
consul-terraform-sync | >= 0.1.0 |
terraform | >= 0.13 |
Name | Version |
---|---|
aws | >= 3.56 |
- Create an AWS security group.
Input Variable | Required | Description |
---|---|---|
security_group_id | true | The ID of the security group |
User Config for Consul Terraform Sync
example.hcl
task {
name = "security-group-demo-task"
description = "allow all ingress TCP traffic to a security group"
source = "mkam/security-group-demo/aws"
version = "0.1.0"
providers = ["aws"]
services = ["web", "app"]
variable_files = ["security_input.tfvars"]
}
driver "terraform" {
required_providers = {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.56.0"
}
}
}
terraform_provider "aws" {
region = "us-west-1"
}
Variable file
Optional input variable file defined by a user for the task above.
security_input.tfvars
security_group_id = "sg-123"