From f5acff96951a0e2d046338acf4d6ffbec622787c Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 13 May 2020 10:26:38 +0200 Subject: [PATCH] local module usage --- module1/module1.tf | 12 ++++++++++++ project4/base.tf | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 module1/module1.tf create mode 100644 project4/base.tf diff --git a/module1/module1.tf b/module1/module1.tf new file mode 100644 index 0000000..e4c8ec4 --- /dev/null +++ b/module1/module1.tf @@ -0,0 +1,12 @@ +provider "aws" { + region = "eu-west-2" +} + +resource "aws_instance" "cedric-instance1" { + ami = "ami-01a6e31ac994bbc09" + instance_type = "t2.micro" + key_name = "cedric" + tags = { + Name = "cedric-module-instance1" + } +} diff --git a/project4/base.tf b/project4/base.tf new file mode 100644 index 0000000..be928a2 --- /dev/null +++ b/project4/base.tf @@ -0,0 +1,3 @@ +module "my_module" { + source = "../module1" +}