From 4a4268b114032d6674b6a7c725fe8a8a0f410185 Mon Sep 17 00:00:00 2001 From: kt Date: Fri, 12 Oct 2018 20:44:20 -0700 Subject: [PATCH] Address more PR #2043 comments --- .../resource_arm_security_center_subscription_pricing.go | 7 ++++--- .../docs/r/security_center_subscription_pricing.markdown | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/azurerm/resource_arm_security_center_subscription_pricing.go b/azurerm/resource_arm_security_center_subscription_pricing.go index 20371983d0fd..b9f35ffa30bf 100644 --- a/azurerm/resource_arm_security_center_subscription_pricing.go +++ b/azurerm/resource_arm_security_center_subscription_pricing.go @@ -12,7 +12,7 @@ import ( //NOTE: seems default is the only valid pricing name: //Code="InvalidInputJson" Message="Pricing name 'kt's price' is not allowed. Expected 'default' for this scope." -const securityCenterConfigurationSubscriptionPricingName = "default" +const securityCenterSubscriptionPricingName = "default" func resourceArmSecurityCenterSubscriptionPricing() *schema.Resource { return &schema.Resource{ @@ -42,7 +42,7 @@ func resourceArmSecurityCenterSubscriptionPricingUpdate(d *schema.ResourceData, client := meta.(*ArmClient).securityCenterPricingClient ctx := meta.(*ArmClient).StopContext - name := securityCenterConfigurationSubscriptionPricingName + name := securityCenterSubscriptionPricingName pricing := security.Pricing{ PricingProperties: &security.PricingProperties{ @@ -72,7 +72,7 @@ func resourceArmSecurityCenterSubscriptionPricingRead(d *schema.ResourceData, me client := meta.(*ArmClient).securityCenterPricingClient ctx := meta.(*ArmClient).StopContext - resp, err := client.GetSubscriptionPricing(ctx, securityCenterConfigurationSubscriptionPricingName) + 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) @@ -91,5 +91,6 @@ func resourceArmSecurityCenterSubscriptionPricingRead(d *schema.ResourceData, me } func resourceArmSecurityCenterSubscriptionPricingDelete(_ *schema.ResourceData, _ interface{}) error { + log.Printf("[DEBUG] Security Center Subscription deletion invocation") return nil //cannot be deleted. } diff --git a/website/docs/r/security_center_subscription_pricing.markdown b/website/docs/r/security_center_subscription_pricing.markdown index e5f87402266b..957cc491ace3 100644 --- a/website/docs/r/security_center_subscription_pricing.markdown +++ b/website/docs/r/security_center_subscription_pricing.markdown @@ -10,7 +10,9 @@ description: |- Manages the Pricing Tier for Azure Security Center in the current subscription. -~> **NOTE:** Owner access permission is required. +~> **NOTE:** This resource requires the `Owner` permission on the Subscription. + +~> **NOTE:** Deletion of this resource does not change or reset the pricing tier to `Free` ## Example Usage @@ -24,7 +26,7 @@ resource "azurerm_security_center_subscription_pricing" "example" { The following arguments are supported: -* `tier` - (Required) The pricing tier to use. Must be one of `Free` or `Standard`. +* `tier` - (Required) The pricing tier to use. Possible values are `Free` and `Standard`. ~> **NOTE:** Changing the pricing tier to `Standard` affects all resources in the subscription and could be quite costly. @@ -40,5 +42,5 @@ The following attributes are exported: The pricing tier can be imported using the `resource id`, e.g. ```shell -terraform import azurerm_securitycenter_subscription_pricing.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/pricings/default +terraform import azurerm_security_center_subscription_pricing.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/pricings/default ```