Skip to content

Commit 0ad7817

Browse files
feat: rename test function for EFS file system and enhance lifecycle policy documentation
1 parent abe69fc commit 0ad7817

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ No modules.
550550
| <a name="input_performance_mode"></a> [performance\_mode](#input\_performance\_mode) | The file system performance mode. Valid values: 'generalPurpose' (default, lower latency for most workloads) or 'maxIO' (higher aggregate throughput for highly parallelized workloads) | `string` | `"generalPurpose"` | no |
551551
| <a name="input_throughput_mode"></a> [throughput\_mode](#input\_throughput\_mode) | Throughput mode for the file system. Valid values: 'bursting' (scales with file system size), 'elastic' (automatically scales based on workload), or 'provisioned' (fixed throughput - requires provisioned\_throughput\_in\_mibps to be set) | `string` | `"bursting"` | no |
552552
| <a name="input_provisioned_throughput_in_mibps"></a> [provisioned\_throughput\_in\_mibps](#input\_provisioned\_throughput\_in\_mibps) | The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable when throughput\_mode is set to 'provisioned' | `number` | `null` | no |
553-
| <a name="input_lifecycle_policy"></a> [lifecycle\_policy](#input\_lifecycle\_policy) | Lifecycle policy for the file system. Supports transition\_to\_ia (AFTER\_7\_DAYS, AFTER\_14\_DAYS, AFTER\_30\_DAYS, AFTER\_60\_DAYS, AFTER\_90\_DAYS, AFTER\_1\_DAY, AFTER\_180\_DAYS, AFTER\_270\_DAYS, AFTER\_365\_DAYS), transition\_to\_primary\_storage\_class (AFTER\_1\_ACCESS), and transition\_to\_archive (AFTER\_1\_DAY, AFTER\_7\_DAYS, AFTER\_14\_DAYS, AFTER\_30\_DAYS, AFTER\_60\_DAYS, AFTER\_90\_DAYS, AFTER\_180\_DAYS, AFTER\_270\_DAYS, AFTER\_365\_DAYS) | <pre>object({<br/> transition_to_ia = optional(string)<br/> transition_to_primary_storage_class = optional(string)<br/> transition_to_archive = optional(string)<br/> })</pre> | `null` | no |
553+
| <a name="input_lifecycle_policy"></a> [lifecycle\_policy](#input\_lifecycle\_policy) | Lifecycle policy for the file system. | <pre>object({<br/> transition_to_ia = optional(string)<br/> transition_to_primary_storage_class = optional(string)<br/> transition_to_archive = optional(string)<br/> })</pre> | `null` | no |
554554
| <a name="input_protection"></a> [protection](#input\_protection) | Protection configuration for the file system. Supports replication\_overwrite (ENABLED, DISABLED, REPLICATING) | <pre>object({<br/> replication_overwrite = optional(string)<br/> })</pre> | `null` | no |
555555
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the EFS file system | `map(string)` | `{}` | no |
556556

tests/post_deploy_functional_readonly/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const (
2525
infraTFVarFileNameDefault = "test.tfvars"
2626
)
2727

28-
func TestLambdaLayerModule(t *testing.T) {
28+
func TestEFSFileSystemModule(t *testing.T) {
2929

3030
ctx := types.CreateTestContextBuilder().
3131
SetTestConfig(&testimpl.ThisTFModuleConfig{}).

tests/testimpl/test_impl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ func testFileSystemArn(t *testing.T, awsFileSystem *types.FileSystemDescription,
7878
assert.NotEmpty(t, fileSystemArn, "File system ARN should not be empty")
7979

8080
// Verify it's a valid ARN format
81-
matched, _ := regexp.MatchString(`^arn:aws:elasticfilesystem:`, fileSystemArn)
81+
matched, err := regexp.MatchString(`^arn:aws:elasticfilesystem:`, fileSystemArn)
82+
require.NoError(t, err, "Regex match for ARN failed")
8283
assert.True(t, matched, "ARN should start with 'arn:aws:elasticfilesystem:'")
8384
}
8485

variables.tf

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,32 @@ variable "provisioned_throughput_in_mibps" {
6060
default = null
6161
}
6262

63+
# Lifecycle policy for the file system.
64+
# Supported values:
65+
# transition_to_ia:
66+
# - AFTER_1_DAY
67+
# - AFTER_7_DAYS
68+
# - AFTER_14_DAYS
69+
# - AFTER_30_DAYS
70+
# - AFTER_60_DAYS
71+
# - AFTER_90_DAYS
72+
# - AFTER_180_DAYS
73+
# - AFTER_270_DAYS
74+
# - AFTER_365_DAYS
75+
# transition_to_primary_storage_class:
76+
# - AFTER_1_ACCESS
77+
# transition_to_archive:
78+
# - AFTER_1_DAY
79+
# - AFTER_7_DAYS
80+
# - AFTER_14_DAYS
81+
# - AFTER_30_DAYS
82+
# - AFTER_60_DAYS
83+
# - AFTER_90_DAYS
84+
# - AFTER_180_DAYS
85+
# - AFTER_270_DAYS
86+
# - AFTER_365_DAYS
6387
variable "lifecycle_policy" {
64-
description = "Lifecycle policy for the file system. Supports transition_to_ia (AFTER_7_DAYS, AFTER_14_DAYS, AFTER_30_DAYS, AFTER_60_DAYS, AFTER_90_DAYS, AFTER_1_DAY, AFTER_180_DAYS, AFTER_270_DAYS, AFTER_365_DAYS), transition_to_primary_storage_class (AFTER_1_ACCESS), and transition_to_archive (AFTER_1_DAY, AFTER_7_DAYS, AFTER_14_DAYS, AFTER_30_DAYS, AFTER_60_DAYS, AFTER_90_DAYS, AFTER_180_DAYS, AFTER_270_DAYS, AFTER_365_DAYS)"
88+
description = "Lifecycle policy for the file system."
6589
type = object({
6690
transition_to_ia = optional(string)
6791
transition_to_primary_storage_class = optional(string)

0 commit comments

Comments
 (0)