Terraform Version
0.9.7
Affected Resource(s)
"http" datasource
Terraform Configuration Files
data "http" "openstack" {
url = "http://169.254.169.254/openstack/latest/meta_data.json"
}
Actual Behavior
Not working:
Error refreshing state: 1 error(s) occurred:
* data.http.main: 1 error(s) occurred:
* data.http.main: data.http.main: Content-Type is not a text type. Got: application/json; charset=UTF-8
In source code builtin/providers/http/data_source.go:
func isContentTypeAllowed(contentType string) bool {
allowedContentTypes := []*regexp.Regexp{
regexp.MustCompile("^text/.+"),
regexp.MustCompile("^application/json$"),
}
The regexp for "application/json" is too strict, as the charset can also be included by the web server
Terraform Version
0.9.7
Affected Resource(s)
"http" datasource
Terraform Configuration Files
Actual Behavior
Not working:
In source code builtin/providers/http/data_source.go:
The regexp for "application/json" is too strict, as the charset can also be included by the web server