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

add iam group data source #1138

Closed
eredi93 opened this issue Jul 13, 2017 · 4 comments · Fixed by #1140
Closed

add iam group data source #1138

eredi93 opened this issue Jul 13, 2017 · 4 comments · Fixed by #1140
Labels
new-data-source Introduces a new data source.

Comments

@eredi93
Copy link

eredi93 commented Jul 13, 2017

we currently have a iam role data source but not a iam group one.
my use case, i dont fully manage my account with terraform and i need to make sure that any user part of group A are part of the KMS key policy.
i currently hacked around a module that uses a data external and a bash script that returns a list of names and ARNs but it would be better to have a proper data source for it. writing modules that uses bash scripts and aws cli to get what i need makes me 😱

@stack72 stack72 added the new-resource Introduces a new resource. label Jul 13, 2017
stack72 added a commit that referenced this issue Jul 13, 2017
Fixes: #1138

```
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSDataSourceIAMGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDataSourceIAMGroup -timeout 120m
=== RUN   TestAccAWSDataSourceIAMGroup_basic
--- PASS: TestAccAWSDataSourceIAMGroup_basic (31.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	31.464s
```
@stack72 stack72 added new-data-source Introduces a new data source. and removed new-resource Introduces a new resource. labels Jul 13, 2017
stack72 added a commit that referenced this issue Jul 14, 2017
Fixes: #1138

```
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSDataSourceIAMGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDataSourceIAMGroup -timeout 120m
=== RUN   TestAccAWSDataSourceIAMGroup_basic
--- PASS: TestAccAWSDataSourceIAMGroup_basic (31.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	31.464s
```
@eredi93
Copy link
Author

eredi93 commented Jul 14, 2017

this is great! thanks so much for adding that.
could you add users as part of Attributes Reference ? the API response has a Users array, what i'm proposing is having a users_arn and users_name arrays as outputs of the data source.

@stack72
Copy link
Contributor

stack72 commented Jul 14, 2017

Hi @eredi93

Please can you open another issue for this so that it doesn't get lost in a closed issue?

Thanks

Paul

@eredi93
Copy link
Author

eredi93 commented Jul 14, 2017

sure will do

@ghost
Copy link

ghost commented Apr 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants