{"id":20657759,"url":"https://github.com/boltops-tools/terraform-workshop-aws","last_synced_at":"2026-05-26T20:31:26.431Z","repository":{"id":91684863,"uuid":"284561796","full_name":"boltops-tools/terraform-workshop-aws","owner":"boltops-tools","description":"Simple Terraform Workshop for AWS","archived":false,"fork":false,"pushed_at":"2020-08-30T20:33:13.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-31T15:28:26.149Z","etag":null,"topics":["boltops","terraform","terraspace"],"latest_commit_sha":null,"homepage":"","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/boltops-tools.png","metadata":{"files":{"readme":"README.md","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":"2020-08-02T23:44:54.000Z","updated_at":"2025-12-17T09:52:57.000Z","dependencies_parsed_at":"2023-07-11T08:01:30.838Z","dependency_job_id":null,"html_url":"https://github.com/boltops-tools/terraform-workshop-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boltops-tools/terraform-workshop-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fterraform-workshop-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fterraform-workshop-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fterraform-workshop-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fterraform-workshop-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boltops-tools","download_url":"https://codeload.github.com/boltops-tools/terraform-workshop-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fterraform-workshop-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33538659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["boltops","terraform","terraspace"],"created_at":"2024-11-16T18:23:00.740Z","updated_at":"2026-05-26T20:31:26.411Z","avatar_url":"https://github.com/boltops-tools.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Terraform Tutorial Workshop for AWS Cloud\n\nIn this workshop, we'll create an AWS S3 bucket with Terraform.  For simplicity, we'll use local storage for the statefile. Local storage should only be used for light testing. For real-world usage, you should use a remote backend.\n\n## Summary\n\n1. Install Terraform\n2. Configure AWS\n3. Deploy Infrastructure\n\n## Install Terraform\n\nHere is the official [Terraform Download page](https://www.terraform.io/downloads.html).  You can follow those instructions. Just make sure to put the terraform executable in a folder that is found in the PATH. IE: `which terraform` should show the location of terraform.\n\nAnother good way to install terraform is with [tfenv](https://github.com/tfutils/tfenv) - Terraform version manager. This allows you to quickly switch between different versions of Terraform. Here are instructions for tfenv:\n\n    git clone https://github.com/tfutils/tfenv.git ~/.tfenv\n    echo 'export PATH=\"$HOME/.tfenv/bin:$PATH\"' \u003e\u003e ~/.bash_profile\n\nOpen a new terminal and then run:\n\n    tfenv install 0.13.1\n    tfenv use 0.13.1\n\n## Configure AWS\n\nHere are the instructions to install the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html). \n\nNext, configure AWS so Terraform can connect to it. The recommended way is to:\n\n1. set up the `~/.aws/config` and `~/.aws/credentials` files\n2. set up your `AWS_REGION` environment variables\n\n## Example Config Setup\n\nYou can use the `aws configure` command to set up the `~/.aws/config` and `~/.aws/credentials` files.\n\n    aws configure\n\nThey'll look something like this:\n\n~/.aws/config\n\n    [default]\n    output = json\n    region = us-west-2\n\n~/.aws/credentials\n\n    [default]\n    aws_access_key_id = REPLACE_ME\n    aws_secret_access_key = REPLACE_ME\n\nIn your `~/.bashrc` or `~/.profile`, use this line to set the `AWS_PROFILE` and `AWS_REGION` environment variables:\n\n    export AWS_REGION=`aws configure get region` # to match what's in ~/.aws/config\n\nThe reason we have to configure `AWS_REGION` also, is because Terraform doesn't seem to use the `~/.aws/config` setting, but will use the `AWS_REGION`.\n\n## Test AWS Setup\n\nHere are some useful commands to test that the AWS CLI is working:\n\n    aws sts get-caller-identity\n    aws s3 ls\n\nMore Docs: [AWS CLI Docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)\n\n## Deploy\n\n    terraform init\n    terraform apply\n\nExample with output:\n\n    $ terraform apply\n\n    An execution plan has been generated and is shown below.\n    Resource actions are indicated with the following symbols:\n      + create\n\n    Terraform will perform the following actions:\n\n      # aws_s3_bucket.this will be created\n      + resource \"aws_s3_bucket\" \"this\" {\n          + acceleration_status         = (known after apply)\n          + acl                         = \"private\"\n          + arn                         = (known after apply)\n          + bucket                      = (known after apply)\n          + bucket_domain_name          = (known after apply)\n          + bucket_regional_domain_name = (known after apply)\n          + force_destroy               = false\n          + hosted_zone_id              = (known after apply)\n          + id                          = (known after apply)\n          + region                      = (known after apply)\n          + request_payer               = (known after apply)\n          + website_domain              = (known after apply)\n          + website_endpoint            = (known after apply)\n\n          + versioning {\n              + enabled    = (known after apply)\n              + mfa_delete = (known after apply)\n            }\n        }\n\n    Plan: 1 to add, 0 to change, 0 to destroy.\n\n    Do you want to perform these actions?\n      Terraform will perform the actions described above.\n      Only 'yes' will be accepted to approve.\n\n      Enter a value:\n\nYou're prompted to confirm. Type `yes` and press enter:\n\n      Enter a value: yes\n\n    aws_s3_bucket.this: Creating...\n    aws_s3_bucket.this: Creation complete after 1s [id=terraform-20200802233942217700000001]\n\n    Apply complete! Resources: 1 added, 0 changed, 0 destroyed.\n\n    Outputs:\n\n    name = terraform-20200802233942217700000001\n    $\n\nYou can see a bucket was created.\n\n## Explore\n\nIt is useful to explore some of the files that Terraform created. This helps understand what Terraform does and how it works.\n\nThe previous commands created a `.terraform` folder and a `terraform.tfstate` file.  They'll look something like this:\n\n    .terraform\n    ├── plugins\n    │   └── linux_amd64\n    │       ├── lock.json\n    │       └── terraform-provider-aws_v3.0.0_x5\n    └── terraform.tfstate\n\nWhen you ran `terraform init`, terraform evaluated your Terraform code and detected that it needed to download the aws plugin. This is how Terraform knows how to create the AWS resources.\n\nThen when you ran `terraform apply` it applied the changes and created the S3 Bucket. Since we did not configure a backend.tf, the state information is stored locally in the `terraform.tfstate`. Go ahead and check out the contents of the file. Here's a `cat` command with `jq` to check out the file:\n\n    cat terraform.tfstate | jq\n\nHere's also relevant part of the statefile.\n\n```json\n{\n  \"version\": 4,\n  \"terraform_version\": \"0.12.29\",\n  \"serial\": 20,\n  \"lineage\": \"96fde5c0-95e8-5edd-df8c-005c09e8a84a\",\n  \"resources\": [\n    {\n      \"mode\": \"managed\",\n      \"type\": \"aws_s3_bucket\",\n      \"name\": \"this\",\n      \"provider\": \"provider.aws\",\n      \"instances\": [\n        {\n          \"schema_version\": 0,\n          \"attributes\": {\n            \"acceleration_status\": \"\",\n            \"acl\": \"private\",\n            \"arn\": \"arn:aws:s3:::terraform-20200802233942217700000001\",\n            \"bucket\": \"terraform-20200802233942217700000001\",\n            \"bucket_domain_name\": \"terraform-20200802233942217700000001.s3.amazonaws.com\",\n# ...\n```\n\nThis is how terraform keeps track of what has been created and how to manage the resources. As such, this is a crucial file.  In real-world usage, the statefile is stored in a remote backend like an S3 bucket and versioned.\n\n## Cleanup\n\nLet's clean up and delete the resources now.\n\n    terraform destroy\n\nYou'll be prompted. Type `yes` to confirm.\n\nTake another look at the `terraform.tfstate` file.\n\n    cat terraform.tfstate | jq\n\nYou'll see something like this:\n\n```json\n{\n  \"version\": 4,\n  \"terraform_version\": \"0.12.29\",\n  \"serial\": 22,\n  \"lineage\": \"96fde5c0-95e8-5edd-df8c-005c09e8a84a\",\n  \"outputs\": {},\n  \"resources\": []\n}\n```\n\nYou can see that the statefile also reflects that there are no resources.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltops-tools%2Fterraform-workshop-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboltops-tools%2Fterraform-workshop-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltops-tools%2Fterraform-workshop-aws/lists"}