Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
adding a condition for deploying delete_ebs_lambda_role access entry
Browse files Browse the repository at this point in the history
  • Loading branch information
afaras0572 committed May 8, 2024
1 parent 91e2398 commit cee9627
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 16.0.0
* upgrade to EKS module 20.8.5
* introducing eks access entries
* updating delete_ebs_role dependency

## 15.0.0
* Upgrade to EKS 1.28
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | ~> 1.14.0 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.48.0 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | 1.14.0 |
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.2 |

## Modules

Expand Down
4 changes: 2 additions & 2 deletions eks-access-entries.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "aws_eks_access_policy_association" "cluster_admin" {

## Creating access entry for delete_ebs_volumes_lambda with namespaced adminpolicy
resource "aws_eks_access_entry" "delete_ebs_volume" {

count = var.delete_ebs_volume_role_arn != "" ? 1 : 0
cluster_name = local.name
kubernetes_groups = []
principal_arn = var.delete_ebs_volume_role_arn
Expand All @@ -51,7 +51,7 @@ resource "aws_eks_access_entry" "delete_ebs_volume" {
]
}
resource "aws_eks_access_policy_association" "delete_ebs_volume" {

count = var.delete_ebs_volume_role_arn != "" ? 1 : 0
access_scope {
namespaces = ["batcave"]
type = "namespace"
Expand Down

0 comments on commit cee9627

Please sign in to comment.