-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty dns_records in fastly_tls_configuration #391
Comments
Awesome. Thank you. 🙇 |
Is it working for you @zaremjan ? I've been trying to get those dns records with no success. I tried so many things and also I tried your code, but no success too.
|
@JuanFontes you can find the documentation for the https://registry.terraform.io/providers/fastly/fastly/latest/docs/data-sources/tls_configuration It describes the purpose of the data source as follows:
My understanding is that the data source is designed to return a single TLS configuration and so when the Terraform provider makes an API call to get the configuration, if there is more than one potential configuration returned then there's no way for the provider to know which one you want and so it returns the error:
If you take a look at the 'schema' section for that data source page you'll see a list of 'optional' attributes you can set when defining the data source. I believe the more optional attributes you provide, then the more specific the API query will be, and subsequently the number of records returned from the API will be reduced (hopefully to the point where only a single TLS configuration is returned). Hope this helps. |
Terraform Version
Affected Resource(s)
fastly_tls_configuration
Terraform Configuration Files
Expected Behavior
When obtaining
fastly_tls_configuration
by id it should havedns_records
present. So for the configuration pasted above outputconfiguration_by_id_dns_records
should not be empty.Actual Behavior
dns_records
attribute is empty when fetchingfastly_tls_configuration
by id. So for the configuration pasted above outputconfiguration_by_id_dns_records
is an empty list.Steps to Reproduce
terraform apply
Other
My guess is that the issue is caused by the lack of
Include
inGetCustomTLSConfigurationInput
here:terraform-provider-fastly/fastly/data_source_fastly_tls_configuration.go
Lines 113 to 115 in eb0e2ae
The text was updated successfully, but these errors were encountered: