Skip to content

Commit

Permalink
Merge branch 'v1' into GH-770-validation-ul-body
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught authored Sep 11, 2023
2 parents dd5d469 + 2cd274c commit 62d9aff
Show file tree
Hide file tree
Showing 3 changed files with 460 additions and 299 deletions.
24 changes: 24 additions & 0 deletions internal/auth0/connection/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var expandConnectionOptionsMap = map[string]expandConnectionOptionsFunc{
management.ConnectionStrategyBox: expandConnectionOptionsOAuth2,
management.ConnectionStrategyWordpress: expandConnectionOptionsOAuth2,
management.ConnectionStrategyShopify: expandConnectionOptionsOAuth2,
management.ConnectionStrategyLine: expandConnectionOptionsOAuth2,
management.ConnectionStrategyCustom: expandConnectionOptionsOAuth2,
management.ConnectionStrategyFacebook: expandConnectionOptionsFacebook,
management.ConnectionStrategyApple: expandConnectionOptionsApple,
Expand Down Expand Up @@ -975,3 +976,26 @@ func passThroughUnconfigurableConnectionOptionsPingFederate(

return nil
}

// checkForUnmanagedConfigurationSecrets is used to assess keys diff because values are sent back encrypted.
func checkForUnmanagedConfigurationSecrets(configFromTF, configFromAPI map[string]string) diag.Diagnostics {
var warnings diag.Diagnostics

for key := range configFromAPI {
if _, ok := configFromTF[key]; !ok {
warnings = append(warnings, diag.Diagnostic{
Severity: diag.Error,
Summary: "Unmanaged Configuration Secret",
Detail: fmt.Sprintf("Detected a configuration secret not managed through terraform: %q. "+
"If you proceed, this configuration secret will get deleted. It is required to "+
"add this configuration secret to your custom database settings to "+
"prevent unintentionally destructive results.",
key,
),
AttributePath: cty.Path{cty.GetAttrStep{Name: "options.configuration"}},
})
}
}

return warnings
}
Loading

0 comments on commit 62d9aff

Please sign in to comment.