Skip to content

Commit

Permalink
Add 'include: dns_records' to TLS configuration by ID lookup in data …
Browse files Browse the repository at this point in the history
…source (#392)

It was missing and dns_records weren't populated when using

data "fastly_tls_configuration" "configuration_by_id" {
  id = data.fastly_tls_configuration.default_configuration.id
}

but they were populated when using any other search filter. This was
because the lookup by ID used the GetCustomTLSConfiguration call in
go-fastly whereas the others used ListCustomTLSConfigurations and
filtered them locally. Therefore the former call was missing the
required flag.
  • Loading branch information
bengesoff authored Apr 1, 2021
1 parent 5f6c119 commit cd24eda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fastly/data_source_fastly_tls_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func dataSourceFastlyTLSConfigurationRead(_ context.Context, d *schema.ResourceD

if v, ok := d.GetOk("id"); ok {
config, err := conn.GetCustomTLSConfiguration(&fastly.GetCustomTLSConfigurationInput{
ID: v.(string),
ID: v.(string),
Include: "dns_records",
})
if err != nil {
return diag.FromErr(err)
Expand Down

0 comments on commit cd24eda

Please sign in to comment.