-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Correct version handling for Terraform Plugin Framework and fix …
…acceptance tests (#366) ## Motivation After merging #351 the acceptance tests [started failing](https://github.com/nobl9/terraform-provider-nobl9/actions/runs/12350726517/job/34464184383). This was due to the fact that Service resource was no longer defined in the old provider, and since the tests were not utilizing the provider multiplexer, the Service resource was effectively undefined. ## Summary - Fixed version handling for the new provider, the `Version` variable was moved to `main.go`. - Added multiplexer setup to the tests. - Due to an implicit `id` attribute creation in Terraform SDK v2 and and [this error](https://main.nobl9.dev/api/delete/project?dry_run=false&name=test-project) being dropped in old tests, I had to switch old tests to the new [terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) library. Both new and old libraries' APIs were almost identical, so the conversion was seamless, just import changes. ## Testing Run `make test/acc` with valid Nobl9 credentials.
- Loading branch information
1 parent
5c94612
commit 3c74d0c
Showing
19 changed files
with
145 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Package frameworkprovider provides a [provider.Provider] implementation for managing Nobl9 resources. | ||
// It is built using the [terraform-plugin-framework]. | ||
// | ||
// [terraform-plugin-framework]: https://developer.hashicorp.com/terraform/plugin/framework | ||
// [provider.Provider]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/provider#Provider | ||
package frameworkprovider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
// Package nobl9 Terraform provider package | ||
// Package nobl9 provides a [schema.Provider] for managing Nobl9 resources. | ||
// It is built using the [terraform-plugin-sdk] version 2. | ||
// | ||
// [schema.Provider]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema#Provider | ||
// [terraform-plugin-sdk]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/v2 | ||
package nobl9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.