This Terraform code provisions AWS resources for Daytona product.
Once the AWS CLI is installed, you need to configure it with your AWS credentials. Open a terminal or command prompt and enter the following command:
aws configure
- Once you've completed the configuration steps, your AWS CLI should be configured and ready to use. You can now run AWS CLI commands to interact with your AWS resources and services. For example, you can try running aws ec2 describe-instances to list your EC2 instances.
Before terraform script is executed a Route53 Zone that matches base_domain
variable must exists.
Open a terminal or command prompt and use the following AWS CLI command to create a Route 53 zone:
aws route53 create-hosted-zone --name example.com --caller-reference unique-reference
Replace example.com with your desired domain name or subdomain. The --caller-reference should be a unique string (such as a timestamp) to identify this request. It helps prevent accidental duplication if you need to retry the command.
If successful, the command will output a JSON response with information about the created hosted zone.
- Clone this repository to your local machine.
- Navigate to the cloned repository.
- Copy the
terraform.tfvars.example
file toterraform.tfvars
- Open
terraform.tfvars
and update the variables as desired.
- Initialize the Terraform workspace:
terraform init
- Create an execution plan:
terraform plan
- Apply the plan to provision resources:
terraform apply
When prompted, review the plan and type yes to confirm.
NOTE: Please be aware that provisioning of certain resources takes a long time (between 30 minutes and 1 hour)
To de-provision the resources created, use the terraform destroy command:
terraform destroy
This command will prompt for confirmation before destroying resources. Type yes to confirm.