Hi there,
Terraform v0.10.7
aws_directory_service_directory
resource "aws_directory_service_directory" "active-directory" {
name = "${var.name}"
password = "${var.password}"
type = "MicrosoftAD"
size = "Small"
vpc_settings {
vpc_id = "${var.vpc_id}"
subnet_ids = ["${var.subnet1}", "${var.subnet2}"]
}
}
I would expect a Microsoft AD to be created on AWS with a Size of Standard
Microsoft AD is created with a Size of Enterprise
terraform applyI couldn't find in the AWS docs but there is only one size (Large/Enterprise) for type = MicrosoftAD. If you try to create MicrosoftAD in the console, you will notice there are no options for size.
I think it's something of a new feature. You can see the option in the API docs.
Edit: Does look to be hard-coded to Large
Edit 2: Rather, the size option is not passed to the SDK call
There is an option for Standard and Enterprise from the console. If you create a standard in the console and import it to terraform it reads as Small. I think it’s also an issue in the Go AWS API.
Sent from my iPad
On 8 Nov 2017, at 21:54, Edward Bartholomew notifications@github.com wrote:
I couldn't find in the AWS docs but there is only one size (Large/Enterprise) for type = MicrosoftAD. If you try to create MicrosoftAD in the console, you will notice there are no options for size.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I just tried and didn’t have any option called Size like there is for SimpleAD. There is a distinction between Microsoft AD Standard Edition and Microsoft AD Enterprise Edition which I don’t remember from a couple months ago. Thanks for the link lorengordon. Seems size terminology could also refer to edition for type=MicrosoftAD going forward?
Seems size terminology could also refer to edition for type=MicrosoftAD going forward?
@edwardbartholomew That's what it seems to me:
type=MicrosoftAD and size=Small would be Standard Edition.type=MicrosoftAD and size=Large would be Enterprise Edition. I think this issue is two-fold...
a) We need to pass through size as part of the createActiveDirectoryService function.
b) Looking through Amazon's API it would seem like the size parameter is missing at their end too for MicrosoftAD. Has anyone already raised this as a feature request to AWS?
@philharle it looks to me like it's present in the API: http://docs.aws.amazon.com/directoryservice/latest/devguide/API_CreateMicrosoftAD.html#DirectoryService-CreateMicrosoftAD-request-Size.
Where are you looking that makes it seem otherwise?
@lorengordon Apologies my bad, I had incorrectly assumed Terraform had a dependency on the AWS SDK.
What I should be saying is that AWS haven't added the size parameter into their own Go SDK. It exists for SimpleAD here:
https://github.com/aws/aws-sdk-go/blob/master/service/directoryservice/api.go#L4694-L4697
but not for MicrosoftAD here:
https://github.com/aws/aws-sdk-go/blob/master/service/directoryservice/api.go#L4801-L4829
@philharle you are quite right. I believe the SDK code is auto-generated from the model, https://github.com/aws/aws-sdk-go/blob/master/models/apis/ds/2015-04-16/api-2.json#L901-L915. That will need to be updated with a Size parameter before terraform can address this issue.
I didn't see an issue on the aws-sdk-go project, so I created one: https://github.com/aws/aws-sdk-go/issues/1664
Seems like the SDK just added this functionality in v1.12.58: https://github.com/aws/aws-sdk-go/releases/tag/v1.12.58
Ah sorry, edition (standard/enterprise) was added in v1.12.58. Created an issue for that specifically: #2912
Implementing Edition just happens to now have an open PR: #3421. 😄
This has been merged into master and will be released in v1.10.0 of the AWS provider, likely the end of this week.
This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
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!
Most helpful comment
@edwardbartholomew That's what it seems to me:
type=MicrosoftADandsize=Smallwould be Standard Edition.type=MicrosoftADandsize=Largewould be Enterprise Edition.