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
...@@ -11,6 +11,7 @@ These types of resources are supported: ...@@ -11,6 +11,7 @@ These types of resources are supported:
```hcl ```hcl
module "ec2_cluster" { module "ec2_cluster" {
source = "terraform-aws-modules/ec2-instance/aws" source = "terraform-aws-modules/ec2-instance/aws"
version = "1.12.0"
name = "my-cluster" name = "my-cluster"
instance_count = 5 instance_count = 5
...@@ -67,12 +68,13 @@ data "aws_ami" "encrypted-ami" { ...@@ -67,12 +68,13 @@ data "aws_ami" "encrypted-ami" {
data "aws_ami" "ubuntu-xenial" { data "aws_ami" "ubuntu-xenial" {
most_recent = true most_recent = true
owners = ["099720109477"]
filter { filter {
name = "name" name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"] values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"]
} }
owners = ["099720109477"]
} }
``` ```
......
...@@ -35,6 +35,7 @@ data "aws_ami" "amazon_linux" { ...@@ -35,6 +35,7 @@ data "aws_ami" "amazon_linux" {
module "security_group" { module "security_group" {
source = "terraform-aws-modules/security-group/aws" source = "terraform-aws-modules/security-group/aws"
version = "2.7.0"
name = "example" name = "example"
description = "Security group for example usage with EC2 instance" description = "Security group for example usage with EC2 instance"
......
...@@ -35,6 +35,7 @@ data "aws_ami" "amazon_linux" { ...@@ -35,6 +35,7 @@ data "aws_ami" "amazon_linux" {
module "security_group" { module "security_group" {
source = "terraform-aws-modules/security-group/aws" source = "terraform-aws-modules/security-group/aws"
version = "2.7.0"
name = "example" name = "example"
description = "Security group for example usage with EC2 instance" 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