Skip to content

Commit

Permalink
Support for netapp creation only for migration (#303)
Browse files Browse the repository at this point in the history
* Creating netapp for migration

* remove validation

* checl

* fix

* adding skip rule
  • Loading branch information
ldebello-ddl authored Dec 2, 2024
1 parent bf6b16b commit 176e0d8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ repos:
args:
- "--args=--compact"
- "--args=--quiet"
- "--args=--skip-check CKV_CIRCLECIPIPELINES_2,CKV_CIRCLECIPIPELINES_6,CKV2_AWS_11,CKV2_AWS_12,CKV2_AWS_6,CKV_AWS_107,CKV_AWS_109,CKV_AWS_111,CKV_AWS_135,CKV_AWS_144,CKV_AWS_145,CKV_AWS_158,CKV_AWS_18,CKV_AWS_184,CKV_AWS_19,CKV_AWS_21,CKV_AWS_66,CKV_AWS_88,CKV2_GHA_1,CKV_AWS_163,CKV_AWS_39,CKV_AWS_38,CKV2_AWS_61,CKV2_AWS_62,CKV_AWS_136,CKV_AWS_329,CKV_AWS_338,CKV_AWS_339,CKV_AWS_341,CKV_AWS_356,CKV2_AWS_19,CKV2_AWS_5,CKV_AWS_150,CKV_AWS_123,CKV2_AWS_65,CKV2_AWS_67,CKV2_AWS_57,CKV_AWS_149,CKV_AWS_117,CKV_AWS_116,CKV_AWS_173,CKV_AWS_115,CKV_AWS_7,CKV_AWS_124"
- "--args=--skip-check CKV_CIRCLECIPIPELINES_2,CKV_CIRCLECIPIPELINES_6,CKV2_AWS_11,CKV2_AWS_12,CKV2_AWS_6,CKV_AWS_107,CKV_AWS_109,CKV_AWS_111,CKV_AWS_135,CKV_AWS_144,CKV_AWS_145,CKV_AWS_158,CKV_AWS_18,CKV_AWS_184,CKV_AWS_19,CKV_AWS_21,CKV_AWS_66,CKV_AWS_88,CKV2_GHA_1,CKV_AWS_163,CKV_AWS_39,CKV_AWS_38,CKV2_AWS_61,CKV2_AWS_62,CKV_AWS_136,CKV_AWS_329,CKV_AWS_338,CKV_AWS_339,CKV_AWS_341,CKV_AWS_356,CKV2_AWS_19,CKV2_AWS_5,CKV_AWS_150,CKV_AWS_123,CKV2_AWS_65,CKV2_AWS_67,CKV2_AWS_57,CKV_AWS_149,CKV_AWS_117,CKV_AWS_116,CKV_AWS_173,CKV_AWS_115,CKV_AWS_7,CKV_AWS_124,CKV_AWS_382"
- id: terraform_trivy
args:
- "--args=--severity=HIGH,CRITICAL"
Expand Down
2 changes: 1 addition & 1 deletion modules/infra/submodules/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ locals {
private_subnet_ids = var.network_info.subnets.private[*].subnet_id
kms_key_arn = var.kms_info.enabled ? var.kms_info.key_arn : null
deploy_efs = var.storage.filesystem_type == "efs" || var.storage.netapp.migrate_from_efs.enabled
deploy_netapp = var.storage.filesystem_type == "netapp"
deploy_netapp = var.storage.filesystem_type == "netapp" || var.storage.netapp.migrate_from_efs.enabled

s3_buckets = { for k, v in {
backups = {
Expand Down
5 changes: 0 additions & 5 deletions modules/infra/submodules/storage/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ variable "storage" {
error_message = "Invalid 'deployment_type' for netapp filesystem, supported deployment types are 'MULTI_AZ_1', 'MULTI_AZ_2', 'SINGLE_AZ_1', and 'SINGLE_AZ_2'."
}

validation {
condition = !var.storage.netapp.migrate_from_efs.enabled || var.storage.filesystem_type == "netapp"
error_message = "Expected filesystem_type=netapp if `netapp.migrate_from_efs` is enabled"
}

validation {
condition = !var.storage.netapp.migrate_from_efs.datasync.enabled || (var.storage.netapp.migrate_from_efs.datasync.enabled && var.storage.netapp.migrate_from_efs.enabled)
error_message = "Expected `storage.netapp.migrate_from_efs.enabled` if `storage.netapp.migrate_from_efs.datasync.enabled`"
Expand Down

0 comments on commit 176e0d8

Please sign in to comment.