Skip to content

Commit

Permalink
refactoring of percent enabled handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Aftab-tech committed Dec 17, 2024
1 parent 5565717 commit 6e4e1aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion provider/resource_edge_deployment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ func createOrUpdateEdgeDeploymentService(d *schema.ResourceData, m interface{})

activateVersion := d.Get("activate_version").(bool)
custom_client_ip := d.Get("custom_client_ip").(bool)
percent_enabled := d.Get("percent_enabled").(int)
err := pm.Client.CreateOrUpdateEdgeDeploymentService(pm.Corp, d.Get("site_short_name").(string), d.Get("fastly_sid").(string), sigsci.CreateOrUpdateEdgeDeploymentServiceBody{
ActivateVersion: &activateVersion,
CustomClientIP: &custom_client_ip,
PercentEnabled: func(i int) *int { return &i }(d.Get("percent_enabled").(int)),
PercentEnabled: &percent_enabled,
})

if err != nil {
Expand Down

0 comments on commit 6e4e1aa

Please sign in to comment.