From 6f0a0f20531539735214fba61374060c8299d2b8 Mon Sep 17 00:00:00 2001 From: Rafael Gomes Date: Tue, 16 Jul 2024 00:49:05 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20adicionando=20mudan=C3=A7as=20do=20tfsec?= =?UTF-8?q?=20e=20tf=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- main.tf | 6 +++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32f6b8f..e42d8ca 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,43 @@ Módulo para criação do ambiente sugerido pelo professor # TODO ( Para fazer) - Uma etapa do pipeline que atualize automaticamente a versão do example - - Adicionar teste automatizado no pipeline \ No newline at end of file + - Adicionar teste automatizado no pipeline + - Colocar tfsec para enviar relatório para github security + +## Requirements + +| Name | Version | +|------|---------| +| [aws](#requirement\_aws) | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | ~> 5.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [aws_instance.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource | +| [aws_ami.ubuntu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [ebs\_block\_devices](#input\_ebs\_block\_devices) | lista de volumes ebs para ser criado e montando na instancia | `list(any)` | `[]` | no | +| [environment](#input\_environment) | Ambiente da instancia | `string` | `"dev"` | no | +| [nome](#input\_nome) | Nome da instancia | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [public\_ip](#output\_public\_ip) | IPs públicos | + diff --git a/main.tf b/main.tf index fa9b0a1..98d6217 100644 --- a/main.tf +++ b/main.tf @@ -13,11 +13,15 @@ data "aws_ami" "ubuntu" { } } - +#tfsec:ignore:aws-ec2-enforce-http-token-imds:exp:2025-01-02 resource "aws_instance" "this" { ami = data.aws_ami.ubuntu.id instance_type = "t3.micro" + root_block_device { + encrypted = true + } + dynamic "ebs_block_device" { for_each = var.ebs_block_devices iterator = device