1
0
Fork 0

module variable

This commit is contained in:
Cedric Girard 2020-05-13 10:45:51 +02:00
parent f5acff9695
commit d5c8bb24a0
Signed by: X-dark
GPG Key ID: E7D0E125DB9519E4
2 changed files with 6 additions and 2 deletions

View File

@ -2,11 +2,14 @@ provider "aws" {
region = "eu-west-2"
}
resource "aws_instance" "cedric-instance1" {
variable "instance_name" {}
resource "aws_instance" "instance1" {
ami = "ami-01a6e31ac994bbc09"
instance_type = "t2.micro"
key_name = "cedric"
tags = {
Name = "cedric-module-instance1"
Name = "${var.instance_name}"
}
}

View File

@ -1,3 +1,4 @@
module "my_module" {
source = "../module1"
instance_name = "cedric-instance1"
}