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

[BUG] Provider produced inconsistent result after apply #174

Open
1 task done
Lachlan-White opened this issue Dec 27, 2024 · 2 comments Β· May be fixed by #182
Open
1 task done

[BUG] Provider produced inconsistent result after apply #174

Lachlan-White opened this issue Dec 27, 2024 · 2 comments Β· May be fixed by #182
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Lachlan-White
Copy link

πŸ› What happened?

Image

Error when using a data object to create multiple workspaces for multiple domains at the same time. Using a custom local variable.

πŸ”¬ How to reproduce?

Image

πŸ—οΈ Code Sample / Log

No response

πŸ“· Screenshots

No response

πŸ“ˆ Expected behavior

Provisioned Workspaces linked to domains

🌌 Environment (Provider Version)

0.1.0-beta.7

🌌 Environment (Terraform Version)

1.10.3

🌌 Environment (OS)

Windows

πŸ“Ž Additional context

No response

πŸ”° Code of Conduct

  • I agree to follow this project's Code of Conduct.
@DariuszPorowski
Copy link
Member

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 domain_workspace_assigments, but must be only 1 per domain - domain is subject, not workspace.

Potential workaround for now:

resource "fabric_domain_workspace_assignments" "this" {
  for_each = {
    for domain_key, domain in var.fabric_domains : domain_key => domain
  }
  workspace_ids = [
    for ws_key, ws in local.workspace_configs :
    fabric_workspace.this[ws_key].id if ws.domain_id == try(fabric_domain.parent[each.key].id, fabric_domain.child[each.key].id)
  ]
  domain_id = try(fabric_domain.parent[each.key].id, fabric_domain.child[each.key].id)
}

It will be fixed in #182

@DariuszPorowski DariuszPorowski self-assigned this Jan 8, 2025
@DariuszPorowski DariuszPorowski added this to the 2025-01 milestone Jan 8, 2025
@DariuszPorowski DariuszPorowski changed the title [BUG] - Provider produced inconsistent result after apply [BUG] Provider produced inconsistent result after apply Jan 8, 2025
@Lachlan-White
Copy link
Author

Perfect @DariuszPorowski workaround is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants