terraform-provider-aws: aws_appstream_image_builder throws error with empty domain_join_info
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
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.1 on darwin_amd64
- provider registry.terraform.io/hashicorp/aws v4.29.0
- provider registry.terraform.io/hashicorp/external v2.2.2
- provider registry.terraform.io/hashicorp/local v2.2.3
- provider registry.terraform.io/hashicorp/null v3.1.1
- provider registry.terraform.io/hashicorp/random v3.4.2
- provider registry.terraform.io/hashicorp/time v0.8.0
Affected Resource(s)
- aws_appstream_image_builder
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "aws_appstream_image_builder" "image_builder" {
# Image Builder only needs to be created in nonprod and the created image can be shared with prod account
count = var.create_appstream_image_builder ? 1 : 0
name = "My-Image-Builder"
description = "AppStream Image Builder"
display_name = "AppStream Image Builder"
enable_default_internet_access = false
image_name = "My Image Builder"
instance_type = "stream.standard.medium"
vpc_config {
security_group_ids = [module.appstream_sg.security_group_id]
subnet_ids = [local.primary_private_subnet_ids[0]]
}
}
Debug Output
│ Error: error setting domain_join_info for AppStream ImageBuilder (My-Image-Builder): domain_join_info: ‘’: source data must be an array or slice, got map
│
│ with module.persistent.aws_appstream_image_builder.image_builder[0],
│ on …/…/modules/persistent/appstream.tf line 6, in resource “aws_appstream_image_builder” “image_builder”:
│ 6: resource “aws_appstream_image_builder” “image_builder” {
Panic Output
Expected Behavior
AppStream Image Builder should be created without errors
Actual Behavior
AppStream image builder resource fails during terraform plan phase with:
error domain_join_info: '': source data must be an array or slice, got map
Steps to Reproduce
terraform plan
Important Factoids
This error did not occur with hashicorp aws provider version v4.20.0
References
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 11
- Comments: 19 (9 by maintainers)
This still doesn’t seem to be resolved with latest provider version (v4.32.0)
@justinretzolk I created a branch with small changes that fix this, if you want to check out the diff.
I was attempting to create a test for it as well, but my AWS access is very limited and I can’t create the necessary resources to complete it.
anyone looking into the PR, whether is it ok to go forward?
I see exactly how this regression occurred. When #26454 was submitted, an acceptance test for appstream_fleet was performed, however, code in internal/services/appstream/fleet.go is also referenced in internal/services/appstream/image_builder.go, and that code was broken by the mentioned PR, and it was not detected because the acceptance tests for appstream_image_builder were not run.
We are having the same issue when testing 4.36.1. However, our domain_join_info is NOT empty (confirmed by the last applied state file).