Init project in 2024, Terraform 1.7.3
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.37.0" # AWS provider version, 5.37.*
}
}
required_version = ">= 1.7.0, < 2.0.0" # Terraform version
}
provider "aws" {
region = "eu-central-1"
# profile = "tda-middleware-admin"
}
data "aws_ami" "instance" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["al2023-ami-2023*"]
}
filter {
name = "architecture"
values = [var.architecture] # AWS instance architecture, //x86_64// or //arm64//
}
}
1. Install terraform-docs
2. Write first template:
TODO: write module purpose
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
3. Generate documentation:
terraform-docs markdown table --output-file README.md .