Commit d90d0129 authored by chenrui's avatar chenrui Committed by Anton Babenko

Include the module version and some code formatting (#52)

* Include the module version and some code formatting

* Explicitly specify the version for SG AWS module
parent 936c26a6
......@@ -4,17 +4,18 @@ Terraform module which creates EC2 instance(s) on AWS.
These types of resources are supported:
* [EC2 instance](https://www.terraform.io/docs/providers/aws/r/instance.html)
* [EC2 instance](https://www.terraform.io/docs/providers/aws/r/instance.html)
## Usage
```hcl
module "ec2_cluster" {
source = "terraform-aws-modules/ec2-instance/aws"
source = "terraform-aws-modules/ec2-instance/aws"
version = "1.12.0"
name = "my-cluster"
instance_count = 5
name = "my-cluster"
instance_count = 5
ami = "ami-ebd02392"
instance_type = "t2.micro"
key_name = "user1"
......@@ -67,12 +68,13 @@ data "aws_ami" "encrypted-ami" {
data "aws_ami" "ubuntu-xenial" {
most_recent = true
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"]
}
owners = ["099720109477"]
}
```
......
......@@ -34,7 +34,8 @@ data "aws_ami" "amazon_linux" {
}
module "security_group" {
source = "terraform-aws-modules/security-group/aws"
source = "terraform-aws-modules/security-group/aws"
version = "2.7.0"
name = "example"
description = "Security group for example usage with EC2 instance"
......
......@@ -34,7 +34,8 @@ data "aws_ami" "amazon_linux" {
}
module "security_group" {
source = "terraform-aws-modules/security-group/aws"
source = "terraform-aws-modules/security-group/aws"
version = "2.7.0"
name = "example"
description = "Security group for example usage with EC2 instance"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment