Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/add-support…
Browse files Browse the repository at this point in the history
…-for-DLP-policies
  • Loading branch information
vmanilo committed Sep 1, 2024
2 parents 48ec1e3 + 3cb9dbe commit 1693817
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions twingate/internal/provider/resource/dns-filtering-profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,14 @@ func (r *dnsFilteringProfile) Read(ctx context.Context, req resource.ReadRequest

profile, err := r.client.ReadDNSFilteringProfile(ctx, state.ID.ValueString())

if !convertBoolDefaultTrue(state.AllowedDomains.Attributes()[attr.IsAuthoritative]) {
profile.AllowedDomains = convertDomains(state.AllowedDomains)
}
if profile != nil {
if !convertBoolDefaultTrue(state.AllowedDomains.Attributes()[attr.IsAuthoritative]) {
profile.AllowedDomains = convertDomains(state.AllowedDomains)
}

if !convertBoolDefaultTrue(state.DeniedDomains.Attributes()[attr.IsAuthoritative]) {
profile.DeniedDomains = convertDomains(state.DeniedDomains)
if !convertBoolDefaultTrue(state.DeniedDomains.Attributes()[attr.IsAuthoritative]) {
profile.DeniedDomains = convertDomains(state.DeniedDomains)
}
}

r.helper(ctx, profile, &state, &resp.State, &resp.Diagnostics, err, operationRead)
Expand Down

0 comments on commit 1693817

Please sign in to comment.