https://github.com/skyplabs/terraform-aws-template
Minimal Terraform template for AWS modules
https://github.com/skyplabs/terraform-aws-template
Last synced: 6 months ago
JSON representation
Minimal Terraform template for AWS modules
- Host: GitHub
- URL: https://github.com/skyplabs/terraform-aws-template
- Owner: SkypLabs
- License: unlicense
- Created: 2021-02-28T15:46:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-06T18:26:09.000Z (over 4 years ago)
- Last Synced: 2025-02-15T01:28:34.771Z (8 months ago)
- Language: HCL
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform AWS Template
Template of a minimal Terraform module for AWS. It is itself based on my [Terraform
Module Template][terraform-module-template].This module follows the [standard structure][standard-module-structure]
described in the [Terraform documentation][terraform-docs].The following non-standard but commonly used files and folders have also been
added:* `local.tf`
* `data.tf`
* `providers.tf`
* `templates`
* `versions.tf`A [pre-commit][pre-commit] configuration file is present to automatically format
and validate the code and update the readme file upon Git commits.## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13.0 |
| [aws](#requirement\_aws) | ~> 3.0 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | ~> 3.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [aws\_access\_key](#input\_aws\_access\_key) | AWS access key. It must be provided, but it can also be sourced from the `AWS_ACCESS_KEY_ID` environment variable, or via a shared credentials file if `aws_profile` is specified. | `string` | `null` | no |
| [aws\_allowed\_account\_ids](#input\_aws\_allowed\_account\_ids) | List of allowed AWS account IDs to prevent you from mistakenly using an incorrect one (and potentially end up destroying a live environment). Conflicts with `aws_forbidden_account_ids`. | `set(string)` | `null` | no |
| [aws\_assume\_role](#input\_aws\_assume\_role) | Configuration of the AWS assume role block. |object({|
duration_seconds = number
external_id = string
policy = string
policy_arns = set(string)
role_arn = string
session_name = string
tags = map(string)
transitive_tag_keys = set(string)
}){| no |
"duration_seconds": null,
"external_id": null,
"policy": null,
"policy_arns": null,
"role_arn": null,
"session_name": null,
"tags": null,
"transitive_tag_keys": null
}
| [aws\_forbidden\_account\_ids](#input\_aws\_forbidden\_account\_ids) | List of forbidden AWS account IDs to prevent you from mistakenly using the wrong one (and potentially end up destroying a live environment). Conflicts with `aws_allowed_account_ids`. | `set(string)` | `null` | no |
| [aws\_ignore\_tags](#input\_aws\_ignore\_tags) | Configuration of the AWS ignore tags block. |object({|
keys = set(string)
key_prefixes = set(string)
}){| no |
"key_prefixes": null,
"keys": null
}
| [aws\_max\_retries](#input\_aws\_max\_retries) | Maximum number of times an AWS API call is retried, in the case where requests are being throttled or experiencing transient failures. The delay between the subsequent API calls increases exponentially. If omitted, the default value is 25. | `number` | `null` | no |
| [aws\_profile](#input\_aws\_profile) | AWS profile name as set in the shared credentials file. | `string` | `null` | no |
| [aws\_region](#input\_aws\_region) | AWS region. It must be provided, but it can also be sourced from the `AWS_DEFAULT_REGION` environment variables, or via a shared credentials file if `aws_profile` is specified. | `string` | `null` | no |
| [aws\_s3\_force\_path\_style](#input\_aws\_s3\_force\_path\_style) | Set this to `true` to force the request to use path-style addressing, i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client will use virtual hosted bucket addressing, `http://BUCKET.s3.amazonaws.com/KEY`, when possible. Specific to the Amazon S3 service. | `bool` | `null` | no |
| [aws\_secret\_key](#input\_aws\_secret\_key) | AWS secret key. It must be provided, but it can also be sourced from the `AWS_SECRET_ACCESS_KEY` environment variable, or via a shared credentials file if `aws_profile` is specified. | `string` | `null` | no |
| [aws\_shared\_credentials\_file](#input\_aws\_shared\_credentials\_file) | Path to the shared credentials file. If this is not set and a profile is specified, `~/.aws/credentials` will be used. | `string` | `null` | no |
| [aws\_skip\_get\_ec2\_platforms](#input\_aws\_skip\_get\_ec2\_platforms) | Skip getting the supported EC2 platforms. Used by users that don't have `ec2:DescribeAccountAttributes` permissions. | `bool` | `null` | no |
| [aws\_token](#input\_aws\_token) | AWS session token for validating temporary credentials. Typically provided after successful identity federation or Multi-Factor Authentication (MFA) login. With MFA login, this is the session token provided afterward, not the 6 digit MFA code used to get temporary credentials. It can also be sourced from the `AWS_SESSION_TOKEN` environment variable. | `string` | `null` | no |
| [enabled](#input\_enabled) | Whether or not this module should create any resources. | `bool` | `true` | no |
| [tags](#input\_tags) | Tags that will be applied to all resources. | `map(string)` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| [aws\_account\_id](#output\_aws\_account\_id) | The AWS Account ID number of the account that owns or contains the calling entity. |
| [aws\_caller\_arn](#output\_aws\_caller\_arn) | The AWS ARN associated with the calling entity. |
| [aws\_caller\_user\_id](#output\_aws\_caller\_user\_id) | The AWS unique identifier of the calling entity. |[pre-commit]: https://pre-commit.com/ "pre-commit Website"
[standard-module-structure]: https://www.terraform.io/docs/modules/index.html#standard-module-structure "Terraform Documentation - Standard Module Structure"
[terraform-docs]: https://www.terraform.io/docs/ "Terraform Documentation"
[terraform-module-template]: https://github.com/SkypLabs/terraform-module-template "SkypLabs - Terraform Module Template"