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 #13645

Closed
ghost opened this issue Jun 5, 2020 · 8 comments · Fixed by #13650
Closed

aws_efs_mount_target dns_name attribute returns aws_efs_filesystem dns_name instead #13645

ghost opened this issue Jun 5, 2020 · 8 comments · Fixed by #13650
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/efs Issues and PRs that pertain to the efs service.
Milestone

Comments

@ghost
Copy link

ghost commented Jun 5, 2020

This issue was originally opened by @pll as hashicorp/terraform#25157. It was migrated here as a result of the provider split. The original body of the issue is below.


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 ghost added the service/efs Issues and PRs that pertain to the efs service. label Jun 5, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 5, 2020
@pll
Copy link

pll commented Jun 6, 2020

Hi @ewbankkit,

I really wanted to use the per-AZ DNS name to isolate where my EFS volumes are accessed from, and by what. But yeah, I can make do with just the filesystem DNS name for now.

Thanks for jumping on this so quickly!

@DrFaust92
Copy link
Collaborator

DrFaust92 commented Jun 6, 2020

I've addressed this in #13650 (with some other minor changes)

@pll
Copy link

pll commented Jun 7, 2020

@DrFaust92 - Awesome! Thanks for such a quick turn-around!

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 17, 2020
@bflad bflad added this to the v2.67.0 milestone Jun 17, 2020
@bflad
Copy link
Contributor

bflad commented Jun 17, 2020

Support for new mount_target_dns_name attributes on the resource and data source has been merged and will release with version 2.67.0 of the Terraform AWS Provider, likely tomorrow. 👍 Thanks to @DrFaust92 for the implementation.

@pll
Copy link

pll commented Jun 17, 2020

@bflad & @DrFaust92 - Awesome! Thank you so much for the quick turn-around on this. I'll be sure to give it a try tomorrow, or as soon as 2.67.0 is released!

@ghost
Copy link
Author

ghost commented Jun 19, 2020

This has been released in version 2.67.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link
Author

ghost commented Jul 18, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/efs Issues and PRs that pertain to the efs service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants