diff --git a/.gitignore b/.gitignore index 2faf43d..c6a7c29 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ override.tf.json # Ignore transient lock info files created by terraform apply .terraform.tfstate.lock.info +.terraform.lock* # Include override files you do wish to add to version control using negated pattern # !example_override.tf diff --git a/README.md b/README.md index 4ee4417..f8f729a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ -# terraform-aws-Diego-Rafael_produto -Repositório produto do cenário do projeto final + +## Requirements + +| Name | Version | +|------|---------| +| [aws](#requirement\_aws) | ~> 5.0 | + +## Providers + +No providers. + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [ec2](#module\_ec2) | github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/ec2 | n/a | +| [vpc](#module\_vpc) | github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/vpc | n/a | + +## Resources + +No resources. + +## Inputs + +No inputs. + +## Outputs + +No outputs. + \ No newline at end of file diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..601c7bd --- /dev/null +++ b/main.tf @@ -0,0 +1,19 @@ +module "ec2" { + source = "github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/ec2" + instance_name_prefix = "web" + instance_web_count = 2 + subnets_map = module.vpc.subnets_map + instance_type = "t2.nano" + ebs_block_device = [ + { + device_name_root = "/dev/sda1" + volume_size_web = 8 + } + ] +} + + +module "vpc" { + source = "github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/vpc" + vpc_cidr_block = "192.168.2.0/24" +} diff --git a/provider.tf b/provider.tf new file mode 100644 index 0000000..c11f19c --- /dev/null +++ b/provider.tf @@ -0,0 +1,13 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +# Configure the AWS Provider +provider "aws" { + region = "us-east-1" +} \ No newline at end of file