hamdiz0 /
eks-terraform-setup
This repository contains a minimal setup to create an EKS cluster using Terraform
47/100 healthLoading repository data…
rajgupta2 / repository
This repository contains Terraform code To launch an AWS EC2 instance for different stages such as prod/dev and To create an s3 bucket to store logs for different stages and To streams logs to cloudwatch and To Create the SNS topic and configure the alarm so that it can publish the SNS Message. To trigger the cloudwatch alarm for SNS message
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains Terraform code
You can use this repo as
Click on the fork button at the top right of this GitHub repo to create your own copy.
You need an AWS IAM user with programmatic access. Set your AWS credentials as repository secrets:
Navigate to:
Settings > Secrets and variables > Actions > New repository secret
Add the following secrets:
AWS_ACCESS_KEY_ID: Your AWS Access Key IDAWS_SECRET_ACCESS_KEY: Your AWS Secret Access KeyGH_TOKEN : Your Github Tokenbucket attribute inside the backend.tf file located in the ./terraform/ directory and ./terraform/shared/.backend.tf.This ensures the Terraform state is stored remotely and allows GitHub Actions to manage infrastructure across runs.
To create AWS resources:
Selected from shared topics, language and repository description—not editorial ratings.
hamdiz0 /
This repository contains a minimal setup to create an EKS cluster using Terraform
47/100 healthDeploy.yml workflow.This will automatically provision the EC2 instance and the S3 bucket and validate application hosting.
To delete the AWS resources created by Terraform:
Destroy.yml workflow.To delete the AWS resources created by Terraform:
shared.yml workflow.Before you begin, make sure you have the following installed:
Run:
aws configure
You’ll be prompted to enter:
ap-south-1)git clone https://github.com/rajgupta2/tech_eazy_devops_rajgupta2.git
cd tech_eazy_devops_rajgupta2/terraform
bucket attribute inside the backend.tf file located in the ./terraform/ directory and ./terraform/shared/.backend.tf.This ensures the Terraform state is stored remotely and allows to manage infrastructure across different stages.
terraform init
terraform plan
terraform apply
Type yes when prompted.
terraform init -backend-config="key=<stage>/terraform.tfstate"
#stage should be configured at your own such as dev or prod at above cmd.
terraform apply -var "stage=<stage>"
#The same stage should be configured as done in above step-6.
You will be prompted to enter github token, Please enter github token.
Type yes when prompted.
EC2-instances: InstanceWithS3ReadsAccess and running below command.
aws s3 ls s3://logs-bucket-rajgupta2-ap-south-1 #This lists all top-level files/folders in the bucket. Make sure you change the bucket name according to your if you configure your bucket name.
aws s3 cp s3://logs-bucket-rajgupta2-ap-south-1/app/logs/file_name.log . #You need to configure file name in above script..
cat file_name.log #to read the log
To avoid charges, destroy all resources created by Terraform:
terraform destroy -var "stage=<stage>" -auto-approve
#The same stage should be configured as done in above step-6.
You will be prompted to enter github token, Please enter github token.
Feel free to fork this repo, open issues, or submit PRs to improve the setup.