-
Notifications
You must be signed in to change notification settings - Fork 9
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
[BUG] Error during the creation of fabric_domain_workspace_assignments #183
Comments
Hi @ccaeand thank you for taking the time for reporting. May I ask you to provide HCL code what you use that cause this issue? It will help with investigating this bug. |
Hi @DariuszPorowski - Please find below HCL code snippet and relative files for completeness. Assign Workspaces to Domains resource "fabric_domain_workspace_assignments" "domain_assignment" {
for_each = { for ws in var.workspaces : ws.name => ws }
domain_id = each.value.domain_id
workspace_ids = [fabric_workspace.workspace[each.key].id]
lifecycle {
ignore_changes = [workspace_ids]
}
} variable def: variable "workspaces" {
description = "List of workspaces with their details and items"
type = list(object({
name = string
description = optional(string)
identity_type = string
domain_id = string
capacity_id = string
items = object({
lakehouse = object({
name = string
configuration = optional(map(string))
})
notebook = object({
name = string
})
})
}))
}
variable "role_assignments" {
description = "List of workspace role assignments"
type = list(object({
workspace_name = string
role = string
principal_id = string
principal_type = string
}))
} example config.yaml structure: # workspaces:
- name: test-domain1-staging-dev-ws
description: "Test Workspace"
identity_type: SystemAssigned
domain_id: "xxxxxxxxxxxxxxxxxxxxxx"
capacity_id: "xxxxxxxxxxxxxxxxxxxxxx"
items:
lakehouse:
name: test_domain1_staging_dev_lh01
configuration:
enable_schemas: true
notebook:
name: test-domain1-staging-dev-notebook-1
- name: test-domain1-curated-prod-ws
description: "Test Workspace"
identity_type: SystemAssigned
domain_id: "xxxxxxxxxxxxxxxxxxxxx"
capacity_id: "xxxxxxxxxxxxxxxxxxxxxxxxx"
items:
lakehouse:
name: test_domain1_curated_prod_lh01
configuration:
enable_schemas: true
notebook:
name: test-domain1-curated-prod-notebook-1
# role_assignments:
- workspace_name: test-domain1-staging-dev-ws
role: Contributor
principal_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
principal_type: User
- workspace_name: test-domain1-staging-dev-ws
role: Admin
principal_id: "xxxxxxxxxxxxxxxxxxxxx"
principal_type: Group
- workspace_name: test-domain1-curated-prod-ws
role: Admin
principal_id: "xxxxxxxxxxxxxxxxxxxxxxxx"
principal_type: User |
duplicate of #174 Hi @ccaeand Thank you You are trying to assign workspaces to the domain, but you are taking workspace as subject for assignment, so your result is multiple instances of Potential workaround for now: resource "fabric_domain_workspace_assignments" "this" {
domain_id = fabric_domain.this.id
workspace_ids = [for ws in fabric_workspace.this : ws.id]
} It will be fixed in PR #182 |
π What happened?
While applying a configuration using version 0.1.0-beta.7, we encountered an inconsistent result error during the creation of fabric_domain_workspace_assignments resources.
π¬ How to reproduce?
No response
ποΈ Code Sample / Log
Error: Provider produced inconsistent result after apply
β
β When applying changes to
β module.fabric_resources.fabric_domain_workspace_assignments.domain_assignment["test-domain1-curated-prod-ws"],
β provider "provider["registry.terraform.io/microsoft/fabric"]" produced an
β unexpected new value: .workspace_ids: actual set element
β cty.StringVal("4b474cf8-937f-4bc7-999d-71234560d") does not correlate
β with any element in plan.
β
β This is a bug in the provider, which should be reported in the provider's
β own issue tracker.
β΅
β·
β Error: Provider produced inconsistent result after apply
β
β When applying changes to
β module.fabric_resources.fabric_domain_workspace_assignments.domain_assignment["test-domain1-curated-prod-ws"],
β provider "provider["registry.terraform.io/microsoft/fabric"]" produced an
β unexpected new value: .workspace_ids: length changed from 1 to 2.
β
β This is a bug in the provider, which should be reported in the provider's
β own issue tracker.
π· Screenshots
No response
π Expected behavior
No response
π Environment (Provider Version)
0.1.0-beta.7
π Environment (Terraform Version)
v1.10.3
π Environment (OS)
Linux
π Additional context
No response
π° Code of Conduct
The text was updated successfully, but these errors were encountered: