chore: example added

This commit is contained in:
David FILLON committed 2024-09-23 16:11:38 +02:00
1 parent a727253f13
commit d1873d1e1a
7 files changed
+78 -3

No files matched your search

+2 -1
View File
@@ -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'
+2 -2
View File
@@ -15,7 +15,7 @@ resource "aws_instance" {
}
```
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
@@ -58,4 +58,4 @@ No modules.
| <a name="output_sg_id"></a> [sg\_id](#output\_sg\_id) | Default Security Group id. |
| <a name="output_subnet_ids"></a> [subnet\_ids](#output\_subnet\_ids) | List of default Subnet ids. |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | Default VPC id. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
+45
View File
@@ -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
```
<!-- BEGIN_TF_DOCS -->
## Requirements
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >=1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >=5.0 |
## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../ | n/a |
## Resources
No resources.
## Inputs
No inputs.
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_module"></a> [module](#output\_module) | VPC module outputs |
<!-- END_TF_DOCS -->
+15
View File
@@ -0,0 +1,15 @@
# main.tf
provider "aws" {
default_tags {
tags = {
Project = "ex-${basename(path.cwd)}"
Iac = "terraform"
}
}
}
module "vpc" {
source = "../"
force_destroy = true
}
+4
View File
@@ -0,0 +1,4 @@
output "module" {
description = "VPC module outputs"
value = module.vpc
}
View File
Whitespace-only changes.
+10
View File
@@ -0,0 +1,10 @@
terraform {
required_version = ">=1.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">=5.0"
}
}
}