The following directory structure should be maintained for this repository:
├── .gitignore
├── README.md
├── TEMPLATE Template for terraform root modules
├── rehost
├── terraform Terraform root modules
| ├── source-vpc Deploy VPC for simulating on-prem data center
| ├── target-vpc Deploy VPC for hosting workload migrated to AWS
| ├── patch-management Configure patch management
| └── automated-backups Configure automatic backups
|
└── python Python scripts
└── src
├── libs Reusable artifacts
└── utils Utility components
The structure and instructions provided in TEMPLATE should be followed as best as possible when creating root terraform module directories.
The root terraform modules should use an S3 backend, with a DynamoDB lock file.
backend "s3" {
region = "eu-central-1"
bucket = "tf-state-aws-migration-test"
key = "<root_module>.tfstate"
dynamodb_table = "tf-state-lock-capci-group4-<root_module>"
encrypt = "true"
}
Replace <root_module> with the corresponding root module name.
E.g., key = "aws-migration-lab-rehost-source-vpc.tfstate"
for the source VPC root module.