I'm trying to create aws_datasync_location_efs but receive the error below[1] ('efsFilesystemArn' failed to satisfy constraint). The Value output in the error message appears to be missing the aws acccount id. I don't know if this is done for security, or if this is a bug in plain sight.
As shown in the example code I've tried using the file_system_arn of my_target1 however the error is the same. My last resort was to see if a data statement on my_target1 may work but it generates the same error.
I've not been using TF long, but bleary-eyed from wrestling with this. Apologies if this is user error. I'm certainly stumped and the error seems to be saying the regex and ARN do not agree. Both of which are generated/used by the module.
Error: creating DataSync Location EFS: ValidationException: 1 validation error detected: Value 'arn:aws:elasticfilesystem:us-east-1::file-system/fs-092f027800bf84a67' at 'efsFilesystemArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\-0-9]+:[0-9]{12}:file-system/fs-[0-9a-f]{8,40}$status code: 400, request id: 1296afac-5125-4b7a-9b9e-d73820a6ce45 with aws_datasync_location_efs.example,
on efs.tf line 78, in resource "aws_datasync_location_efs" "example":
78: resource "aws_datasync_location_efs" "example" {
Expected Behavior
aws_datasync_location_efs should have been created
Actual Behavior
Error generated about regex filtering on the filesystem ARN
Relevant Error/Panic Output Snippet
� Error: creating DataSync Location EFS: ValidationException: 1 validation error detected: Value 'arn:aws:elasticfilesystem:us-east-1::file-system/fs-092f027800bf84a67' at 'efsFilesystemArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\-0-9]+:[0-9]{12}:file-system/fs-[0-9a-f]{8,40}$
� status code: 400, request id: 1296afac-5125-4b7a-9b9e-d73820a6ce45
�
� with aws_datasync_location_efs.example,
� on efs.tf line 78, in resource "aws_datasync_location_efs" "example":
� 78: resource "aws_datasync_location_efs" "example" {
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.9
AWS Provider Version
4.45.0
Affected Resource(s)
I'm trying to create aws_datasync_location_efs but receive the error below[1] ('efsFilesystemArn' failed to satisfy constraint). The
Value
output in the error message appears to be missing the aws acccount id. I don't know if this is done for security, or if this is a bug in plain sight.As shown in the example code I've tried using the
file_system_arn
ofmy_target1
however the error is the same. My last resort was to see if adata
statement onmy_target1
may work but it generates the same error.I've not been using TF long, but bleary-eyed from wrestling with this. Apologies if this is user error. I'm certainly stumped and the error seems to be saying the regex and ARN do not agree. Both of which are generated/used by the module.
efs.tf bits: filesystem
mount target 1 (target 2 is defined the same)
last resort data statement:
datasync location:
[1]
Expected Behavior
aws_datasync_location_efs should have been created
Actual Behavior
Error generated about regex filtering on the filesystem ARN
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply
Debug Output
tf_debug.json.zip
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None