Code Monkey home page Code Monkey logo

tf-iam-policies-gen's Introduction

tf-iam-policies-gen

Example of use

module "sso_inline_policy_generator" {
    source = "./"

    permissions = [
    {
      name       = "developers"
      statements = [
        {
          effect    = "Allow"
          actions   = [
              "rds:*",
              "ecs:*"
          ]
          resources = concat([
              data.terraform_remote_state.rds.outputs.cluster_arn,
            ],
            data.terraform_remote_state.lb.outputs.alb_private_arns
          )
        },
        {
          effect    = "Deny"
          actions   = [
            "s3:*",
          ]
          resources = [
            aws_s3_bucket.test.arn
          ]
        }
      ]
    },
    {
      name       = "qa"
      statements = [
        {
          effect    = "Allow"
          actions   = [
            "s3:List*",
            "s3:Get*",
          ]
          resources = [
            aws_s3_bucket.test.arn
          ]
        }
      ]
    }
  ]
}

Requirements

Name Version
terraform >= 0.13.1
aws >= 4.0

Providers

Name Version
aws >= 4.0

Modules

No modules.

Resources

Name Type
aws_iam_policy_document.this data source

Inputs

Name Description Type Default Required
permissions List of policies that you want to create with the IAM Policy format. Defaults to empty list.
set(object({
name = string
statements = set(object({
sid = string
effect = string
actions = set(string)
resources = set(string)
condition = set(object({
test = string
variable = string
values = set(string)
}))
}))
}))
[] no

Outputs

Name Description
policies_json Object with the JSON of the generated IAM policies.

tf-iam-policies-gen's People

Contributors

cmgm15 avatar

Watchers

 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.