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

azurerm_security_center_workspace crashes when creating or updating workspace #9700

Closed
janasikdawid opened this issue Dec 6, 2020 · 4 comments

Comments

@janasikdawid
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_2.39.0
  • terraform_0.14.0
  • template_2.2.0
  • azuread_1.1.1
  • null_3.0.0

Terraform Configuration Files

`resource "azurerm_security_center_workspace" "asc_workspace_hub" {
  scope        = "/subscriptions/${var.hub_subscription_id}"
  workspace_id = var.log_analytics_workspace.id
}`

Debug Output

Panic Output

No Panic Output

Expected Behaviour

Terraform should create / update Azure Security Center Workspace as per plan:
module.azure_security_center.azurerm_security_center_workspace.asc_workspace_hub will be created resource "azurerm_security_center_workspace" "asc_workspace_hub" { id = (known after apply) scope = "/subscriptions/<subscription-id>" workspace_id = "/subscriptions/<subscription-id>/resourceGroups/rg-monitoring-hub-001/providers/Microsoft.OperationalInsights/workspaces/log-monitor-hub-001" }

Actual Behaviour

Terraform crashes with bellow error:
Error: Creating Security Center Workspace: security.WorkspaceSettingsClient#Create: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="LinkedAuthorizationFailed" Message="The client has permission to perform action 'Microsoft.Resources/subscriptions/rg-monitoring-hub-001/Microsoft.OperationalInsights/log-monitor-hub-001/write' on scope '/subscriptions/<subscription-id>', however the linked subscription 'resourceGroups' was not found. "

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@grillba
Copy link

grillba commented Dec 17, 2020

Pinning to 2.38.0 resolves it

@janasikdawid
Copy link
Author

Pinning to 2.38.0 resolves it

I use 2.39.0 which should contain mentioned fix but it is still there.

@janasikdawid
Copy link
Author

Problem has been resolved in 2.41.0 version

@ghost
Copy link

ghost commented Jan 18, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants