{"id":16473904,"url":"https://github.com/techiescamp/terraform-aws","last_synced_at":"2025-06-13T20:06:59.994Z","repository":{"id":173571695,"uuid":"507857484","full_name":"techiescamp/terraform-aws","owner":"techiescamp","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-13T05:49:24.000Z","size":218,"stargazers_count":63,"open_issues_count":1,"forks_count":83,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T12:28:43.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techiescamp.png","metadata":{"files":{"readme":null,"changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T10:09:56.000Z","updated_at":"2024-10-08T06:13:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bfc27f1-4046-4e2e-883a-c067124e6896","html_url":"https://github.com/techiescamp/terraform-aws","commit_stats":null,"previous_names":["techiescamp/terraform-aws"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techiescamp/terraform-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techiescamp","download_url":"https://codeload.github.com/techiescamp/terraform-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-aws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259712410,"owners_count":22900038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T12:28:50.726Z","updated_at":"2025-06-13T20:06:59.966Z","avatar_url":"https://github.com/techiescamp.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws\nTerraform AWS provisioning examples for beginners\n\n## Hit the Star! ⭐\nIf you are planning to use this Terraform repo for learning, please hit the star. Thanks!\n\n## Terraform Init With s3 Backend\n\n```\nterraform init \\\n    -backend-config=\"key=dev/vpc.tfstate\" \\\n    -backend-config=\"bucket=dcube-terraform-state\" \\\n    -backend-config=\"region=us-west-2\" \\\n    -backend-config=\"dynamodb_table=terraform-state-lock\" \\\n    -var-file=../../../vars/dev/vpc.tfvars\n```\n\n#### VPC Provisioning\n\ncd into the `environments/dev/vpc` directory and run the following commands:\n\n1. Init Terraform in the directory `environments/dev/vpc`\n\n```\nterraform init\n```\n2. To preview the changes in code\n\n```\nterraform plan -var-file=../../../vars/dev/vpc.tfvars\n```\n3. To apply the changes\n\n```\nterraform apply -var-file=../../../vars/dev/vpc.tfvars\n```\n4. To destroy the resources created using the code\n\n```\nterraform destroy -var-file=../../../vars/dev/vpc.tfvars\n\n\n#### RDS Provisioning\n\ncd into the `environments/dev/rds` directory and run the following commands:\n\n1. Init Terraform in the directory `environments/dev/rds`\n\n```\nterraform init\n```\n2. To preview the changes in code\n\n```\nterraform plan -var-file=../../../vars/dev/rds.tfvars\n```\n3. To apply the changes\n\n```\nterraform apply -var-file=../../../vars/dev/rds.tfvars\n```\n4. To destroy the resources created using the code\n\n```\nterraform destroy -var-file=../../../vars/dev/rds.tfvars\n```\n\n### ALB and ASG Provisioning\n\ncd into the `environments/dev/alb-asg` directory and run the following commands:\n\n1. Init Terraform in the directory `environments/dev/alb-asg`\n\n```\nterraform init\n```\n2. To preview the changes in code\n\n```\nterraform plan -var-file=../../../vars/dev/alb-asg.tfvars\n```\n3. To apply the changes\n\n```\nterraform apply -var-file=../../../vars/dev/alb-asg.tfvars\n```\n4. To destroy the resources created using the code\n\n```\nterraform destroy -var-file=../../../vars/dev/alb-asg.tfvars\n```\n\n## EC2 Instance Provisioning\n\n1. Navigate to the `environment/dev` folder:\n\n```bash\ncd environment/dev\n```\n\n2. Open the `ec2.tfvars` file and modify it with your desired details. This file contains variables used in the Terraform configuration.\n\n### Deployment\n\n1. Initialize Terraform in the working directory:\n\n```bash\nterraform init\n```\n\n2. Create an execution plan:\n\n```bash\nterraform plan -var-file=../../../vars/dev/ec2.tfvars\n```\n\n3. Apply the changes to create the EC2 instance:\n\n```bash\nterraform apply -var-file=../../../vars/dev/ec2.tfvars\n```\n\n4. To destroy the EC2 instance and associated resources:\n\n```bash\nterraform destroy -var-file=../../../vars/dev/ec2.tfvars\n```\n\n**Note**: Always review the execution plan (`terraform plan`) before applying changes to avoid unintended modifications.\n\n## AWS Organization Tag Policy Creation.\n\n1. Navigate to the `environment/dev` folder:\n\n```bash\ncd environment/tag-policy\n```\n\n2. Open the `tag-policy.tfvars` file and modify it with your desired details. This file contains variables used in the Terraform configuration.\n\n### Deployment\n\n1. Initialize Terraform in the working directory:\n\n```bash\nterraform init\n```\n\n2. Create an execution plan:\n\n```bash\nterraform plan -var-file=../../../vars/dev/tag-policy.tfvars\n```\n\n3. Apply the changes to create the Tag Policy:\n\n```bash\nterraform apply -var-file=../../../vars/dev/tag-policy.tfvars\n```\n\n4. To destroy the Tag Policy:\n\n```bash\nterraform destroy -var-file=../../../vars/dev/tag-policy.tfvars\n```\n\n**Note**: Always review the execution plan (`terraform plan`) before applying changes to avoid unintended modifications.\n\n## Terraform Command Reference\n\nUpdate all outputs:\n\n\u003cpre\u003eterraform refresh\u003c/pre\u003e\n\nShow all outputs:\n\n\u003cpre\u003eterraform show\u003c/pre\u003e\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiescamp%2Fterraform-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechiescamp%2Fterraform-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiescamp%2Fterraform-aws/lists"}