The main.tf configuration will set up AWS EC2 instance and attach Elastic IP with
- Ubuntu 18.04 Server
- Nginx
- Jenkins
network.tf will create a new VPC, Subnet, GW and add route to routing table and add a new Security Group.
Install them locally:
region: "aws region"
amis(map): "region" = "ami_id"
aws_keys(map): access and secret keys
ssh_pubkey: SSH public key location
ssh_privkey: SSH private key location
Before running it check that aws is configured
$ aws configure
Otherwise specify the keys in variables.tf
"access" = "YOUR-ACCESS-KEY"
"secret" = "YOUR-SECRET-KEY"
git clone [email protected]:pavars/luminor-jenkins.git
# Make sure that keys are correct and run
terraform init
terraform apply