Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_efs_mount_target dns_name attribute returns aws_efs_filesystem dns_name instead #25157

Closed
pll opened this issue Jun 5, 2020 · 2 comments
Closed

Comments

@pll
Copy link

pll commented Jun 5, 2020

Terraform Version

$ terraform -v
Terraform v0.12.26
+ provider.aws v2.65.0

Terraform Configuration Files

resource "aws_efs_file_system" "fs" {
  creation_token = "my-product"
}

output "efs-file-system-dns-name" {
  value = aws_efs_file_system.fs.dns_name
}

resource "aws_efs_mount_target" "fs" {
  count		  = length(local.pri_subnet_ids)
  file_system_id  = aws_efs_file_system.fs.id
  subnet_id	  = element(local.pri_subnet_ids, count.index)
  security_groups = [ element(aws_security_group.efs.*.id, count.index) ]
}

output "efs-mount-target-dns-name" {
  value = aws_efs_mount_target.fs.*.dns_name
}

outputs:

efs-file-system-dns-name = [
  "fs-f263e871.efs.us-east-1.amazonaws.com",
]

efs-mount-target-dns-name = [
  "fs-f263e871.efs.us-east-1.amazonaws.com",
  "fs-f263e871.efs.us-east-1.amazonaws.com",
  "fs-f263e871.efs.us-east-1.amazonaws.com",
]

Expected Behavior

Expected aws_efs_mount_target.dns_name to be of the form availability-zone.file-system-id.efs.aws-region.amazonaws.com as per the AWS EFS documentation:

https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html

Actual Behavior

Got the aws_efs_filesystem.dns_name of the form file-system-id.efs.aws-region.amazonaws.com instead, which defeats the entire purpose of creating per-AZ EFS Mount Targets.

Steps to Reproduce

  1. Create an EFS volume and mount targets as described by the code above.
  2. terraform init
  3. terraform apply
@ghost
Copy link

ghost commented Jun 5, 2020

This issue has been automatically migrated to hashicorp/terraform-provider-aws#13645 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#13645.

@ghost ghost closed this as completed Jun 5, 2020
@ghost
Copy link

ghost commented Jul 6, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 6, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants