Demo deployment of F5 BIG-IP in AWS using Terraform
This is a refactor of https://github.com/mjmenger/terraform-aws-bigip-setup to present a more modular approach of deployement. As per source, below, all aspects are applicable - the intention is to provide TS to SumoLogic for the deployment of a secure gateway solution within AWS.
an authentication token must be generated and recorded as documented below in order to access the modules required by this demo
-`docker run -it -v $(pwd):/workspace -p 8089:8089 mmenger/tfdemoenv:1.6.2 /bin/bash`
# Required Resource
This example creates the following resources inside of AWS. Please ensure your IAM user or IAM Role has privileges to create these objects.
**Note:** This example requires 4 Elastic IPs, please ensure your EIP limit on your account can accommodate this (information on ElasticIP limits can be found at https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ec2)
- AWS VPC
- AWS Route Tables
- AWS Nat Gateways
- AWS Elastic IPs
- AWS EC2 Instances
- AWS Subnets
- AWS Security Groups
**Note:** In order to use this demo your AWS account must be subscribed to the F5 AMI and its associated terms and conditions. If your account is not subscribed, the first time ```terraform apply``` is run you will receive an error similar to the following:
```
Error: Error launching source instance: OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please
The url embedded within the error message will load the appropriate location in order to subscribe the AWS account to the F5 AMI.
After subscribing, re-run the ```terraform apply``` and the error should not occur again.
# Access Credentials
```bash
#starting from within the clone of this repository
vi secrets.auto.tfvars
```
enter the following in the *secrets.auto.tfvars* file
```hcl
AccessKeyID="<AN ACCESS KEY FOR YOUR AWS ACCOUNT>"
SecretAccessKey="<THE SECRET KEY ASSOCIATED WITH THE AWS ACCESS KEY>"
ec2_key_name="<THE NAME OF AN AWS KEY PAIR WHICH IS ASSOCIATE WITH THE AWS ACOUNT>"
ec2_key_file="<THE PATH TO AN SSH KEY FILE USED TO CONNECT TO THE UBUNTU SERVER ONCE IT IS CREATED. NOTE: THIS PATH SHOULD BE RELATIVE TO THE CONTAINER ROOT>"
```
save the file and quit vi
# Setup
```hcl
# initialize Terraform
terraforminit
# build the BIG-IPS and the underpinning infrastructure
terraformapply
```
Depending upon how you intend to use the environment you may need to wait after Terraform is complete. The configuration of the BIG-IPs is completed asynchoronously. If you need the BIG-IPs to be fully configured before proceeding, the following Inspec tests validate the connectivity of the BIG-IP and the availability of the management API end point.
```
# check the status of the BIG-IPs
# these steps can also be performed using ./runtests.sh