File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,20 @@ module "dfshell_role" {
7676 }
7777}
7878
79+ # dma
80+ module "dma_role" {
81+ count = 1
82+ source = " terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
83+ role_name = " ${ var . deployment_name } -${ var . dma_service_account_name } "
84+
85+ oidc_providers = {
86+ ex = {
87+ provider_arn = module.eks.oidc_provider_arn
88+ namespace_service_accounts = [" ${ var . deployment_name } :${ var . dma_service_account_name } " ]
89+ }
90+ }
91+ }
92+
7993# worker_portal
8094module "worker_portal_role" {
8195 count = 1
@@ -249,6 +263,12 @@ resource "aws_iam_role_policy_attachment" "bedrock_dfshell_attachment" {
249263 policy_arn = aws_iam_policy. bedrock_access_policy [0 ]. arn
250264}
251265
266+ resource "aws_iam_role_policy_attachment" "bedrock_dma_attachment" {
267+ count = var. k8s_access_bedrock ? 1 : 0
268+ role = module. dma_role [0 ]. iam_role_name
269+ policy_arn = aws_iam_policy. bedrock_access_policy [0 ]. arn
270+ }
271+
252272resource "aws_iam_role_policy_attachment" "bedrock_server_attachment" {
253273 count = var. k8s_access_bedrock ? 1 : 0
254274 role = module. server_role [0 ]. iam_role_name
Original file line number Diff line number Diff line change @@ -135,6 +135,12 @@ variable "dfshell_service_account_name" {
135135 description = " Name of the service account for dfshell"
136136}
137137
138+ variable "dma_service_account_name" {
139+ type = string
140+ default = " datafold-dma"
141+ description = " Name of the service account for dma"
142+ }
143+
138144variable "worker_portal_service_account_name" {
139145 type = string
140146 default = " datafold-worker-portal"
You can’t perform that action at this time.
0 commit comments