File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,45 +105,3 @@ resource "aws_iam_role_policy_attachment" "gha_attachment" {
105105
106106
107107
108- #
109- # Secrets Manager for ESO
110- #
111-
112- resource "aws_iam_policy" "demo_secrets_policy" {
113- name = " sedemo-secrets-access-from-eks"
114- description = " Policy to grant demo cluster access to secrets via ESO"
115-
116- policy = templatefile (
117- " ${ path . module } /templates/secrets_policy.json.tpl" ,
118- {
119- AWS_ACCOUNT_ID = data.aws_caller_identity.current.id
120- }
121- )
122-
123- tags = var. common_tags
124- lifecycle {
125- create_before_destroy = true
126- }
127- }
128-
129- resource "aws_iam_role" "secrets_role" {
130- name = " sedemo-secrets-access-from-eks"
131- description = " Role grants access to secrets policy for ESO"
132-
133- assume_role_policy = templatefile (
134- " ${ path . module } /templates/secrets_role.json.tpl" ,
135- {
136-
137- }
138- )
139-
140- tags = var. common_tags
141- lifecycle {
142- create_before_destroy = true
143- }
144- }
145-
146- resource "aws_iam_role_policy_attachment" "secrets_attachment" {
147- role = aws_iam_role. secrets_role . name
148- policy_arn = aws_iam_policy. demo_secrets_policy . arn
149- }
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -205,3 +205,14 @@ resource "aws_route53_record" "records" {
205205 records = [data . kubernetes_service_v1 . nginx_ingress . status . 0 . load_balancer . 0 . ingress . 0 . hostname ]
206206 depends_on = [helm_release . nginx_ingress ]
207207}
208+
209+
210+ #
211+ #
212+ # . TODO: use `output "secrets_policy_name"` to attach to the OIDC role created by irsa=true above.
213+ #
214+
215+ resource "aws_iam_role_policy_attachment" "s3_read_only" {
216+ role = eks. module . oidc_provider_arn
217+ policy_arn = data. terraform_remote_state . arad_aws_state . outputs . secrets_policy_arn
218+ }
You can’t perform that action at this time.
0 commit comments