hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.63k forks source link

Unable to deploy Azure Lighthouse using Terraform : azurerm_lighthouse_definition Error: The argument "scope" is required, but no definition was found. #8955

Closed AmineBenbouzid closed 4 years ago

AmineBenbouzid commented 4 years ago

Hi,

A few days ago I tried to deploy azure lighthouse using Terraform.

Terraform Version

Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/azurerm v2.28.0

Terraform Configuration Files

# Configure the Azure Provider
provider azurerm {
  # whilst the `version` attribute is optional, we recommend pinning to a given version of the Provider
  version = "2.0.0"
  features {}
}

data "azurerm_role_definition" "contributor" {
  role_definition_id = "b24988ac-6180-42a0-ab88-20f7382dd24c"
}

resource "azurerm_lighthouse_definition" "example" {
  name               = "test"
  description        = "This is a lighthouse definition created via Terraform"
  managing_tenant_id = "yyyyyyyyy-yyyyyyyyyyy-yyyyyyyy-yyyyyyy"

  authorization {
    principal_id       = "yyyyy-yyyyyy-yyyyyyyy-yyyyyyyy"
    role_definition_id = data.azurerm_role_definition.contributor.role_definition_id
  }
}

Actual Behavior

Error: The argument "scope" is required, but no definition was found.
Please,Why it's mandatory to define a "scope" and how can i do it ? 
tombuildsstuff commented 4 years ago

hi @AmineBenbouzid

Thanks for opening this issue.

This forum is intended to be used for feature enhancements and bugs in the Azure Provider - so that we can keep this forum focused on that we instead ask that broader questions are raised using one of the Community Resources. As such I'm going to close this issue for the moment, but I believe you should be able to get an answer for this using one of the Community Resources.

Thanks!

ghost commented 3 years ago

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 👉 hashibot-feedback@hashicorp.com. Thanks!