Skip to content

resource/datasource primary id should not changes on reapply #292

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

Conversation

mawasile
Copy link
Contributor

@mawasile mawasile commented May 9, 2024

This pull request includes changes across several files, primarily focusing on the modification of the id attribute descriptions and the adjustment of test functions in the Power Platform data sources and resources. The changes also involve the removal and re-addition of a dependency in the go.mod file.

Changes to id attribute descriptions:

  • In multiple files, the description of the id attribute in the Read-Only section has been changed from various previous descriptions to "Id of the read operation". This change has been made in the following files: billing_policies.md, data_loss_prevention_policies.md, environment_powerapps.md, environment_settings.md, environments.md, solutions.md, tenant_settings.md, and environment_settings.md in the docs/data-sources directory and environment_settings.md and tenant_settings.md in the docs/resources directory. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Changes to test functions:

  • In the datasource_applications_test.go, datasource_environment_application_packages_test.go, datasource_securityroles_test.go, and datasource_tenant_settings_test.go files in the internal/powerplatform directory, the test functions have been modified. Changes include the adjustment of the display_name attribute to use a helper function, TestName(), and the modification of the id attribute's regular expression in the TestMatchResourceAttr function. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Changes to go.mod:

  • The github.com/google/uuid dependency has been removed and then re-added as an indirect dependency. [1] [2]

Addition of helper function:

  • A helper function, TestName(), has been added to the mock_helpers.go file in the internal/powerplatform/mocks directory. This function retrieves the name of the test function calling it.

mattdot
mattdot previously approved these changes May 9, 2024
@mawasile mawasile added enhancement New feature or request resource terraform resource data source data source labels May 10, 2024
@mawasile
Copy link
Contributor Author

@mattdot should we remove ids on datasource as it looks like they are not necessary?

Copy link
Contributor

