Skip to content

Andreichenko/aws_sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Sandbox (ACG)

##Terraform Kubernetes Solution

This repository contains Terraform code to deploy a Kubernetes-based Test application on AWS. The Terraform state is stored in an S3 bucket, and the state lock is managed using a DynamoDB table. Both the S3 bucket and the DynamoDB table are created using AWS CloudFormation.

Prerequisites

  1. Terraform installed (version >= 0.13)
  2. AWS CLI installed and configured with appropriate credentials
  3. kubectl installed (optional, to interact with the deployed Kubernetes cluster)

Usage

  1. Clone this repository:
git clone https://github.com/yourusername/<this-repo>.git
cd <this-repo>
  1. Create the required S3 bucket and DynamoDB table using CloudFormation:
aws cloudformation create-stack --stack-name my-stack --template-body file://s3-dynamodb.yml --parameters ParameterKey=S3BucketName,ParameterValue=my-s3-bucket ParameterKey=DynamoDBName,ParameterValue=my-lock-table
  1. Update backend.tf with the S3 bucket and DynamoDB table names you provided as parameters when creating the CloudFormation stack:
terraform {
  backend "s3" {
    bucket         = "my-s3-bucket"
    key            = "terraform.tfstate"
    region         = "us-west-2"
    dynamodb_table = "my-lock-table"
  }
}
  1. Initialize Terraform:
terraform init
  1. Review the Terraform plan and apply:
terraform plan
terraform apply
  1. (Optional) To interact with the deployed Kubernetes cluster, configure kubectl:
aws eks update-kubeconfig --region us-west-2 --name my-cluster-name
  1. To destroy the deployed infrastructure, run:
terraform destroy

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

About

AWS n Vultr solution using Jenkins, TF and CF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •