Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrading the Security API to 2017-08-01-preview #3269

Merged
merged 1 commit into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights"
"github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"
"github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v2.0/security"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v1.0/security"
"github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr"
"github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql"
MsSql "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql"
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_security_center_contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"

"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v2.0/security"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v1.0/security"
"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
Expand Down
8 changes: 4 additions & 4 deletions azurerm/resource_arm_security_center_subscription_pricing.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v2.0/security"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v1.0/security"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
Expand Down Expand Up @@ -53,11 +53,11 @@ func resourceArmSecurityCenterSubscriptionPricingUpdate(d *schema.ResourceData,
},
}

if _, err := client.Update(ctx, name, pricing); err != nil {
if _, err := client.UpdateSubscriptionPricing(ctx, name, pricing); err != nil {
return fmt.Errorf("Error creating/updating Security Center Subscription pricing: %+v", err)
}

resp, err := client.Get(ctx, name)
resp, err := client.GetSubscriptionPricing(ctx, name)
if err != nil {
return fmt.Errorf("Error reading Security Center Subscription pricing: %+v", err)
}
Expand All @@ -74,7 +74,7 @@ func resourceArmSecurityCenterSubscriptionPricingRead(d *schema.ResourceData, me
client := meta.(*ArmClient).securityCenterPricingClient
ctx := meta.(*ArmClient).StopContext

resp, err := client.Get(ctx, securityCenterSubscriptionPricingName)
resp, err := client.GetSubscriptionPricing(ctx, securityCenterSubscriptionPricingName)
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
log.Printf("[DEBUG] Security Center Subscription was not found: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func testCheckAzureRMSecurityCenterSubscriptionPricingExists(resourceName string

pricingName := rs.Primary.Attributes["pricings"]

resp, err := client.Get(ctx, pricingName)
resp, err := client.GetSubscriptionPricing(ctx, pricingName)
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
return fmt.Errorf("Security Center Subscription Pricing %q was not found: %+v", pricingName, err)
Expand Down
4 changes: 2 additions & 2 deletions azurerm/resource_arm_security_center_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v2.0/security"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v1.0/security"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
Expand Down Expand Up @@ -67,7 +67,7 @@ func resourceArmSecurityCenterWorkspaceCreateUpdate(d *schema.ResourceData, meta

//get pricing tier, workspace can only be configured when tier is not Free.
//API does not error, it just doesn't set the workspace scope
price, err := priceClient.Get(ctx, securityCenterSubscriptionPricingName)
price, err := priceClient.GetSubscriptionPricing(ctx, securityCenterSubscriptionPricingName)
if err != nil {
return fmt.Errorf("Error reading Security Center Subscription pricing: %+v", err)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading