From 8fac905fb29362a32994d6a3baf8e1ea265d26c0 Mon Sep 17 00:00:00 2001 From: Aftab-tech <79578231+Aftab-tech@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:23:59 +0000 Subject: [PATCH] Update sigsci terraform provider version to v0.1.25 (#234) * Updated go-sig sci version to latest * fixed percent enabled error due to new change, using pointer * refactoring of percent enabled handling --- go.mod | 2 +- go.sum | 4 ++-- provider/resource_edge_deployment_service.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index a879280..d664f60 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/terraform-plugin-docs v0.14.1 github.com/hashicorp/terraform-plugin-sdk v1.14.0 - github.com/signalsciences/go-sigsci v0.1.24 + github.com/signalsciences/go-sigsci v0.1.25 golang.org/x/lint v0.0.0-20190409202823-959b441ac422 honnef.co/go/tools v0.4.2 ) diff --git a/go.sum b/go.sum index 128303c..003f719 100644 --- a/go.sum +++ b/go.sum @@ -257,8 +257,8 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/signalsciences/go-sigsci v0.1.24 h1:9KeviWFDsTo2N9vVBNcYlEMS7q2Lg50lLG40W1bGNAs= -github.com/signalsciences/go-sigsci v0.1.24/go.mod h1:CXwoXk81ZwFdne6o8cnAYwxvke5kcLg7zE6Bl/e1KUo= +github.com/signalsciences/go-sigsci v0.1.25 h1:3uUy0pvgT55yu/GxS48SDiRKcxAJOTcvvb46jmilh0c= +github.com/signalsciences/go-sigsci v0.1.25/go.mod h1:CXwoXk81ZwFdne6o8cnAYwxvke5kcLg7zE6Bl/e1KUo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= diff --git a/provider/resource_edge_deployment_service.go b/provider/resource_edge_deployment_service.go index 2dad644..9ab724a 100644 --- a/provider/resource_edge_deployment_service.go +++ b/provider/resource_edge_deployment_service.go @@ -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: d.Get("percent_enabled").(int), + PercentEnabled: &percent_enabled, }) if err != nil {