-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Weyder Ferreira
committed
Dec 1, 2022
1 parent
427a5c3
commit 807102e
Showing
8 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Simple & clean modules to use. | |
|
||
## Contents | ||
|
||
- ACM | ||
- AMI | ||
- Cloudfront | ||
- Cloudwatch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_acm_certificate.acm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | (Required) Domain name for which the certificate should be issued | `string` | n/a | yes | | ||
| <a name="input_tags"></a> [tags](#input\_tags) | The resource tag | `map(string)` | `{}` | no | | ||
| <a name="input_validation_method"></a> [validation\_method](#input\_validation\_method) | (Required) Which method to use for validation. DNS or EMAIL are valid, NONE can be used for certificates that were imported into ACM and then into Terraform. | `string` | `"DNS"` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_domain_name"></a> [domain\_name](#output\_domain\_name) | The ACM Domain Name | | ||
| <a name="output_id"></a> [id](#output\_id) | The ACM ID | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
resource "aws_acm_certificate" "acm" { | ||
domain_name = var.domain_name | ||
validation_method = var.validation_method | ||
|
||
lifecycle { | ||
create_before_destroy = true | ||
} | ||
|
||
tags = var.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "id" { | ||
description = "The ACM ID" | ||
value = aws_acm_certificate.acm.id | ||
} | ||
|
||
output "domain_name" { | ||
description = "The ACM Domain Name" | ||
value = aws_acm_certificate.acm.domain_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "domain_name" { | ||
type = string | ||
description = "(Required) Domain name for which the certificate should be issued" | ||
} | ||
variable "validation_method" { | ||
type = string | ||
default = "DNS" | ||
description = "(Required) Which method to use for validation. DNS or EMAIL are valid, NONE can be used for certificates that were imported into ACM and then into Terraform." | ||
} | ||
|
||
variable "tags" { | ||
type = map(string) | ||
default = {} | ||
description = "The resource tag" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_ami.ami](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ami) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_architecture"></a> [architecture](#input\_architecture) | (Optional) Machine architecture for created instances. Defaults to x86\_64. | `string` | `"x86_64"` | no | | ||
| <a name="input_delete_on_termination"></a> [delete\_on\_termination](#input\_delete\_on\_termination) | (Optional) Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.value | `bool` | `true` | no | | ||
| <a name="input_description"></a> [description](#input\_description) | (Optional) A longer, human-readable description for the AMI. | `string` | `null` | no | | ||
| <a name="input_device_name"></a> [device\_name](#input\_device\_name) | value | `string` | `"/dev/xvda"` | no | | ||
| <a name="input_ena_support"></a> [ena\_support](#input\_ena\_support) | (Optional) Specifies whether enhanced networking with ENA is enabled. Defaults to false. | `bool` | `false` | no | | ||
| <a name="input_encrypted"></a> [encrypted](#input\_encrypted) | (Optional) Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with snapshot\_id | `bool` | `false` | no | | ||
| <a name="input_extra_ebs_block_device"></a> [extra\_ebs\_block\_device](#input\_extra\_ebs\_block\_device) | (Optional) Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below. | `list(object({ extra_ebs_block_device_delete_on_termination = bool, extra_ebs_block_device_device_name = string, extra_ebs_block_device_encrypted = bool, extra_ebs_block_device_iops = number, extra_ebs_block_device_snapshot_id = string, extra_ebs_block_device_volume_size = number, extra_ebs_block_device_volume_type = string }))` | `[]` | no | | ||
| <a name="input_iops"></a> [iops](#input\_iops) | (Required only when volume\_type is io1/io2) Number of I/O operations per second the created volumes will support. | `number` | `0` | no | | ||
| <a name="input_name"></a> [name](#input\_name) | (Required) A region-unique name for the AMI. | `string` | `null` | no | | ||
| <a name="input_root_device_name"></a> [root\_device\_name](#input\_root\_device\_name) | (Optional) The name of the root device (for example, /dev/sda1, or /dev/xvda). | `string` | `null` | no | | ||
| <a name="input_snapshot_id"></a> [snapshot\_id](#input\_snapshot\_id) | (Optional) The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume\_size attribute must be at least as large as the referenced snapshot. | `string` | `null` | no | | ||
| <a name="input_sriov_net_support"></a> [sriov\_net\_support](#input\_sriov\_net\_support) | (Optional) When set to simple (the default), enables enhanced networking for created instances. No other value is supported at this time. | `string` | `"simple"` | no | | ||
| <a name="input_tags"></a> [tags](#input\_tags) | The Tags to resource | `map(string)` | `{}` | no | | ||
| <a name="input_virtualization_type"></a> [virtualization\_type](#input\_virtualization\_type) | (Optional) Keyword to choose what virtualization mode created instances will use. Can be either: paravirtual (the default) or hvm. The choice of virtualization type changes the set of further arguments that are required, as described below. | `string` | `"hvm"` | no | | ||
| <a name="input_volume_size"></a> [volume\_size](#input\_volume\_size) | (Required unless snapshot\_id is set) The size of created volumes in GiB. If snapshot\_id is set and volume\_size is omitted then the volume will have the same size as the selected snapsho | `number` | `15` | no | | ||
| <a name="input_volume_type"></a> [volume\_type](#input\_volume\_type) | (Optional) The type of EBS volume to create. Can be one of standard (the default), io1, io2 or gp2. | `string` | `"ebs"` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_architecture"></a> [architecture](#output\_architecture) | n/a | | ||
| <a name="output_description"></a> [description](#output\_description) | n/a | | ||
| <a name="output_name"></a> [name](#output\_name) | n/a | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_comment"></a> [comment](#input\_comment) | (Optional) A comment for the hosted zone. Defaults to 'Managed by Terraform'. | `string` | `"Managed by Terraform"` | no | | ||
| <a name="input_name"></a> [name](#input\_name) | (Required) This is the name of the hosted zone. | `string` | n/a | yes | | ||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags. | `map(string)` | `{}` | no | | ||
| <a name="input_vpcs"></a> [vpcs](#input\_vpcs) | (Optional) Configuration block(s) specifying VPC(s) to associate with a private hosted zone. | <pre>list(object({<br> vpc_id = string<br> vpc_region = string<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_arn"></a> [arn](#output\_arn) | n/a | | ||
| <a name="output_name_servers"></a> [name\_servers](#output\_name\_servers) | n/a | | ||
| <a name="output_zone_id"></a> [zone\_id](#output\_zone\_id) | n/a | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_route53_record.record](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_name"></a> [name](#input\_name) | (Required) The name of the record. | `string` | n/a | yes | | ||
| <a name="input_records"></a> [records](#input\_records) | (Required for non-alias records) A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add \"\" inside the Terraform configuration string (e.g. "first255characters\"\"morecharacters"). | `list(string)` | n/a | yes | | ||
| <a name="input_ttl"></a> [ttl](#input\_ttl) | (Required for non-alias records) The TTL of the record. | `number` | n/a | yes | | ||
| <a name="input_type"></a> [type](#input\_type) | (Required) The record type. | `string` | n/a | yes | | ||
| <a name="input_zone_id"></a> [zone\_id](#input\_zone\_id) | (Required) The ID of the hosted zone to contain this record. | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_fqdn"></a> [fqdn](#output\_fqdn) | n/a | | ||
| <a name="output_name"></a> [name](#output\_name) | n/a | | ||
<!-- END_TF_DOCS --> |