This project uses Terraform to automate the deployment and configuration of a Cisco ASAv on Amazon EC2, creating a reproducible and scalable security gateway. It leverages Infrastructure as Code (IaC) to provide robust firewall, VPN, and other ASAv features in AWS.
β’ User must have an AWS account.
Important: To avoid incurring ongoing AWS charges for AMI usage and resource consumption, it is crucial to properly terminate the ASAv EC2 instance when it is no longer needed.
Simply stopping the instance will not prevent all charges. You must terminate the instance to release the associated resources (EBS volumes, Elastic IPs, etc.). Failure to do so may result in continued billing from AWS.
Please refer to the AWS documentation for detailed instructions on terminating EC2 instances.
To get started, Clone repository to an editor(VS Code).
- Run the following command to initialize your Terraform configuration. This will download the necessary provider plugins (This command initializes your Terraform project by downloading the necessary provider plugins).
terraform init
- This command creates an execution plan based on your terraform configuration file. You can save this execution plan and later use it to apply the configuration and create the resource. The execution plan basically tells you which all resources will get created and in what order.
terraform plan
- Run the following command to create the ASAv on EC2 instance defined in your configuration file (This command applies your configuration and creates the resources defined in your configuration file. It shows a plan of what it will do and prompts for approval.)
terraform apply --auto-approve
- Open the AWS Management Console.
- Navigate to the EC2 Dashboard.
- Look for an ASAv instance to verify that Terraform has successfully created.
- Destroy the infrastructure to avoid incurring charges. Run the following command.
terraform destroy --auto-approve