Skip to content

Commit 2871232

Browse files
christopher-mabohMaboh Christopher
and
Maboh Christopher
authored
PLT-1130: Create Roles and Policies for each API (#249)
## 🎫 Ticket https://jira.cms.gov/browse/PLT-1130 ## 🛠 Changes Snyk role and policy was modified to 3 separate roles and policies per team ## ℹ️ Context Given all three APIs are in the same account now (looking at BCDA org, we have AB2D and DPC ECR repositories which are different org) It will be nice to have some isolation for API teams Reopening PR to fix issue encountered during terraform apply via GitHub action. error message: ╷ │ Error: putting IAM Role (bcda-snyk) Policy (bcda-snyk-pull-ecr): operation error IAM: PutRolePolicy, https response error StatusCode: 400, RequestID: 0aaec715-9fe1-4797-8a74-00d871b466f5, MalformedPolicyDocument: Statement IDs (SID) must be alpha-numeric. Check that your input satisfies the regular expression [0-9A-Za-z]* │ │ with aws_iam_role_policy.snyk_pull["bcda"], │ on main.tf line 59, in resource "aws_iam_role_policy" "snyk_pull": │ 59: resource "aws_iam_role_policy" "snyk_pull" { │ <!-- If any of the following security implications apply, this PR must not be merged without Stephen Walter's approval. Explain in this section and add @SJWalter11 as a reviewer. - Adds a new software dependency or dependencies. - Modifies or invalidates one or more of our security controls. - Stores or transmits data that was not stored or transmitted before. - Requires additional review of security implications for other reasons. --> ## 🧪 Validation See Checks --------- Co-authored-by: Maboh Christopher <chris.maboh@aquia.io>
1 parent 791a9d0 commit 2871232

File tree

1 file changed

+1
-1
lines changed
  • terraform/services/snyk-integration

1 file changed

+1
-1
lines changed

terraform/services/snyk-integration/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data "aws_iam_policy_document" "snyk_pull" {
3636
for_each = toset(local.app)
3737

3838
statement {
39-
sid = "title(${each.key})SnykAllowPull"
39+
sid = "${title(each.key)}SnykAllowPull"
4040
effect = "Allow"
4141
actions = [
4242
"ecr:GetLifecyclePolicyPreview",

0 commit comments

Comments
 (0)