Write a terraform project with the following configuration
- Venu Provider AWS, region: eu-west-1
- Terraform backend set to s3 (bucket:
"my-tf-bucket") and dynamodb (table:"my-tf-bucket-lock") - ❓ Create an EC2 instance running in existing VPC tagged as
"Name: Main"and Private VPC tagged as"Type: Private"🤔- It is not possible to attach two VPCs to one instances. Logically there should be two subnets instead - public and private
- Create 2 separate EBS volumes and attach them to an above EC2 instance
- Terraform >= v1.3.4
- Mac, Linux OS or WSL
- Put your credentials to
~/.aws/credentials. You can checkcredentials-examplehow it should look like - Git clone this repo
cd task1terraform init->terraform plan->terraform apply- If all went smootly and resources are created uncomment
s3 backendblock inmain.tf - Run
terraform initand thenterraform apply🚀
terraform destroy- delete s3 bucket manually or via cli
Error: ConditionalCheckFailedException or Error: Backend configuration changed
terraform init -migrate-state -lock=false
Following Kubernetes Deployment is designed to process HTTP requests with File Uploads, with a maximum request taking 20s total. During a rollout of new versions, we've noticed some long-running requests were getting killed in the middle of the request. Please modify the YAML file to avoid this from happening in the future.
Add terminationGracePeriodSeconds: XX under container where XX is seconds. Also it is good idea to add lifecycle prestop hook with commands needed for graceful exit. It is possible to inject script into the pod and run it via this hook.
Read more about hooks: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/