Skip to content

Commit 82cfbb3

Browse files
author
Tujit Bora
committed
Merge branch 'fix-custom-provider-plan-state' into 'master'
custom provider state inconsistency fix See merge request cidaas-management/terraform!132
2 parents e1e1fdd + 77fcfad commit 82cfbb3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

helpers/cidaas/custom_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
type Scopes struct {
12-
DisplayLabel string `json:"display_label,omitempty"`
12+
DisplayLabel string `json:"display_label"`
1313
Scopes []ScopeChild `json:"scopes,omitempty"`
1414
}
1515

@@ -28,7 +28,7 @@ type CustomProviderModel struct {
2828
AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"`
2929
TokenEndpoint string `json:"token_endpoint,omitempty"`
3030
ProviderName string `json:"provider_name,omitempty"`
31-
LogoURL string `json:"logo_url,omitempty"`
31+
LogoURL string `json:"logo_url"`
3232
UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"`
3333
UserinfoFields map[string]interface{} `json:"userInfoFields,omitempty"`
3434
Scopes Scopes `json:"scopes,omitempty"`

internal/resources/resource_custom_provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ var customProviderSchema = schema.Schema{
256256
Optional: true,
257257
},
258258
"scope_display_label": schema.StringAttribute{
259-
Required: true,
259+
Optional: true,
260260
MarkdownDescription: "Display label for the scope of the provider.",
261261
},
262262
"userinfo_fields": schema.SingleNestedAttribute{

internal/resources/resource_custom_provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func TestAccCustomProviderResource_InvalidStandardType(t *testing.T) {
195195
func TestAccCustomProviderResource_MissingRequired(t *testing.T) {
196196
requiredParams := []string{
197197
"provider_name", "display_name", "client_id", "client_secret",
198-
"authorization_endpoint", "token_endpoint", "userinfo_endpoint", "scope_display_label",
198+
"authorization_endpoint", "token_endpoint", "userinfo_endpoint",
199199
}
200200
for _, param := range requiredParams {
201201
resource.Test(t, resource.TestCase{

0 commit comments

Comments
 (0)