Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crossplane-aws-iam): Add support of inline policy #263

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/iac/crossplane-aws-iam/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: A Helm chart for crossplane AWS IAM resources
name: crossplane-aws-iam
# Below version must match the app version for the consistency.
# Update minor bit if new tag is needed. e.g. 0.29.0-1
version: "0.41.0"
version: "0.41.0-1"
home: "https://github.com/luminartech/helm-charts-public"
sources:
- https://github.com/luminartech/helm-charts-public/charts/iac/crossplane-aws-iam
Expand All @@ -23,5 +23,5 @@ maintainers:
email: hennadii.mykhailiuta@luminartech.com
dependencies:
- name: common-gitops
version: "1.1.7"
version: "1.1.10"
repository: "oci://ghcr.io/luminartech/helm-charts-public"
3 changes: 3 additions & 0 deletions charts/iac/crossplane-aws-iam/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
{{- include "common-gitops.crossplane.deletionPolicy" (dict "root" $root "name" $name "kind" $kind) | nindent 2 }}
{{- include "common-gitops.crossplane.forProvider" (dict "root" $root "values" (.forProvider) "valuesOverride" (dict
"assumeRolePolicy" (include "common-gitops.crossplane.awsPolicy" (dict "value" (.forProvider.assumeRolePolicy) "root" $root))
"inlinePolicy" (dict
"name" (include "common-gitops.names.itemFullname" (dict "root" $root "name" $name "override" (.forProvider.inlinePolicy).name))
"policy" (include "common-gitops.crossplane.awsPolicy" (dict "value" ((.forProvider.inlinePolicy).policy) "root" $root)))
"tags" (include "common-gitops.tags.dict" (dict "root" $root "name" $name "kind" $kind "nameOverride" .name) | fromYaml)
)) | nindent 2 }}
{{- include "common-gitops.crossplane.publishConnectionDetailsTo" (dict "root" $root "name" $name "kind" $kind "nameOverride" .name) | nindent 2 }}
Expand Down
9 changes: 9 additions & 0 deletions charts/iac/crossplane-aws-iam/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ Role:
forProvider:
description: "IAM Role generated using crossplane + helm chart"
maxSessionDuration: 3600 # 1 to 12 hours
inlinePolicy:
name: supertest
policy:
Statement:
_:
Effect: "Allow"
Principal:
Service: "ec2.amazonaws.com"
Action: "sts:AssumeRole"
assumeRolePolicy:
Statement:
_:
Expand Down
Loading