Nicole732 / devops-aws-cicd-pipeline-terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform Module to deploy Lambda function and upload code to AWS S3

Pre-requisites

Install the following:

After installing the AWS CLI. Configure it to use your credentials. This enables Terraform access to the configuration file and performs operations on your behalf with these security credentials.

$ aws configure
AWS Access Key ID [None]: <YOUR_AWS_ACCESS_KEY_ID>
AWS Secret Access Key [None]: <YOUR_AWS_SECRET_ACCESS_KEY>
Default region name [None]: <YOUR_AWS_REGION>

How to use

Ensure you configure backend.tf to contain the backend bucket name, path to key and region.

Clone the repository and initalize your Terraform workspace with the following command:

$ terraform init

Execute the following to see what the infrastructure looks like (provide the necessary values):

$ terraform plan

Then, provision your EC2 instance by running terraform apply (Ensure to pass necessary values). This will take approximately 10 minutes.

$ terraform apply

About


Languages

Language:HCL 98.6%Language:JavaScript 1.4%