Skip to content

Commit

Permalink
chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed May 28, 2024
1 parent c7e46d2 commit fb40816
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
1 change: 1 addition & 0 deletions src/aws_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ func AwsDataLookup(find string) interface{} {
"aws_ecr_lifecycle_policy_document": placeholder,
"aws_identitystore_groups": dataAwsIdentitystoreGroups,
"aws_datazone_environment_blueprint": dataAwsDatazoneEnvironmentBlueprint,
"aws_chatbot_slack_workspace": dataAwsChatbotSlackWorkspace,
}

return TFLookup[find]
Expand Down
3 changes: 1 addition & 2 deletions src/coverage/aws.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# todo aws

Resource percentage coverage 50.22
Datasource percentage coverage 99.81
Datasource percentage coverage 100.00

./resource.ps1 aws_accessanalyzer_archive_rule
./resource.ps1 aws_account_region
Expand Down Expand Up @@ -684,4 +684,3 @@ Datasource percentage coverage 99.81
./resource.ps1 aws_worklink_website_certificate_authority_association
./resource.ps1 aws_workspaces_connection_alias
./resource.ps1 aws_workspaces_ip_group
./resource.ps1 aws_chatbot_slack_workspace -type data
3 changes: 3 additions & 0 deletions src/files_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1443,3 +1443,6 @@ var dataAwsIdentitystoreGroups []byte

//go:embed mapping/aws/data/datazone/aws_datazone_environment_blueprint.json
var dataAwsDatazoneEnvironmentBlueprint []byte

//go:embed mapping/aws/data/chatbot/aws_chatbot_slack_workspace.json
var dataAwsChatbotSlackWorkspace []byte
13 changes: 13 additions & 0 deletions src/mapping/aws/data/chatbot/aws_chatbot_slack_workspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"apply": [],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": [
"chatbot:DescribeSlackWorkspaces"
]
}
]
7 changes: 7 additions & 0 deletions terraform/aws/backup/data.aws_chatbot_slack_workspace.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "aws_chatbot_slack_workspace" "pike" {
slack_team_name = "pike"
}

output "aws_chatbot_slack_workspace" {
value = data.aws_chatbot_slack_workspace.pike
}
29 changes: 1 addition & 28 deletions terraform/aws/role/aws_iam_policy.basic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,7 @@ resource "aws_iam_policy" "basic" {
"Sid" : "0",
"Effect" : "Allow",
"Action" : [
"datazone:ListEnvironmentBlueprints",


//aws_datazone_domain
"datazone:CreateDomain",
"datazone:GetDomain",
"datazone:ListTagsForResource",
"datazone:DeleteDomain",
"datazone:UpdateDomain",

"datazone:TagResource",
"datazone:UntagResource",

//aws_datazone_environment_blueprint_configuration
"datazone:PutEnvironmentBlueprintConfiguration",
"datazone:GetEnvironmentBlueprintConfiguration",
"datazone:DeleteEnvironmentBlueprintConfiguration",

"iam:CreateRole",
"iam:DeleteRole",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:ListInstanceProfilesForRole",
"iam:ListRolePolicies",
"iam:PutRolePolicy",
"iam:DeleteRolePolicy",

"chatbot:DescribeSlackWorkspaces",
],
"Resource" : "*",
}
Expand Down

0 comments on commit fb40816

Please sign in to comment.