Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden authored Aug 10, 2022
1 parent dfadead commit 4ac9290
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,24 +302,23 @@ Update **files.go** with:
```go
//go:embed aws_security_group.json
var securityGroup []byte

```

### Add to provider Scan

Once you have added the json import above you just need to update the lookup table so we can read it and get the permissions:

```go
func GetAWSResourcePermissions(result template) []interface{} {
myAttributes := GetAttributes(result)
var Permissions []interface{}
switch result.Resource.name {
case "aws_s3_bucket":
Permissions = GetPermissionMap(s3, myAttributes)
case "aws_instance":
Permissions = GetPermissionMap(ec2raw, myAttributes)
+ case "aws_security_group":
+ Permissions = GetPermissionMap(securityGroup, myAttributes)
TFLookup := map[string]interface{}{
"aws_s3_bucket": awsS3Bucket,
"aws_s3_bucket_acl": awsS3BucketACL,
+ "aws_security_group": awsSecurityGroup,

```
Also add an example Terraform file into the folder terraform/backups.
## Related Tools
<https://github.com/iann0036/iamlive>

0 comments on commit 4ac9290

Please sign in to comment.