Sha256: 4fd2fa9a98b61c0fe9f7b668078805cf93988e8d4fc2864171b29f532a428628
Contents?: true
Size: 953 Bytes
Versions: 4
Compression:
Stored size: 953 Bytes
Contents
### exist ```ruby describe iam_role('my-iam-role') do it { should exist } end ``` ### be_allowed_action ```ruby describe iam_role('my-iam-role') do it { should be_allowed_action('ec2:DescribeInstances') } it { should be_allowed_action('s3:Put*').resource_arn('arn:aws:s3:::my-bucket-name/*') } end ``` ### have_iam_policy ```ruby describe iam_role('my-iam-role') do it { should have_iam_policy('ReadOnlyAccess') } end ``` ### have_inline_policy ```ruby describe iam_role('my-iam-role') do it { should have_inline_policy('AllowS3BucketAccess') } it do should have_inline_policy('AllowS3BucketAccess').policy_document(<<-'DOC') { "Statement": [ { "Action": [ "s3:ListAllMyBuckets" ], "Effect": "Allow", "Resource": "arn:aws:s3:::*" }, { "Action": "s3:*", "Effect": "Allow", "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"] } ] } DOC end end ```
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
awspec-0.37.3 | doc/_resource_types/iam_role.md |
awspec-0.37.2 | doc/_resource_types/iam_role.md |
awspec-0.37.1 | doc/_resource_types/iam_role.md |
awspec-0.37.0 | doc/_resource_types/iam_role.md |