Skip to content

Commit

Permalink
Merge pull request #11 from descomplicando-terraform/chore/refatoraca…
Browse files Browse the repository at this point in the history
…o-modulos-docs

chore/refatoracao-modulos-docs
  • Loading branch information
diegodrk authored Sep 26, 2024
2 parents da70e21 + 2d91c48 commit 1348408
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/terraform_plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

# Definir as credenciais da AWS com base no ambiente (dev ou prod)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY_ID: ${{ vars.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

steps:
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Set up Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.3.0
terraform_version: 1.9.5

- name: Terraform Init
run: terraform init # Executa terraform init na raiz do projeto
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ No providers.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_ec2"></a> [ec2](#module\_ec2) | github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/ec2 | n/a |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/vpc | n/a |
| <a name="module_groundwork"></a> [groundwork](#module\_groundwork) | ../terraform-aws-Diego-Rafael_groundwork | n/a |

## Resources

Expand Down
13 changes: 4 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
module "vpc" {
source = "github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/vpc"
vpc_cidr_block = "192.168.3.0/24"
}

module "ec2" {
source = "github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork/ec2"
subnets_map = module.vpc.subnets_map
vpc_terraform = module.vpc.vpc_terraform
module "groundwork" {
source = "github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_groundwork"
vpc_cidr_block = "192.168.3.0/24"
subnets_map = module.groundwork.subnets_map
instance_name_prefix = "docker"
instance_docker_count = 2
instance_type = "t2.nano"
Expand Down
8 changes: 8 additions & 0 deletions provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ terraform {
version = "~> 5.0"
}
}
required_version = ">= 1.9.5"
}

# Configure the AWS Provider
provider "aws" {
region = "us-east-1"
default_tags {
tags = {
Owner = "diegodrk"
ManagedBy = "terraform"
Project = "https://github.com/descomplicando-terraform/terraform-aws-Diego-Rafael_produto/"
}
}
}

0 comments on commit 1348408

Please sign in to comment.