Skip to content

Commit

Permalink
fix: adicionando mudanças do tfsec e tf docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gomex committed Jul 16, 2024
1 parent d2c3a0f commit 6f0a0f2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- Adicionar teste automatizado no pipeline
- Colocar tfsec para enviar relatório para github security
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [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 |
|------|-------------|------|---------|:--------:|
| <a name="input_ebs_block_devices"></a> [ebs\_block\_devices](#input\_ebs\_block\_devices) | lista de volumes ebs para ser criado e montando na instancia | `list(any)` | `[]` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Ambiente da instancia | `string` | `"dev"` | no |
| <a name="input_nome"></a> [nome](#input\_nome) | Nome da instancia | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_public_ip"></a> [public\_ip](#output\_public\_ip) | IPs públicos |
<!-- END_TF_DOCS -->
6 changes: 5 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f0a0f2

Please sign in to comment.