Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

fix breaking changes introduced in cloudflare/cloudflare-go #38

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions cloudflare/resource_cloudflare_access_application.go
Expand Up @@ -40,7 +40,6 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re
EnableBindingCookie: d.Get("enable_binding_cookie").(bool),
CustomDenyMessage: d.Get("custom_deny_message").(string),
CustomDenyURL: d.Get("custom_deny_url").(string),
HttpOnlyCookieAttribute: d.Get("http_only_cookie_attribute").(bool),
SameSiteCookieAttribute: d.Get("same_site_cookie_attribute").(string),
LogoURL: d.Get("logo_url").(string),
SkipInterstitial: d.Get("skip_interstitial").(bool),
Expand All @@ -49,7 +48,8 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re
}

if value, ok := d.GetOk("http_only_cookie_attribute"); ok {
newAccessApplication.HttpOnlyCookieAttribute = value.(bool)
val := value.(bool)
newAccessApplication.HttpOnlyCookieAttribute = &val
}

if len(allowedIDPList) > 0 {
Expand Down Expand Up @@ -151,14 +151,18 @@ func resourceCloudflareAccessApplicationUpdate(ctx context.Context, d *schema.Re
EnableBindingCookie: d.Get("enable_binding_cookie").(bool),
CustomDenyMessage: d.Get("custom_deny_message").(string),
CustomDenyURL: d.Get("custom_deny_url").(string),
HttpOnlyCookieAttribute: d.Get("http_only_cookie_attribute").(bool),
SameSiteCookieAttribute: d.Get("same_site_cookie_attribute").(string),
LogoURL: d.Get("logo_url").(string),
SkipInterstitial: d.Get("skip_interstitial").(bool),
AppLauncherVisible: d.Get("app_launcher_visible").(bool),
ServiceAuth401Redirect: d.Get("service_auth_401_redirect").(bool),
}

if value, ok := d.GetOk("http_only_cookie_attribute"); ok {
val := value.(bool)
updatedAccessApplication.HttpOnlyCookieAttribute = &val
}

if len(allowedIDPList) > 0 {
updatedAccessApplication.AllowedIdps = allowedIDPList
}
Expand Down
2 changes: 1 addition & 1 deletion cloudflare/resource_cloudflare_waiting_room_event.go
Expand Up @@ -54,7 +54,7 @@ func expandWaitingRoomEvent(d *schema.ResourceData) (cloudflare.WaitingRoomEvent
Name: d.Get("name").(string),
EventStartTime: eventStartTime,
EventEndTime: eventEndTime,
PrequeueStartTime: prequeueStartTime,
PrequeueStartTime: &prequeueStartTime,
Description: d.Get("description").(string),
QueueingMethod: d.Get("queueing_method").(string),
ShuffleAtEventStart: d.Get("shuffle_at_event_start").(bool),
Expand Down