I just created a module for aws_security_group and after terraform apply, I got this message: Error: configuration for module.aws_security_group_test.aws_security_group.security_group still contains unknown values during apply (this is a bug in Terraform; please report it!)
That does indeed seem like a bug in Terraform… what you’ve encountered here is a situation that shouldn’t be possible if Terraform is behaving correctly.
What you’ve seen here seems similar to what was reported in this GitHub issue:
If you’d be willing, it’d be helpful if you could add a comment on that issue describing what you saw here. Although you’d be leaving a comment rather than creating a new issue, it’d be most helpful if you could copy our new issue template, paste it into the GitHub issue comment box, and then fill in as much information as you can that is requested in the comments in the template – in particular, we’d like to see the full trace log that the issue template requests. That way the team will have the best chance of being able to reproduce the issue and see if it has the same root cause as the original report.