Skip to content

Commit

Permalink
Improve documentation around powerplatform_environment_application_pa…
Browse files Browse the repository at this point in the history
…ckage_install resource (#538)

* adding changie check on PR pipelime

* pipeline update

* pipeline user info fix

* adding changie log

* optimizing script in the pipeline

* change pipline code

* reverting pipeline code

* Enhance documentation for powerplatform_environment_application_package_install resource with known limitations and improved descriptions

* adding changie automatic check pipeline

* update how we install changie in the pipeline

* fix typo

* Update changie command to use 'prerelease' instead of 'dev' and clean up commented-out steps in the workflow

* commenting out part where comment is added automatically

* Improve documentation for powerplatform_environment_application_package_install resource

* removing commented code

---------

Co-authored-by: github-actions[bot] <[email protected]>
  • Loading branch information
mawasile and github-actions[bot] authored Dec 6, 2024
1 parent cf190e2 commit c3f61bc
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changes/unreleased/documentation-20241204-093950.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: documentation
body: Improve documentation around powerplatform_environment_application_package_install resource
time: 2024-12-04T09:39:50.726689481Z
custom:
Issue: "538"
86 changes: 86 additions & 0 deletions .github/workflows/check_changie_comment_on_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: Changelog

on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
workflow_dispatch:

concurrency:
group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref || null, github.head_ref || null) }}
cancel-in-progress: true

permissions:
contents: read
issues: write
pull-requests: write

jobs:
changelog-existence:
name: Check Changelog
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Check if changelog file was added
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changelog_check
with:
filters: |
exists:
- added|modified: '.changes/unreleased/**.yaml'
- name: Setup Go
if: steps.changelog_check.outputs.exists == 'true'
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: go.mod
cache: true

- name: Install Changie
if: steps.changelog_check.outputs.exists == 'true'
run: |
go install github.com/miniscruff/changie@latest
go mod download
- name: Pass if changelog entry exists
if: steps.changelog_check.outputs.exists == 'true'
run: |
echo "Changelog entry exists."
exit 0
- name: Fail if changelog entry is missing and required
if: steps.changelog_check.outputs.exists == 'false'
run: |
echo "🛑 Changelog entry required to merge."
exit 1
changelog-skip:
name: Check Changelog
if: ${{ contains(github.event.pull_request.labels.*.name, 'skip-changelog') || github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Find comment
if: github.actor != 'dependabot[bot]'
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: github-actions[bot]
body-includes: "<!-- changelog -->"

- name: Delete comment
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: github.actor != 'dependabot[bot]' && steps.fc.outputs.comment-id != ''
with:
script: |
github.rest.issues.deleteComment({
...context.repo,
comment_id: ${{ steps.fc.outputs.comment-id }},
});
- name: Pass (skip)
run: exit 0
12 changes: 7 additions & 5 deletions docs/resources/environment_application_package_install.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "powerplatform_environment_application_package_install Resource - powerplatform"
subcategory: ""
description: |-
This resource allows you to install a Dynamics 365 application in an environment.
This is functionally equivalent to the 'Install' button in the Power Platform admin center or pac application install in the Power Platform CLI https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli#pac-application-install. This resource uses the Install Application Package https://learn.microsoft.com/rest/api/power-platform/appmanagement/applications/install-application-package endpoint in the Power Platform API.
~> 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.
This is functionally equivalent to the 'Install' button in the Power Platform admin center or [`pac application install` in the Power Platform CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli#pac-application-install). This resource uses the [Install Application Package](https://learn.microsoft.com/rest/api/power-platform/appmanagement/applications/install-application-package) endpoint in the Power Platform API.
---

# powerplatform_environment_application_package_install (Resource)
Expand All @@ -14,7 +12,11 @@ This resource allows you to install a Dynamics 365 application in an environment

This is functionally equivalent to the 'Install' button in the Power Platform admin center or [`pac application install` in the Power Platform CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli#pac-application-install). This resource uses the [Install Application Package](https://learn.microsoft.com/rest/api/power-platform/appmanagement/applications/install-application-package) endpoint in the Power Platform API.

~> 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.

## Known Limitations

- This resource only supports the installation of applications. Once installed, the application will remain until the environment is deleted; updates or deletions are not supported.
- Not all applications are available in every region. Depending on the location of your `powerplatform_environment`, you may encounter the `Package requested for installation was not found` error if the application is not available in that region.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (r *EnvironmentApplicationPackageInstallResource) Schema(ctx context.Contex
defer exitContext()
resp.Schema = schema.Schema{
Description: "PowerPlatform application",
MarkdownDescription: "This resource allows you to install a Dynamics 365 application in an environment.\n\nThis is functionally equivalent to the 'Install' button in the Power Platform admin center or [`pac application install` in the Power Platform CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli#pac-application-install). This resource uses the [Install Application Package](https://learn.microsoft.com/rest/api/power-platform/appmanagement/applications/install-application-package) endpoint in the Power Platform API.\n\n~> 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.",
MarkdownDescription: "This resource allows you to install a Dynamics 365 application in an environment.\n\nThis is functionally equivalent to the 'Install' button in the Power Platform admin center or [`pac application install` in the Power Platform CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli#pac-application-install). This resource uses the [Install Application Package](https://learn.microsoft.com/rest/api/power-platform/appmanagement/applications/install-application-package) endpoint in the Power Platform API.",
Attributes: map[string]schema.Attribute{
"timeouts": timeouts.Attributes(ctx, timeouts.Opts{
Create: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
description: |-
{{ .Description }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}


## Known Limitations

- This resource only supports the installation of applications. Once installed, the application will remain until the environment is deleted; updates or deletions are not supported.
- Not all applications are available in every region. Depending on the location of your `powerplatform_environment`, you may encounter the `Package requested for installation was not found` error if the application is not available in that region.

{{ if .HasExample -}}
## Example Usage

{{tffile .ExampleFile }}
{{- end }}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{codefile "shell" .ImportFile }}
{{- end }}

0 comments on commit c3f61bc

Please sign in to comment.