chore: example added
This commit is contained in:
1 parent
a727253f13
commit
d1873d1e1a
7 files changed
+78
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/antonbabenko/pre-commit-terraform
|
- repo: https://github.com/antonbabenko/pre-commit-terraform
|
||||||
rev: v1.89.0
|
rev: v1.96.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: terraform_fmt
|
- id: terraform_fmt
|
||||||
- id: terraform_validate
|
- id: terraform_validate
|
||||||
@@ -10,6 +10,7 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --hook-config=--add-to-existing-file=true
|
- --hook-config=--add-to-existing-file=true
|
||||||
- --hook-config=--create-file-if-not-exist=true
|
- --hook-config=--create-file-if-not-exist=true
|
||||||
|
- --hook-config=--use-standard-markers=true
|
||||||
- id: terraform_tflint
|
- id: terraform_tflint
|
||||||
args:
|
args:
|
||||||
- '--args=--only=terraform_deprecated_interpolation'
|
- '--args=--only=terraform_deprecated_interpolation'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ resource "aws_instance" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|
<!-- BEGIN_TF_DOCS -->
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
| Name | Version |
|
| 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_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_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. |
|
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | Default VPC id. |
|
||||||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|
<!-- END_TF_DOCS -->
|
||||||
@@ -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 -->
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# main.tf
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
default_tags {
|
||||||
|
tags = {
|
||||||
|
Project = "ex-${basename(path.cwd)}"
|
||||||
|
Iac = "terraform"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module "vpc" {
|
||||||
|
source = "../"
|
||||||
|
force_destroy = true
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
output "module" {
|
||||||
|
description = "VPC module outputs"
|
||||||
|
value = module.vpc
|
||||||
|
}
|
||||||
Whitespace-only changes.
@@ -0,0 +1,10 @@
|
|||||||
|
terraform {
|
||||||
|
required_version = ">=1.0"
|
||||||
|
|
||||||
|
required_providers {
|
||||||
|
aws = {
|
||||||
|
source = "hashicorp/aws"
|
||||||
|
version = ">=5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user