Giter Site home page Giter Site logo

medined / create-iam-users-with-terraform-and-keybase Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 5.0 20 KB

Provides IAM user management with Terraform scripts. Keybase provides security for initial temporary password.

License: GNU General Public License v3.0

HCL 58.53% Shell 41.47%

create-iam-users-with-terraform-and-keybase's Introduction

Create IAM Users With Terraform And Keybase

Provides IAM user management with Terraform scripts. Keybase provides security for initial temporary password.

Configuration

  • Create the terraform.tfvars file according to your needs. The profile name corresponds to entries in your ~/.aws/credentials file.
cat <<EOF >terraform.tfvars
aws_profile_name = "personal"
region           = "us-east-1"
EOF
  • Adjust the contents of iam-groups.tf as needed. This file defines the aws_iam_group, aws_iam_policy and aws_iam_group_policy_attachment associated with IAM and the users you will create.

    • Here is an example of a group definition.
  resource "aws_iam_group" "administrators" {
  name = "administrators"
  path = "/"
}
* Here is an example of a policy definition. I am using pre-defined policies. Custom policies can be used but are a little more involved to define.
data "aws_iam_policy" "AdministratorAccess" {
  arn = "arn:aws:iam::aws:policy/AdministratorAccess"
}
* Here is an examlpe of a group policy attachment. Each policy attached to a group requires its own Terraform resource.
resource "aws_iam_group_policy_attachment" "administrator" {
  group = aws_iam_group.administrators.name
  policy_arn = data.aws_iam_policy.AdministratorAccess.arn
}
  • Initialize Terraform.
terraform init
  • Apply Terraform using a helper script that ensures a log file is created of all output. Very helpful for validating the application or for debugging when something goes horribly wrong.
./tfa

create-iam-users-with-terraform-and-keybase's People

Contributors

medined avatar

Stargazers

 avatar  avatar  avatar  avatar  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.