Description
In this course, you will :
- Utilize the Terraform Gradle plugin to generate AWS infrastructure in your Gradle build, allowing you to deploy infrastructure and use it for your Java app build. Let's get started.
Syllabus:
1. Create the Gradle Project and Configure
- Configure the AWS CLI.
- Install SDKMAN using the curl command provided.
- Install Java.
- Install Gradle.
- Create the guru_tf project directory.
- Move into the guru_tf directory.
- Initialize the guru_tf directory to build the scaffolding for the project.
2. Modify the Terraform Configuration
- Move the files found in the gradle_lab/terraform directory to the guru_tf directory.
- Add the src directory to your build.
- Modify the build file and add the Terraform Gradle plugin and the source directory for your Terraform files.
3. Deploy the EC2 Instance with Terraform and Gradle
- Initialize your Terraform directory using the Gradle Terraform init task.
- Use the Gradle Terraform apply task to deploy the infrastructure.
- Confirm that the infrastructure has been created.
- Use the Gradle Terraform destroy task to destroy the infrastructure.