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 returns list of empty elements for dns_ip_addresses #10926

Closed
bz-keitaro-kobayashi opened this issue Dec 26, 2016 · 7 comments
Assignees

Comments

@bz-keitaro-kobayashi
Copy link

Terraform Version

0.8.2. Rolling back to 0.8.1 and using the same tfstate works.

Affected Resource(s)

  • aws_directory_service_directory

Terraform Configuration Files

resource "aws_directory_service_directory" "central" {
	name = "directory.internal"
	password = "A VERY str0ng passw0rd"
	size = "Small"

	vpc_settings {
		vpc_id = "vpc-ca9448ae"
		subnet_ids = [
			"subnet-f22e88aa",
			"subnet-cca03eba"
		]
	}

	description = "Central authentication / authorization directory for all HRMOS instances"

	type = "SimpleAD"
}

tfstate

Expected Behavior

$ terraform console
> aws_directory_service_directory.central.dns_ip_addresses
[
  10.238.196.254,
  10.238.195.94
]

Actual Behavior

$ terraform console
> aws_directory_service_directory.central.dns_ip_addresses
[
,

]
@jeffreyyoungs-vgs
Copy link

+1

@stack72
Copy link
Contributor

stack72 commented Jan 3, 2017

Just verified that the same behaviour also happens with output

% terraform show
aws_directory_service_directory.central:
  id = d-92672181ec
  access_url = d-92672181ec.awsapps.com
  alias = d-92672181ec
  connect_settings.# = 0
  description = Central authentication / authorization directory for all HRMOS instances
  dns_ip_addresses.# = 2
  dns_ip_addresses.1702074263 = 10.0.1.160
  dns_ip_addresses.263491012 = 10.0.2.61
  enable_sso = false
  name = directory.internal
  password = PasswordMustBeCharsAndNumb3rs
  short_name = directory
  size = Small
  type = SimpleAD
  vpc_settings.# = 1
  vpc_settings.0.subnet_ids.# = 2
  vpc_settings.0.subnet_ids.1976703249 = subnet-6f965d08
  vpc_settings.0.subnet_ids.3331643916 = subnet-b55dbffc
  vpc_settings.0.vpc_id = vpc-36b51f51

Then terraform output of the following causes this:

output "dns_addresses" {
  value = ["${aws_directory_service_directory.central.dns_ip_addresses}"]
}

Outputs:

dns_addresses = [
    ,

]

@2rs2ts
Copy link
Contributor

2rs2ts commented Jan 4, 2017

I believe #10920 will fix this. It addresses problems with treating sets like lists. Pull down my fork and build it and see what you get. If it doesn't work for you, I might need to revisit my PR.

@bz-keitaro-kobayashi
Copy link
Author

I've confirmed that #11042 fixes this problem in my instance.

$ ~/go/bin/terraform --version
Terraform v0.8.3-dev (1cec04b8a715c9601cdc0ddf8291f441f49aa024)
$ ~/go/bin/terraform console
> aws_directory_service_directory.central.dns_ip_addresses
[
  10.238.195.94,
  10.238.196.254
]

@mitchellh
Copy link
Contributor

Dup of #10908. Thanks!

@aaomoware
Copy link

aaomoware commented Feb 22, 2017

terraform v0.8.{6,7}

same ish.
"dns_ip_addresses.#": "0",

@ghost
Copy link

ghost commented Apr 16, 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 Apr 16, 2020
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

7 participants