How to escape HCL string containing ${aws:username} in "Resource" section?
you can fix it by double dollar $$
refer:
terraform interpolation
You can escape interpolation with double dollar signs: $${foo} will be rendered as a literal ${foo}.
https://github.com/hashicorp/terraform/issues/2965