Skip to content
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

feat: Catalog Management enhancements #4415

Merged
merged 20 commits into from
Mar 23, 2023
Merged

Conversation

benbuchanan
Copy link
Contributor

  • Deployable Architecture support: Can now add deployable architecture information to a version such as diagrams, features, dependencies, etc.
  • Deprecation: Can now deprecate offerings and versions via a Terraform argument
  • Usage: Can now specify usage text on a version
  • Configuration values: Can now specify and manage deployment/configuration variables for a version
  • Publishing: Can now publish/unpublish offerings
  • Terraform version override: Can now specify a terraform override version per offering version

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #4216
Closes #4331
Closes #4332
Closes #4372
Closes #4373
Closes #4374

Output from acceptance testing (I ran a script that runs all CM tests, and removed unrelated lines from the output to fit the character limit of this PR):

Show test results

Test Results

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmCatalogBasic -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
=== RUN   TestAccIBMCmCatalogBasic
--- PASS: TestAccIBMCmCatalogBasic (23.26s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmCatalogSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
=== RUN   TestAccIBMCmCatalogSimpleArgs
--- PASS: TestAccIBMCmCatalogSimpleArgs (34.69s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmCatalogDataSourceBasic -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
=== RUN   TestAccIBMCmCatalogDataSourceBasic
--- PASS: TestAccIBMCmCatalogDataSourceBasic (25.77s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmCatalogDataSourceSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmCatalogDataSourceSimpleArgs
--- PASS: TestAccIBMCmCatalogDataSourceSimpleArgs (22.82s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmOfferingBasic -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmOfferingBasic
--- PASS: TestAccIBMCmOfferingBasic (25.79s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmOfferingSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmOfferingSimpleArgs
--- PASS: TestAccIBMCmOfferingSimpleArgs (37.40s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmOfferingDataSourceBasic -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmOfferingDataSourceBasic
--- PASS: TestAccIBMCmOfferingDataSourceBasic (24.42s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmOfferingDataSourceSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmOfferingDataSourceSimpleArgs
--- PASS: TestAccIBMCmOfferingDataSourceSimpleArgs (25.70s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	(cached)
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmVersionBasic -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmVersionBasic
--- PASS: TestAccIBMCmVersionBasic (29.53s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	30.873s
testing: warning: no tests to run
PASS
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmVersionSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmVersionSimpleArgs
--- PASS: TestAccIBMCmVersionSimpleArgs (24.52s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	25.708s
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmVersionDataSourceSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	(cached) [no tests to run]
=== RUN   TestAccIBMCmVersionDataSourceSimpleArgs
--- PASS: TestAccIBMCmVersionDataSourceSimpleArgs (25.86s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	27.045s
testing: warning: no tests to run
PASS
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccIBMCmObjectSimpleArgs -timeout 700m
?   	github.com/IBM-Cloud/terraform-provider-ibm	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns	(cached) [no tests to run]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex	[no test files]
?   	github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/apigateway	4.924s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appconfiguration	12.184s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/appid	7.621s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/atracker	1.723s [no tests to run]
=== RUN   TestAccIBMCmObjectSimpleArgs
--- PASS: TestAccIBMCmObjectSimpleArgs (21.34s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/catalogmanagement	23.858s
testing: warning: no tests to run
PASS

@hkantare
Copy link
Collaborator

General comment
The attributes or renamed / removed some required arguments these kind of changes are breaking changes needs to follow certain guidelines
https://developer.hashicorp.com/terraform/plugin/sdkv2/best-practices/deprecations

@benbuchanan
Copy link
Contributor Author

@hkantare ok, I added the required attribute back and marked it as deprecated as it says to do in the docs you linked.

@benbuchanan
Copy link
Contributor Author

@hkantare please review again, would love for this to make it in the beta release so BNPP can use it and give feedback.

@hkantare hkantare merged commit bdd224a into IBM-Cloud:master Mar 23, 2023
omaraibrahim pushed a commit to omaraibrahim/terraform-provider-ibm that referenced this pull request Jul 20, 2023
* docs: small doc fix for validation resource

* fix: don't store auto generated tags in tf state

* fix: first pass at getting solution_info working

* deprecation support for offerings and versions

* support usage data, deprecation fixes

* feat: publish changes, validation enhancements

* fix: document conflict fixes with mutex, typo and computed value changes

* fix: deprecate_pending computed only and doc updates

* feat: support configuration values on a version

* fix: make configuration computed and optional so include_config works

* fix: idempotent argument issues

* fix: add config mode so configurations can be cleared

* docs: updates to version resource docs

* fix: add tags and keywords to offering read function, add new version test, fix object test

* feat: add terraform version to version resource, update version resource docs

* docs: Update offering resource docs

* fix: show configurations config constraints in tf state

* fix: mark removed required attribute as deprecated

---------

Co-authored-by: Ben Buchanan <buchanan@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment