Skip to content

Commit

Permalink
Address more PR #2043 comments
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Oct 13, 2018
1 parent 9029ed9 commit 4a4268b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions azurerm/resource_arm_security_center_subscription_pricing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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)
Expand All @@ -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.
}
8 changes: 5 additions & 3 deletions website/docs/r/security_center_subscription_pricing.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand All @@ -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
```

0 comments on commit 4a4268b

Please sign in to comment.