GithubHelp home page GithubHelp logo

aws-infra-with-terraform's Introduction

AWS + Terraform

A bunch of AWS apps using Terraform.

Setup

Install Homebrew

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew -v
# Homebrew 3.5.2
# Homebrew/homebrew-core (git revision 8cf67a9bf32; last commit 2022-06-18)
# Homebrew/homebrew-cask (git revision e83c83c0a2; last commit 2022-06-18)

Install tfenv (a package manager for Terraform)

$ brew install tfenv
$ tfenv -v
# output: tfenv 2.2.3

At the time of writing this doc I am using 1.2.3. Install, this version, tell tfenv to use it then check if it has switched versions correctly.

$ tfenv install 1.2.3 && tfenv use 1.2.3
$ terraform -v
# output: Terraform v1.2.3
# on darwin_amd64

Install aws-cli

brew install awscli
aws --version

# output: aws-cli/2.7.7 Python/3.9.13 Darwin/20.6.0 source/x86_64 prompt/off

Setup your AWS profile

If you are starting out as the admin, then first you must have an AWS account created from the console. Refer to this doc on how to do this. Then download .csv file that contains your user credentials which we need to tell AWS how we can access our resources via the cli.

When the time comes to attach policies you and other users in the team can send pull requests and attach them to specific groups (e.g. developers) instead of their account directly on the console. This ensures all your users are assigned equal roles and they aren't doing anything they aren't shouldn't be.

Typically, the root user/admins should do this and then send them the credentials. Afterwards only they should know their details and must configure them locally. You can read more about how to do this in this doc.

TODO: Formatting

Probably because of tfenv autoformatting doesn't work on save so for now I'm using the below command to format everything. Can be set as a precommit.

$ terraform fmt

Further reading

https://registry.terraform.io/providers/hashicorp/aws/latest/docs

aws-infra-with-terraform's People

Contributors

benji011 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.