Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ability to use aws_iam_policy_document instead of directly having a policy doc in the resource #695

Open
fawaf opened this issue Dec 2, 2020 · 24 comments

Comments

@fawaf
Copy link

fawaf commented Dec 2, 2020

e.g.

data "aws_iam_policy_document" "foo" {
  statement {
      effect = "Allow"
      principals {
        type = "AWS"
        identifiers = [
          "arn:aws:iam::blah"
        ]
      }
      actions = "sts:AssumeRole"
  }
}

resource "aws_iam_role" "backups" {
    name               = "backups"
    path               = "/"
    assume_role_policy = data.aws_iam_policy_document.foo.json
}

vs

resource "aws_iam_role" "foo" {
    name               = "backups"
    path               = "/"
    assume_role_policy = <<POLICY
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "AWS": [
          "arn:aws:iam::blah"
        ]
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
POLICY
}
@mwarkentin
Copy link
Contributor

I came across this tool which is helpful to go from JSON -> HCL: https://github.com/flosell/iam-policy-json-to-terraform

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 25, 2021
@fawaf
Copy link
Author

fawaf commented May 28, 2021

still needed

@github-actions github-actions bot removed the Stale label May 29, 2021
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 29, 2021
@fawaf
Copy link
Author

fawaf commented Jul 29, 2021

#695 (comment) re-linking

@github-actions github-actions bot removed the Stale label Jul 31, 2021
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 30, 2021
@fawaf
Copy link
Author

fawaf commented Sep 30, 2021

still needed afaict

@github-actions github-actions bot removed the Stale label Oct 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 2, 2021
@mwarkentin
Copy link
Contributor

Stayin' alive.

@github-actions github-actions bot removed the Stale label Dec 3, 2021
@github-actions
Copy link

github-actions bot commented Feb 2, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 2, 2022
@fawaf
Copy link
Author

fawaf commented Feb 2, 2022

Stayin' alive.

still :this:

@github-actions github-actions bot removed the Stale label Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 8, 2022
@fawaf
Copy link
Author

fawaf commented Apr 8, 2022 via email

@github-actions github-actions bot removed the Stale label Apr 13, 2022
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 12, 2022
@fawaf
Copy link
Author

fawaf commented Jun 12, 2022

stayin alive

@github-actions github-actions bot removed the Stale label Jun 13, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 3, 2022
@fawaf
Copy link
Author

fawaf commented Nov 3, 2022

almost 2 years

@github-actions github-actions bot removed the Stale label Nov 4, 2022
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 27, 2023
@fawaf
Copy link
Author

fawaf commented Feb 27, 2023

2nd birthday passed

@github-actions github-actions bot removed the Stale label Feb 28, 2023
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 10, 2024
@fawaf
Copy link
Author

fawaf commented Feb 11, 2024

add comment

@github-actions github-actions bot removed the Stale label Feb 12, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 13, 2024
@fawaf
Copy link
Author

fawaf commented Apr 13, 2024

commenting

@github-actions github-actions bot removed the Stale label Apr 16, 2024
@jeffrey-aguilera
Copy link

3 1/2 years ... hmm, is terraformer actually dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants