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

Copilot Studio isn't deleted from environment but tfstate confirms it does #455

Open
sundium opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sundium
Copy link

sundium commented Sep 19, 2024

Describe the bug

When removing a copilot studio bot resource, it's not getting deleted from the target Power Platform environment, even the tfstate says so.

To Reproduce

Steps to reproduce the behavior:

  1. Add the following resource
  2. Then remove it
  3. tfstate confirms removal
  4. Resource isn't deleted from target Power Platform environment (confirmed through real time OData endpoint call)

Sample Terraform Code

resource "powerplatform_data_record" "sample_bot" { environment_id = powerplatform_environment.dev.id table_logical_name = "bot" columns = { name = var.copilot_name // e.g. test01 schemaname = var.copilot_schemaname // e.g. new_test01 template = var.copilot_template_version // default-2.1.0 } }

If applicable, add terraform code to help explain your problem.

Expected behaviour

A clear and concise description of what you expected to happen.

  • When this bot resource is removed (commented out).
  • tf state confirms its removal
  • The resource actually gets removed from the target environment (which it doesn't).

System Information

  • Provider Version: [2.7.0-preview]
  • OS & Version: [Windows]

Additional context

When creating a Copilot Studio bot, it creates several records across multiple tables

  • 1 x bot for the Copilot record
  • n x botcomponent for topics, global variables etc.

I speculate it the botcomponent records would prevent the deletion of the bot records due to referential integrity.

Contribution

Do you plan to raise a PR to address this issue? YES

@sundium sundium added the bug Something isn't working label Sep 19, 2024
@sundium
Copy link
Author

sundium commented Sep 19, 2024

Thunder client HTTP action call for validation in environment.

thunder-collection_Create Bot (template).json

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
Development

No branches or pull requests

1 participant