This example demonstrates how to create a basic AWS infrastructure including a VPC, subnet, security group, and an EC2 instance. It also shows how to configure an S3 backend for state management.Documentation Index
Fetch the complete documentation index at: https://tfts.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Ensure you have the AWS provider generated in your project:Complete Example
Key Concepts
- Provider Configuration: The
AwsProviderconstruct initializes the connection to AWS. - Backend Configuration:
S3Backendtells Terraform to store the state file in an S3 bucket. - Resource Referencing: Notice how
subnet.idandsg.idare used to link resources together. tfts handles the underlying Terraform references automatically. - Tags: Most AWS resources support a
tagsproperty for organization and cost tracking.