generated from ministryofjustice/cloud-platform-terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bedrock.tf
41 lines (40 loc) · 1.17 KB
/
bedrock.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
data "aws_iam_policy_document" "bedrock_for_github" {
statement {
sid = "AllowBedrockReadOnly"
effect = "Allow"
actions = [
"bedrock:GetFoundationModel",
"bedrock:ListFoundationModels",
"bedrock:ListTagsForResource",
"bedrock:GetFoundationModelAvailability",
"bedrock:GetModelInvocationLoggingConfiguration",
"bedrock:GetProvisionedModelThroughput",
"bedrock:ListProvisionedModelThroughputs",
"bedrock:GetModelInvocationJob",
"bedrock:ListModelInvocationJobs",
"bedrock:GetGuardrail",
"bedrock:ListGuardrails",
"bedrock:GetEvaluationJob",
"bedrock:ListEvaluationJobs",
"bedrock:GetInferenceProfile",
"bedrock:ListInferenceProfiles"
]
resources = ["*"]
}
statement {
sid = "AllowBedrockCustomModel"
effect = "Allow"
actions = [
"bedrock:GetModelCustomizationJob",
"bedrock:ListModelCustomizationJobs",
"bedrock:ListCustomModels",
"bedrock:GetCustomModel"
]
resources = ["*"]
condition {
test = "StringLike"
variable = "aws:PrincipalTag/GithubTeam"
values = ["*:$${aws:ResourceTag/GithubTeam}:*"]
}
}
}