-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2478d2
commit 3908b8e
Showing
25 changed files
with
248 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package pike | ||
|
||
import "log" | ||
|
||
// GetAWSDataPermissions gets permissions required for datasources | ||
func GetAWSDataPermissions(result ResourceV2) []string { | ||
var Permissions []string | ||
switch result.Name { | ||
case "aws_vpcs": | ||
Permissions = GetPermissionMap(data_aws_vpcs, result.Attributes) | ||
case "aws_subnet_ids": | ||
Permissions = GetPermissionMap(data_aws_subnet_ids, result.Attributes) | ||
case "aws_caller_identity": | ||
//do nothing | ||
default: | ||
log.Printf("%s.%s not implemented", result.TypeName, result.Name) | ||
} | ||
return Permissions | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package pike | ||
|
||
import ( | ||
_ "embed" //required for embed | ||
) | ||
|
||
//go:embed mapping/aws/data/aws_vpcs.json | ||
var data_aws_vpcs []byte | ||
|
||
//go:embed mapping/aws/data/aws_subnets_ids.json | ||
var data_aws_subnet_ids []byte |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
src/mapping/aws/aws_mq_configuration.json → src/mapping/aws/data/aws_subnets_ids.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
[ | ||
{ | ||
"apply": [], | ||
"apply": [ | ||
"ec2:DescribeSubnets" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:DescribeAccountAttributes", | ||
"ec2:DescribeVpcs" | ||
], | ||
"attributes": { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:DescribeAccountAttributes", | ||
"ec2:DescribeVpcs", | ||
"ec2:DescribeSubnets", | ||
"ec2:DescribeSecurityGroups", | ||
"ec2:CreateNetworkInterface", | ||
"ec2:CreateNetworkInterfacePermission", | ||
"ec2:DeleteNetworkInterfacePermission", | ||
"ec2:DetachNetworkInterface", | ||
"ec2:DeleteNetworkInterface", | ||
"mq:CreateBroker", | ||
"mq:DescribeBroker", | ||
"mq:DescribeUser" | ||
], | ||
"attributes": { | ||
"publicly_accessible": [ | ||
"ec2:DescribeInternetGateways" | ||
], | ||
"tags": [ | ||
"mq:CreateTags", | ||
"mq:DeleteTags" | ||
], | ||
"user": [ | ||
"mq:CreateUser", | ||
"mq:DeleteUser", | ||
"mq:UpdateUser" | ||
] | ||
}, | ||
"destroy": [ | ||
"mq:DeleteBroker" | ||
], | ||
"modify": [ | ||
"mq:UpdateBroker", | ||
"mq:DeleteBroker" | ||
], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"mq:CreateConfiguration", | ||
"mq:UpdateConfiguration", | ||
"mq:DescribeConfiguration", | ||
"mq:DescribeConfigurationRevision", | ||
"mq:RebootBroker" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
"destroy": [ | ||
"ec2:DeleteNetworkAcl" | ||
], | ||
"modify": [ | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:CreateVPC", | ||
"ec2:DeleteVPC", | ||
"ec2:DescribeVpcs", | ||
"ec2:DescribeAccountAttributes", | ||
"ec2:DescribeVpcAttribute" | ||
], | ||
"attributes": { | ||
"tags": [ | ||
"ec2:CreateTags", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"destroy": [ | ||
"ec2:DeleteVPC" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
resource "aws_mq_broker" "broker" { | ||
broker_name = "mybrokername" | ||
auto_minor_version_upgrade = true | ||
apply_immediately = true | ||
authentication_strategy = "ldap" | ||
|
||
configuration { | ||
id = aws_mq_configuration.broker.id | ||
revision = aws_mq_configuration.broker.latest_revision | ||
} | ||
|
||
engine_type = "ActiveMQ" //RABBITMQ | ||
engine_version = "5.15.9" | ||
host_instance_type = "mq.t2.micro" | ||
deployment_mode = "SINGLE_INSTANCE" | ||
publicly_accessible = true | ||
security_groups = ["sg-05b27cb61c9c46bd2"] | ||
storage_type = "efs" | ||
# | ||
user { | ||
username = "Fred" | ||
password = "QuimbyWasAGod" | ||
} | ||
|
||
user { | ||
username = "Sally" | ||
password = "QuimbyWasAGod" | ||
} | ||
|
||
maintenance_window_start_time { | ||
day_of_week = "MONDAY" | ||
time_of_day = "12:05" | ||
time_zone = "GMT" | ||
} | ||
|
||
encryption_options { | ||
// kms_key_id = var.kms_key_id | ||
use_aws_owned_key = true | ||
} | ||
|
||
logs { | ||
general = false | ||
audit = false | ||
} | ||
|
||
subnet_ids = ["subnet-08d97e381dbc80d40"] | ||
tags = { name = "some_tags" } | ||
} |
Oops, something went wrong.