-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revamp module similarly to other modules (#4)
* refactor: rename local to locals.tf * refactor: move chart to same folder as other modules * refactor: rename required providers file * feat: refactor multiple variables and main to same changes as other modules * fix: change value to renamed variable * feat: upgrade chart to v2.3.5 * feat: add wait, timeouts and retry blocks to argocd_application * docs(terraform-docs): generate docs and write to README.adoc * chore: terraform fmt * fix: add tobool function * style: rename files to canonical naming scheme * feat: add variable for controller role arn annotation (#5) * feat: add variable for controller role arn annotation * docs(terraform-docs): generate docs and write to README.adoc --------- Co-authored-by: ckaenzig <[email protected]> Release-As: v1.0.0-alpha.2 * chore(main): release 1.0.0-alpha.2 (#6) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs(terraform-docs): generate docs and write to README.adoc * feat: add code to conditionally create an IAM assumable role * docs(terraform-docs): generate docs and write to README.adoc * fix: add asterisk because resource is not always created * fix: fix conditions for the creation of the iam role * fix: hardcode the namespace kube-system * style: change name prefix for the iam policy * chore: remove TODO * docs(terraform-docs): generate docs and write to README.adoc * fix: use empty string instead of null as default * docs(terraform-docs): generate docs and write to README.adoc * fix: force the use of a flag to avoid resource creation error * docs(terraform-docs): generate docs and write to README.adoc * fix: fix typo * docs(terraform-docs): generate docs and write to README.adoc * feat: use name prefix instead of full name * docs(terraform-docs): generate docs and write to README.adoc * fix: force the use of a flag to avoid resource creation error * docs(terraform-docs): generate docs and write to README.adoc * fix: fix typo * docs(terraform-docs): generate docs and write to README.adoc * docs(terraform-docs): generate docs and write to README.adoc * fix: add versions to terraform providers * style: remove useless code * docs(terraform-docs): generate docs and write to README.adoc * chore: update chart version * docs: add documentation * docs(terraform-docs): generate docs and write to README.adoc * docs: fix aws_efs_mount_target * docs: rewording and formatting of variables' descriptions * docs(terraform-docs): generate docs and write to README.adoc * fix: change to looser versions constraints as per best practices See documentation [here](https://developer.hashicorp.com/terraform/language/providers/requirements#version-constraints). * docs(terraform-docs): generate docs and write to README.adoc --------- Co-authored-by: lentidas <[email protected]> Co-authored-by: Christian Kaenzig <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Release-As: v1.0.0-alpha.3
- Loading branch information
1 parent
ed5aa22
commit ffc6119
Showing
13 changed files
with
446 additions
and
87 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: aws-efs-csi-driver | ||
repository: https://kubernetes-sigs.github.io/aws-efs-csi-driver/ | ||
version: 2.3.8 | ||
digest: sha256:9523cdb94ec469269f4bfd7e2ebaa8ce16ea87640f3c30bd11224af4d459b590 | ||
generated: "2023-02-24T15:16:18.919117844+01:00" |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "id" { | ||
description = "ID to pass other modules in order to refer to this module as a dependency." | ||
value = resource.null_resource.this.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
terraform { | ||
required_providers { | ||
argocd = { | ||
source = "oboukili/argocd" | ||
source = "oboukili/argocd" | ||
version = ">= 4" | ||
} | ||
|
||
utils = { | ||
source = "cloudposse/utils" | ||
source = "cloudposse/utils" | ||
version = ">= 1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,78 @@ | ||
variable "name" { | ||
type = string | ||
####################### | ||
## Standard variables | ||
####################### | ||
|
||
default = "efs-csi-driver" | ||
variable "cluster_name" { | ||
description = "Name given to the cluster. Value used for naming some the resources created by the module." | ||
type = string | ||
default = "cluster" | ||
} | ||
|
||
variable "source_repository_url" { | ||
type = string | ||
|
||
default = "https://github.com/camptocamp/devops-stack-module-efs-csi-driver.git" | ||
variable "argocd_namespace" { | ||
description = "Namespace used by Argo CD where the Application and AppProject resources should be created." | ||
type = string | ||
} | ||
|
||
variable "target_revision" { | ||
description = "Override of target revision of the application chart." | ||
type = string | ||
default = "v1.0.0-alpha.2" # x-release-please-version | ||
} | ||
variable "destination_namespace" { | ||
type = string | ||
|
||
default = "efs-csi-driver" | ||
variable "helm_values" { | ||
description = "Helm chart value overrides. They should be passed as a list of HCL structures." | ||
type = any | ||
default = [] | ||
} | ||
|
||
variable "helm_values_overrides" { | ||
type = any | ||
variable "app_autosync" { | ||
description = "Automated sync options for the Argo CD Application resource." | ||
type = object({ | ||
allow_empty = optional(bool) | ||
prune = optional(bool) | ||
self_heal = optional(bool) | ||
}) | ||
default = { | ||
allow_empty = false | ||
prune = true | ||
self_heal = true | ||
} | ||
} | ||
|
||
default = {} | ||
variable "dependency_ids" { | ||
description = "IDs of the other modules on which this module depends on." | ||
type = map(string) | ||
default = {} | ||
} | ||
|
||
variable "argocd_namespace" { | ||
type = string | ||
####################### | ||
## Module variables | ||
####################### | ||
|
||
variable "name" { | ||
description = "Name used to override the chart name on deployment." | ||
type = string | ||
default = "efs-csi-driver" | ||
} | ||
|
||
variable "efs_file_system_id" { | ||
description = "EFS Filesystem ID to use by the CSI driver to create volumes." | ||
type = string | ||
description = "EFS Filesystem ID to use by the CSI driver to create volumes" | ||
} | ||
|
||
variable "create_role" { | ||
description = "Boolean to indicate that the OIDC assumable IAM role should be created. **If passing `iam_role_arn` this should be false, otherwise if you want to create the OIDC assumable IAM role provided by this module, you will need to specify the variable `cluster_oidc_issuer_url`.**" | ||
type = bool | ||
} | ||
|
||
variable "iam_role_arn" { | ||
description = "ARN of an OIDC assumable IAM role that has access to the EFS filesystem. 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 = null | ||
} | ||
|
||
variable "cluster_oidc_issuer_url" { | ||
description = "Cluster OIDC issuer URL used to create the OIDC assumable IAM role. This variable is required to create a IAM role if you set `create_role` as true." | ||
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." | ||
default = "" # Use empty string instead of null because of the replace() that uses this variable. | ||
} |