@eduardodfmex eduardodfmex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@eduardodfmex eduardodfmex merged commit 1b8c806 into main May 14, 2024
@eduardodfmex eduardodfmex deleted the mawasile/287-powerplatform_environment_settings-id-changes-on-reapply branch May 14, 2024 23:37
mawasile added a commit that referenced this pull request May 17, 2024
commit 1b8c806
Author: mawasile <[email protected]>
Date:   Wed May 15 01:37:57 2024 +0200

    resource/datasource primary id should not changes on reapply (#292)

    * chore: making unique resource/datasource id stable & fixing unit tests

    * chore: fixing acceptance tests

    * chore: update display_name in powerplatform environment resources

    * adding new acceptance tests for dlp policies

    ---------

    Co-authored-by: Eduardo Sanchez <[email protected]>

commit 6142aaf
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 14 17:21:38 2024 -0600

    Bump hashicorp/local in /examples/resources/powerplatform_solution (#298)

    Bumps [hashicorp/local](https://github.com/hashicorp/terraform-provider-local) from 2.4.0 to 2.5.1.
    - [Release notes](https://github.com/hashicorp/terraform-provider-local/releases)
    - [Changelog](https://github.com/hashicorp/terraform-provider-local/blob/main/CHANGELOG.md)
    - [Commits](hashicorp/terraform-provider-local@v2.4.0...v2.5.1)

    ---
    updated-dependencies:
    - dependency-name: hashicorp/local
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 54a1173
Author: Matt Dotson <[email protected]>
Date:   Mon May 13 23:46:54 2024 -0700

    Addition of example directories for dependabot scanning (#296)

    * manual addition of example directories

    * fix duplicate path

commit b6b0eec
Author: Eduardo Sanchez <[email protected]>
Date:   Mon May 13 15:30:55 2024 -0600

    Updating Go version and modify tfproviderlint actions to use specified go version (#284)

    * Updating Go version.

    * Disable tfproviderlint.

    * Testing with go vet.

    * Changing run order.

    * Placing all runs inside one job.

    * testing with:         /usr/bin/tfproviderlint ./...

    * changing path for tfproviderlint.

    * testing setup go.

    * Show directory path.

    * Applying comments and updating version.

    * Updating devcontainer version.

    * Disabling tfproviderlint.

    ---------

    Co-authored-by: Eduardo Sanchez <[email protected]>
    Co-authored-by: mawasile <[email protected]>

commit 236a1bf
Author: mawasile <[email protected]>
Date:   Mon May 13 20:02:26 2024 +0200

    Updating developer guide with additional Information (#290)

    * chore: Update documentation for developer workflow and setup instructions

    * chore: Update developer documentation and add unit tests for new feature

    * update docs

    * chore: Update developer documentation, add unit tests, and regenerate docs

    * Update DEVELOPER.md

    Co-authored-by: Matt Dotson <[email protected]>

    ---------

    Co-authored-by: Matt Dotson <[email protected]>

commit ff470f7
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 13 11:25:35 2024 -0600

    Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0 (#293)

    Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
    - [Commits](goreleaser/goreleaser-action@7ec5c2b...5742e2a)

    ---
    updated-dependencies:
    - dependency-name: goreleaser/goreleaser-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit dce39d9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 13 11:25:04 2024 -0600

    Bump goreleaser/goreleaser-action in /.github/workflows (#294)

    Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
    - [Commits](goreleaser/goreleaser-action@7ec5c2b...5742e2a)

    ---
    updated-dependencies:
    - dependency-name: goreleaser/goreleaser-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 0db25c3
Author: Raphael Pothin <[email protected]>
Date:   Fri May 10 11:12:33 2024 -0400

    Fix proposition for the inversion between "Business" and "Non-business" connectors groups in Power Platform DLP policies (#291)
mawasile added a commit that referenced this pull request Aug 1, 2024
)

* wip

* Squashed commit of the following:

commit 1b8c806
Author: mawasile <[email protected]>
Date:   Wed May 15 01:37:57 2024 +0200

    resource/datasource primary id should not changes on reapply (#292)

    * chore: making unique resource/datasource id stable & fixing unit tests

    * chore: fixing acceptance tests

    * chore: update display_name in powerplatform environment resources

    * adding new acceptance tests for dlp policies

    ---------

    Co-authored-by: Eduardo Sanchez <[email protected]>

commit 6142aaf
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 14 17:21:38 2024 -0600

    Bump hashicorp/local in /examples/resources/powerplatform_solution (#298)

    Bumps [hashicorp/local](https://github.com/hashicorp/terraform-provider-local) from 2.4.0 to 2.5.1.
    - [Release notes](https://github.com/hashicorp/terraform-provider-local/releases)
    - [Changelog](https://github.com/hashicorp/terraform-provider-local/blob/main/CHANGELOG.md)
    - [Commits](hashicorp/terraform-provider-local@v2.4.0...v2.5.1)

    ---
    updated-dependencies:
    - dependency-name: hashicorp/local
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 54a1173
Author: Matt Dotson <[email protected]>
Date:   Mon May 13 23:46:54 2024 -0700

    Addition of example directories for dependabot scanning (#296)

    * manual addition of example directories

    * fix duplicate path

commit b6b0eec
Author: Eduardo Sanchez <[email protected]>
Date:   Mon May 13 15:30:55 2024 -0600

    Updating Go version and modify tfproviderlint actions to use specified go version (#284)

    * Updating Go version.

    * Disable tfproviderlint.

    * Testing with go vet.

    * Changing run order.

    * Placing all runs inside one job.

    * testing with:         /usr/bin/tfproviderlint ./...

    * changing path for tfproviderlint.

    * testing setup go.

    * Show directory path.

    * Applying comments and updating version.

    * Updating devcontainer version.

    * Disabling tfproviderlint.

    ---------

    Co-authored-by: Eduardo Sanchez <[email protected]>
    Co-authored-by: mawasile <[email protected]>

commit 236a1bf
Author: mawasile <[email protected]>
Date:   Mon May 13 20:02:26 2024 +0200

    Updating developer guide with additional Information (#290)

    * chore: Update documentation for developer workflow and setup instructions

    * chore: Update developer documentation and add unit tests for new feature

    * update docs

    * chore: Update developer documentation, add unit tests, and regenerate docs

    * Update DEVELOPER.md

    Co-authored-by: Matt Dotson <[email protected]>

    ---------

    Co-authored-by: Matt Dotson <[email protected]>

commit ff470f7
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 13 11:25:35 2024 -0600

    Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0 (#293)

    Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
    - [Commits](goreleaser/goreleaser-action@7ec5c2b...5742e2a)

    ---
    updated-dependencies:
    - dependency-name: goreleaser/goreleaser-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit dce39d9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 13 11:25:04 2024 -0600

    Bump goreleaser/goreleaser-action in /.github/workflows (#294)

    Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
    - [Commits](goreleaser/goreleaser-action@7ec5c2b...5742e2a)

    ---
    updated-dependencies:
    - dependency-name: goreleaser/goreleaser-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 0db25c3
Author: Raphael Pothin <[email protected]>
Date:   Fri May 10 11:12:33 2024 -0400

    Fix proposition for the inversion between "Business" and "Non-business" connectors groups in Power Platform DLP policies (#291)

* addind datasource_connections

* wip

* feat: Add GetConnectorDefinition method to ConnectionsClient

* wip

* ading basic functionality

* lint fix

* connection shares datsource

* feat: Add Azure OpenAI connection output

The code changes add a new output for the Azure OpenAI connection in the `powerplatform_connection` module. This output provides the description, value, and sensitivity of the connection.

* change to documentation

* adding TestAccConnectionssDataSource_Validate_Read

* adding tests

* adding test

* adding acceptance tests

* adding unit tests

* chore: Add connection shares data source

* removing unused method

* filename typo fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data source data source enhancement New feature or request resource terraform resource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

powerplatform_environment_settings id changes on reapply
3 participants