2018-02-01 20:55:54 +00:00
|
|
|
---
|
|
|
|
title: About the aws_iam_group Resource
|
2018-02-13 19:30:07 +00:00
|
|
|
platform: aws
|
2018-02-01 20:55:54 +00:00
|
|
|
---
|
|
|
|
|
2018-02-15 02:23:29 +00:00
|
|
|
# aws\_iam\_group
|
2018-02-01 20:55:54 +00:00
|
|
|
|
|
|
|
Use the `aws_iam_group` InSpec audit resource to test properties of a single IAM group.
|
|
|
|
|
|
|
|
To test properties of multiple or all groups, use the `aws_iam_groups` resource.
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## Syntax
|
|
|
|
|
|
|
|
An `aws_iam_group` resource block identifies a group by group name.
|
|
|
|
|
|
|
|
# Find a group by group name
|
|
|
|
describe aws_iam_group('mygroup') do
|
|
|
|
it { should exist }
|
|
|
|
end
|
|
|
|
|
|
|
|
# Hash syntax for group name
|
|
|
|
describe aws_iam_group(group_name: 'mygroup') do
|
|
|
|
it { should exist }
|
|
|
|
end
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
The following examples show how to use this InSpec audit resource.
|
|
|
|
|
|
|
|
As this is the initial release of `aws_iam_group`, its limited functionality precludes examples.
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## Matchers
|
|
|
|
|
|
|
|
### exists
|
|
|
|
|
|
|
|
The control will pass if a group with the given group name exists.
|
|
|
|
|
|
|
|
describe aws_iam_group('mygroup')
|
|
|
|
it { should exist }
|
|
|
|
end
|