Closed webstean closed 1 month ago
For solution_url, unless the API explicitly supports loading a solution from url, I think the "terraform" way to do this would be to use a local provisioner to download the file and then just use solution_file
resource "null_resource" "solution_zip" {
provisioner "local-exec" {
command = "curl -o solution.zip https://example.com/solution.zip"
}
provisioner "local-exec" {
when = destroy
command = "rm solution.zip"
}
}
will get back to you on app source
Looks like appsource uses a different API https://api.admin.powerplatform.microsoft.com/api/AppManagement/AddTenantAppSourceRequest?geoType=Na
. We will discuss.
We do support appsource as a separate resource: https://github.com/microsoft/terraform-provider-power-platform/blob/main/examples/resources/powerplatform_environment_application_packages/resource.tf
This resource's documentation does not include any mention of appsource and talks about the "Dynamics 365 applications" which is very legacy commentary. So that probably needs to be modernised / updated.
powerplatform_environment_application_package_install (Resource) includes the statement: -
This resource does not support updating or deleting applications. The expected behavior is that the application is installed and remains installed until the environment is deleted.
So that is extremely limiting, and I don't see how the provider can go to GA, with these sort of limitations, it should support both deleting / upgrading existing solutions/applications.
Changed this issue, to be about improving: _powerplatform_environment_application_packageinstal (resource)
Yeah, that resource is not for AppSource. We don't have a way to install from appsource right now.
That resource covers what the current documentation and admin center UI calls Dynamics 365 apps
https://learn.microsoft.com/en-us/power-platform/admin/manage-apps
The terminology Power Platform itself uses is very confusing in this space since you have solutions, app packages, d365 tenant apps, d365 environment apps, app source, etc. As much as possible we want to be consistent with how admin center or the underlying API refers to features to avoid confusion. But there's clearly some confusion here. I like how you're thinking about the space. I don't know if/how we can unify all these concepts into one resource. Willing to keep exploring though.
Thanks for the clarification and guidance, I've updated my issues appropriately.
For solution_url, unless the API explicitly supports loading a solution from url, I think the "terraform" way to do this would be to use a local provisioner to download the file and then just use solution_file
resource "null_resource" "solution_zip" { provisioner "local-exec" { command = "curl -o solution.zip https://example.com/solution.zip" } provisioner "local-exec" { when = destroy command = "rm solution.zip" } }
@mattdot Yes, you could do that, but the goal of a provider should be hide the details of the underlying API from the terraform developer. I would imagine it would be a requirement to install a solution ZIP file from a Storage Blob (which could just be a URL) and the provider should support that directly, regardless of if the underlying API supports it or not. IMHO.
We did some research on this. App Source, Catalog, and D365 apps are all installed as "application packages" which may not be a single solution. Could be 0 to many. Therefore, it doesn't make sense to combine these with the solution resource. Because they are all slightly different they will be in separate resource types. We will add a resource to the backlog for appsource. Let us know if you need Catalog.
We did some research on this. App Source, Catalog, and D365 apps are all installed as "application packages" which may not be a single solution. Could be 0 to many. Therefore it doesn't make sense to combine these with the solution resource.
Description
Allow solution installation from Microsoft ApppSource and ideally from any URL for the maximum flexibility.
Resource
Potential Terraform Configuration
Definition of Done
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.