GithubHelp home page GithubHelp logo

cytopia / terraform-aws-iam Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 15.0 179 KB

This Terraform module manages AWS IAM to its full extend.

License: MIT License

Makefile 20.35% HCL 79.65%
terraform terraform-module aws iam iam-role iam-policy iam-permissions

terraform-aws-iam's People

Contributors

cytopia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

terraform-aws-iam's Issues

map() deprecated

My terraform version:

Terraform v1.3.7
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.30.0

I'm trying out this awesome looking module and I encountered these errors:

│ Error: Error in function call
│ 
│   on main.tf line 146, in resource "aws_iam_user" "users":
│  146:     map("Name", lookup(each.value, "name")),
│     ├────────────────
│     │ while calling map(vals...)
│ 
│ Call to function "map" failed: the "map" function was deprecated in
│ Terraform v0.12 and is no longer available; use tomap({ ... }) syntax to
│ write a literal map.
╵
╷
│ Error: Error in function call
│ 
│   on main.tf line 246, in resource "aws_iam_role" "roles":
│  246:     map("Name", lookup(each.value, "name")),
│     ├────────────────
│     │ while calling map(vals...)
│ 
│ Call to function "map" failed: the "map" function was deprecated in
│ Terraform v0.12 and is no longer available; use tomap({ ... }) syntax to
│ write a literal map.

This is the page describing the deprecation: https://developer.hashicorp.com/terraform/language/functions/map

I made a local copy of the module and edited those lines to:

tags = merge(
  tomap({ Name = lookup(each.value, "name") }),
  var.tags
)

It looks like it solved the bug on my end. I created a resource with it and got merged tags as I expect. What do you think?

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.