Skip to content

Commit

Permalink
feat: add variable for controller role arn annotation (#5)
Browse files Browse the repository at this point in the history
* feat: add variable for controller role arn annotation

* docs(terraform-docs): generate docs and write to README.adoc

---------

Co-authored-by: ckaenzig <ckaenzig@users.noreply.github.com>

Release-As: v1.0.0-alpha.2
  • Loading branch information
ckaenzig authored Feb 23, 2023
1 parent 8f0629c commit 8f29881
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
22 changes: 18 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Type: `string`

==== [[input_efs_file_system_id]] <<input_efs_file_system_id,efs_file_system_id>>

Description: n/a
Description: EFS Filesystem ID to use by the CSI driver to create volumes

Type: `string`

Expand All @@ -59,6 +59,14 @@ Type: `any`

Default: `{}`

==== [[input_iam_role_arn]] <<input_iam_role_arn,iam_role_arn>>

Description: ARN of an OIDC assumable IAM role that has access to the EFS filesystem (optional). When specified, this is added as an annotation to the EFS CSI driver controller ServiceAccount, to allow the driver to manage EFS access points for dynamic volumes provisioning.

Type: `string`

Default: `""`

==== [[input_name]] <<input_name,name>>

Description: n/a
Expand All @@ -81,7 +89,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v1.0.0"`
Default: `"v1.0.0-alpha.1"`

=== Outputs

Expand Down Expand Up @@ -127,7 +135,7 @@ No outputs.
|no

|[[input_efs_file_system_id]] <<input_efs_file_system_id,efs_file_system_id>>
|n/a
|EFS Filesystem ID to use by the CSI driver to create volumes
|`string`
|n/a
|yes
Expand All @@ -138,6 +146,12 @@ No outputs.
|`{}`
|no

|[[input_iam_role_arn]] <<input_iam_role_arn,iam_role_arn>>
|ARN of an OIDC assumable IAM role that has access to the EFS filesystem (optional). When specified, this is added as an annotation to the EFS CSI driver controller ServiceAccount, to allow the driver to manage EFS access points for dynamic volumes provisioning.
|`string`
|`""`
|no

|[[input_name]] <<input_name,name>>
|n/a
|`string`
Expand All @@ -153,7 +167,7 @@ No outputs.
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v1.0.0"`
|`"v1.0.0-alpha.1"`
|no

|===
Expand Down
5 changes: 5 additions & 0 deletions local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ locals {
directoryPerms = "700"
}
}]
controller = {
serviceAccount = {
annotations = var.iam_role_arn != "" ? { "eks.amazonaws.com/role-arn" = var.iam_role_arn } : {}
}
}
}
}
}
9 changes: 8 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@ variable "argocd_namespace" {
}

variable "efs_file_system_id" {
type = string
type = string
description = "EFS Filesystem ID to use by the CSI driver to create volumes"
}

variable "iam_role_arn" {
type = string
default = ""
description = "ARN of an OIDC assumable IAM role that has access to the EFS filesystem (optional). When specified, this is added as an annotation to the EFS CSI driver controller ServiceAccount, to allow the driver to manage EFS access points for dynamic volumes provisioning."
}

0 comments on commit 8f29881

Please sign in to comment.