Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ouranos committed Jul 21, 2022
1 parent 6129ebf commit 2ec2c02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions internal/provider/resource_cloudflare_access_application.go
Expand Up @@ -65,8 +65,7 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re
}

if _, ok := d.GetOk("saas_app"); ok {
saasApp := convertSaasSchemaToStruct(d)
newAccessApplication.SaasApplication = saasApp
newAccessApplication.SaasApplication = convertSaasSchemaToStruct(d)
}

tflog.Debug(ctx, fmt.Sprintf("Creating Cloudflare Access Application from struct: %+v", newAccessApplication))
Expand Down
16 changes: 10 additions & 6 deletions internal/provider/schema_cloudflare_access_application.go
Expand Up @@ -124,23 +124,27 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema {
},
},
"saas_app": {
Type: schema.TypeList,
Optional: true,
Type: schema.TypeList,
Optional: true,
Description: "SaaS configuration for the Access Application. See below for reference structure.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"sp_entity_id": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "A globally unique name for an identity or service provider.",
},
"consumer_service_url": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "The service provider's endpoint that is responsible for receiving and parsing a SAML assertion.",
},
"name_id_format": {
Type: schema.TypeString,
Optional: true,
Default: "email",
ValidateFunc: validation.StringInSlice([]string{"email", "id"}, false),
Description: "The format of the name identifier sent to the SaaS application.",
},
},
},
Expand Down

0 comments on commit 2ec2c02

Please sign in to comment.