Skip to content

Commit

Permalink
Merge pull request #9651 from favoretti/favoretti/fix_security_center…
Browse files Browse the repository at this point in the history
…_law_capitalization

Fix LAW capitalization in security_center_workspace
  • Loading branch information
tombuildsstuff authored Dec 3, 2020
2 parents 3a35b17 + 8531b2d commit f44d4da
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"log"
"time"

"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/loganalytics/parse"

"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v3.0/security"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
Expand Down Expand Up @@ -87,10 +89,15 @@ func resourceArmSecurityCenterWorkspaceCreateUpdate(d *schema.ResourceData, meta
return fmt.Errorf("Security Center Subscription workspace cannot be set when pricing tier is `Free`")
}

workspaceID, err := parse.LogAnalyticsWorkspaceID(d.Get("workspace_id").(string))
if err != nil {
return err
}

contact := security.WorkspaceSetting{
WorkspaceSettingProperties: &security.WorkspaceSettingProperties{
Scope: utils.String(d.Get("scope").(string)),
WorkspaceID: utils.String(d.Get("workspace_id").(string)),
WorkspaceID: utils.String(workspaceID.ID("")),
},
}

Expand Down

0 comments on commit f44d4da

Please sign in to comment.