Skip to content

Instantly share code, notes, and snippets.

@joe11051105
Created February 14, 2019 07:37
Show Gist options
  • Save joe11051105/4fa0f07b5d089fa874e42eb112681b65 to your computer and use it in GitHub Desktop.
Save joe11051105/4fa0f07b5d089fa874e42eb112681b65 to your computer and use it in GitHub Desktop.
terraform {
backend "s3" {}
}
provider "aws" {
region = "ap-southeast-1"
shared_credentials_file = "~/.aws/credentials"
}
data "aws_vpc" "default" {
default = true
}
data "aws_security_group" "default" {
name = "default"
vpc_id = "${data.aws_vpc.default.id}"
}
module "security_group" {
source = "terraform-aws-modules/security-group/aws"
use_name_prefix = false
name = "SG-UAT-SSH"
vpc_id = "${data.aws_vpc.default.id}"
tags {
Name = "SG-UAT-SSH"
}
ingress_rules = ["ssh-tcp"]
ingress_cidr_blocks = ["0.0.0.0/0"]
egress_rules = ["all-all"]
egress_cidr_blocks = ["0.0.0.0/0"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment