Skip to content

Commit

Permalink
fix: SetTlsConfig wasn't executed in adguard_config resource dele…
Browse files Browse the repository at this point in the history
…te operation (#115)
  • Loading branch information
gmichels authored Dec 5, 2024
1 parent 4e04d6d commit da97370
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adguard/config_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,11 @@ func (r *configResource) Delete(ctx context.Context, req resource.DeleteRequest,
tlsConfig.PrivateKey = ""
tlsConfig.CertificatePath = ""
tlsConfig.PrivateKeyPath = ""
// plain DNS is required in case encryption protocols are disabled
tlsConfig.ServePlainDns = true

// set dns access list to defaults
_, err = r.adg.SetAccess(dnsAccess)
// set tls config to defaults
_, err = r.adg.SetTlsConfig(tlsConfig)
if err != nil {
resp.Diagnostics.AddError(
"Error Deleting AdGuard Home Config",
Expand Down

0 comments on commit da97370

Please sign in to comment.