terraform-provider-power-platform icon indicating copy to clipboard operation
terraform-provider-power-platform copied to clipboard

Import functionality

Open MarvinBangert opened this issue 1 year ago • 2 comments

Description

It would be great to have an "Import" function within the resources, like it is within azurerm functions to import existing infrastructure like environments using Environment ID or DLP. Example from azurerm_application_gateway

Resource

  • Resource Name: terraform import powerplatform_environment.example
  • API documentation:
  • Estimated complexity/effort:
  • Related resources/data sources:

Potential Terraform Configuration

# Sample Terraform config that describes how the new resource might look.

terraform import powerplatform_environment.example
terraform import powerplatform_data_loss_prevention_policy.example

Definition of Done

  • [ ] Data Transfer Objects (dtos)
  • [ ] Data Client functions
  • [ ] Resource Implementation
  • [ ] Resource Added to Provider
  • [ ] Unit Tests for Happy Path
  • [ ] Unit Tests for error path
  • [ ] Acceptance Tests
  • [ ] Example in the /examples folder
  • [ ] Schema Documentation in code
  • [ ] Updated auto-generated provider docs with make docs

Contributions

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

See the contributing guide for more information about what's expected for contributions.

MarvinBangert avatar Aug 17 '24 01:08 MarvinBangert

Hi @MarvinBangert,

I hope you are doing well.

If I am not wrong - I will let the maintainers correct me if it is the case - you can already achieve this 😊 It is something I included in a GitHub workflow and you can see the behavior with a previous run.

Have a great weekend. Regards, Raphael

rpothin avatar Aug 17 '24 01:08 rpothin

Hi @rpothin, thanks for your quick reply! I will check this out, didn't found anything in the Terraform docs, so I thought it's not implemented yet.

Have a great start into the week! BR Marvin

MarvinBangert avatar Aug 18 '24 21:08 MarvinBangert

Repurposing this to be a documentation task since this functionality should be already available on the resources.

mattdot avatar Aug 29 '24 18:08 mattdot