AWS Terraform Integration with Kloudfuse :: Kloudfuse Docs
AWS Terraform Integration with Kloudfuse
Build the required infrastructure with Terraform to deploy Kloudfuse in AWS.
See the Terraform documentation for Get Started — AWS for further details.
Pre-Requisites
Enable these artifacts to configure S3 as a Terraform backend:
- S3 bucket: Create an S3 bucket with public access turned off, and remaining defaults enabled.
- Dynamodb table: Create a
dynamodbtable with partitionkey = LockID.
For details, see Terraform Configuration.
- Install Terraform: Install the latest Terraform release, and export
terraformto your executablePATH. - Terraform user: Create an AWS user, or use a role that has enough permissions to access the S3 bucket and provision different resources on AWS.
- Ensure to add the profile to your AWS credentials.
- Export the AWS profile before running Terraform.
Terraform Configuration
You must change the backend.tf file in each component folder, according to the created resources in S3 and dynamodb. Note that the state key is unique for each component; for a VPC, it can be vpc.tfstate.
Example Terraform Configuration
terraform {
backend "s3"{
bucket = "bucket-name"
region = "us-west-2"
key = "<resource>.tfstate"
dynamodb_table = "dynamodb-table-name"
}
}
Terraform Variables
You must modify the variables in variables.tf for every deployed AWS component.
- vpc_cidr: The IPv4 CIDR block for the VPC. CIDR can be explicitly set, or it can be derived from IPAM using
ipv4_netmask_lengthandipv4_ipam_pool_id.- Example: `