diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8405a28..98dd5f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.89.0 + rev: v1.96.1 hooks: - id: terraform_fmt - id: terraform_validate @@ -10,6 +10,7 @@ repos: args: - --hook-config=--add-to-existing-file=true - --hook-config=--create-file-if-not-exist=true + - --hook-config=--use-standard-markers=true - id: terraform_tflint args: - '--args=--only=terraform_deprecated_interpolation' diff --git a/README.md b/README.md index ca5e937..45c311b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ resource "aws_instance" { } ``` - + ## Requirements | Name | Version | @@ -58,4 +58,4 @@ No modules. | [sg\_id](#output\_sg\_id) | Default Security Group id. | | [subnet\_ids](#output\_subnet\_ids) | List of default Subnet ids. | | [vpc\_id](#output\_vpc\_id) | Default VPC id. | - + diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..0d164b2 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,45 @@ +# Default VPC + +This example creates an AWS de default VPC. + +## Usage + +To run this example you need to execute: + +```bash +terraform init +terraform plan +terraform apply +``` + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >=1.0 | +| [aws](#requirement\_aws) | >=5.0 | + +## Providers + +No providers. + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [vpc](#module\_vpc) | ../ | n/a | + +## Resources + +No resources. + +## Inputs + +No inputs. + +## Outputs + +| Name | Description | +|------|-------------| +| [module](#output\_module) | VPC module outputs | + diff --git a/examples/main.tf b/examples/main.tf new file mode 100644 index 0000000..d61a0cd --- /dev/null +++ b/examples/main.tf @@ -0,0 +1,15 @@ +# main.tf + +provider "aws" { + default_tags { + tags = { + Project = "ex-${basename(path.cwd)}" + Iac = "terraform" + } + } +} + +module "vpc" { + source = "../" + force_destroy = true +} diff --git a/examples/outputs.tf b/examples/outputs.tf new file mode 100644 index 0000000..095271b --- /dev/null +++ b/examples/outputs.tf @@ -0,0 +1,4 @@ +output "module" { + description = "VPC module outputs" + value = module.vpc +} diff --git a/examples/variables.tf b/examples/variables.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/versions.tf b/examples/versions.tf new file mode 100644 index 0000000..19ff4cf --- /dev/null +++ b/examples/versions.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">=1.0" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">=5.0" + } + } +}