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

Documentation needs improvement (!) #529

Closed
tf42src opened this issue Oct 17, 2024 · 7 comments
Closed

Documentation needs improvement (!) #529

tf42src opened this issue Oct 17, 2024 · 7 comments

Comments

@tf42src
Copy link

tf42src commented Oct 17, 2024

Trying to create a role with a "federated" principal. Seems impossible.

  1. This needs an example:
    https://registry.terraform.io/modules/terraform-aws-modules/iam/aws/latest/submodules/iam-assumable-role-with-oidc

  2. Trying to use it like this: resource "iam-assumable-role-with-oidc" "github_actions_eks_role" { .. }, running tf init results in:

│ Could not retrieve the list of available versions for provider hashicorp/iam-assumable-role-with-oidc: provider registry registry.terraform.io does not have a
│ provider named registry.terraform.io/hashicorp/iam-assumable-role-with-oidc
  1. Same issue for resource "iam_iam-assumable-role-with-oidc" "github_actions_eks_role" { .. }

  2. All links on the fields just link to itself. e.g. this one. That's not helpful.

  3. Why is there a boolean variable whether to create a role or not (create_role)? The whole purpose is to create a role. Doesn't make sense to me.

  4. What is the purpose of specifying the number of attached policies (number_of_role_policy_arns)? Also doesn't make sense to me. Should just count itself based on # attached policies.

  5. A lot of the other fields are not self-explanatory (e.g. role_path - why is that required?). A simple example how to use would be so much more user friendly.

@bryantbiggs bryantbiggs closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
@tf42src
Copy link
Author

tf42src commented Oct 28, 2024

@bryantbiggs any comment?

@bryantbiggs
Copy link
Member

I'm not sure what to comment here - it seems like you are not familiar with some of the Terraform module norms and conventions so I would suggest first digging into the Terraform documentation and then starting to look at modules, and then module implementations (not just ours, there are many modules out there and some really well written ones on the registry)

@tf42src
Copy link
Author

tf42src commented Oct 29, 2024

Maybe there are, but the one I am referring to [1] is not. The documentation is pretty much non-existant and what exists partially does not makes sense. Hence I think it can be improved. So why not keep this ticket open and make things better?

[1] resource "iam-assumable-role-with-oidc" "github_actions_eks_role"

@bryantbiggs
Copy link
Member

its there https://github.com/terraform-aws-modules/terraform-aws-iam/tree/master/examples/iam-assumable-role-with-oidc

but what I think you are actually looking for is

module "iam_github_oidc_role" {

@tf42src
Copy link
Author

tf42src commented Nov 11, 2024

Thanks for the link, but I still don't see how that addresses my original points.

E.g. pick my 5. Why is there a boolean variable whether to create a role or not (create_role)? The whole purpose is to create a role. Doesn't make sense to me.

Can you explain what create_role is for?

@bryantbiggs
Copy link
Member

It determines whether a role is created or not

@tf42src
Copy link
Author

tf42src commented Nov 12, 2024

It determines whether a role is created or not

but the whole purpose of the module is to create a role:

Screenshot 2024-11-12 at 3 29 55 pm

https://registry.terraform.io/modules/terraform-aws-modules/iam/aws/latest/submodules/iam-assumable-role-with-oidc

@terraform-aws-modules terraform-aws-modules locked and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants