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_directory_service_directory data source is not pulling DNS IP addresses for shared ADs #20818

Closed
jValdron opened this issue Sep 7, 2021 · 2 comments · Fixed by #20819
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ds Issues and PRs that pertain to the ds service.
Milestone

Comments

@jValdron
Copy link
Contributor

jValdron commented Sep 7, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Data source for AD is not pulling the DNS IP addresses when we're pulling info for a shared AD.

Terraform CLI and Terraform AWS Provider Version

Terraform v0.14.11
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v3.50.0
+ provider registry.terraform.io/hashicorp/external v2.1.0
+ provider registry.terraform.io/hashicorp/http v2.1.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.3.2
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/hashicorp/tls v3.1.0

Code for data_source_aws_directory_service_directory hasn't changed since 3.50.0, so shouldn't be a problem.

Affected Resource(s)

  • data.aws_directory_service_directory

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

data "aws_directory_service_directory" "ad" {
  directory_id = var.active_directory.shared_id # ID of shared AD
}

Debug Output

Relevant output, with some info masked:

2021-09-07T10:12:16.084-0300 [INFO]  plugin.terraform-provider-aws_v3.50.0_x5: 2021/09/07 10:12:16 [DEBUG] Received DS directory: {
  AccessUrl: "",
  Alias: "",
  DesiredNumberOfDomainControllers: 0,
  DirectoryId: "d-x",
  Edition: "Enterprise",
  LaunchTime: 2021-09-02 14:08:56.905 +0000 UTC,
  Name: "x",
  OwnerDirectoryDescription: {
    AccountId: "x",
    DirectoryId: "d-x",
    DnsIpAddrs: ["10.72.134.60","10.72.135.246"],
    VpcSettings: {
      AvailabilityZones: ["eu-central-1b","eu-central-1c"],
      SubnetIds: ["subnet-x","subnet-x"],
      VpcId: "vpc-x"
    }
  },
hareMethod: "ORGANIZATIONS",
  ShareStatus: "Shared",
  ShortName: "x",
  Size: "Large",
  SsoEnabled: false,
  Stage: "Active",
  StageLastUpdatedDateTime: 2021-09-02 14:08:56.905 +0000 UTC,
  Type: "SharedMicrosoftAD"
}: timestamp=2021-09-07T10:12:16.084-0300

Panic Output

Expected Behavior

# module.infrastructure_euc1.data.aws_directory_service_directory.ad[0]:
data "aws_directory_service_directory" "ad" {
    connect_settings = []
    directory_id     = "d-x"
    dns_ip_addresses = ["10.72.134.60","10.72.135.246"]
    edition          = "Enterprise"
    enable_sso       = false
    id               = "d-x"
    name             = "x"
    short_name       = "x"
    size             = "Large"
    tags             = {}
    type             = "SharedMicrosoftAD"
    vpc_settings     = []
}

Actual Behavior

# module.infrastructure_euc1.data.aws_directory_service_directory.ad[0]:
data "aws_directory_service_directory" "ad" {
    connect_settings = []
    directory_id     = "d-x"
    dns_ip_addresses = []
    edition          = "Enterprise"
    enable_sso       = false
    id               = "d-x"
    name             = "x"
    short_name       = "x"
    size             = "Large"
    tags             = {}
    type             = "SharedMicrosoftAD"
    vpc_settings     = []
}

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/directoryservice labels Sep 7, 2021
@ewbankkit ewbankkit 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 Sep 8, 2021
@ewbankkit ewbankkit added the service/ds Issues and PRs that pertain to the ds service. label Jul 26, 2022
@github-actions github-actions bot added this to the v4.26.0 milestone Aug 5, 2022
@github-actions
Copy link

This functionality has been released in v4.26.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. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2022
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/ds Issues and PRs that pertain to the ds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants