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

[WAYP-2172] Set variable options for add-on definitions #819

Merged
merged 11 commits into from
May 6, 2024

Conversation

paladin-devops
Copy link
Contributor

@paladin-devops paladin-devops commented Apr 19, 2024

๐Ÿ› ๏ธ Description

This PR updates the hcp_waypoint_add_on_definition resource and data source to set and retrieve input variable options for HCP Waypoint add-ons.

๐Ÿ—๏ธ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccWaypoint_Add_On_Definition_basic'
=== RUN   TestAccWaypoint_Add_On_Definition_basic
--- PASS: TestAccWaypoint_Add_On_Definition_basic (8.16s)

$ make testacc TESTARGS='-run=TestAccWaypointData_Add_On_Definition_basic'
=== RUN   TestAccWaypointData_Add_On_Definition_basic
--- PASS: TestAccWaypointData_Add_On_Definition_basic (11.91s)

@paladin-devops paladin-devops self-assigned this Apr 19, 2024
@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch from 394d397 to e5db712 Compare April 19, 2024 16:40
@paladin-devops paladin-devops marked this pull request as ready for review April 19, 2024 19:59
@paladin-devops paladin-devops requested review from a team as code owners April 19, 2024 19:59
@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch from 6f63343 to 9bea587 Compare April 23, 2024 13:33
@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch from 9bea587 to 3340c01 Compare April 28, 2024 20:02
@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch 2 times, most recently from 0be6729 to fe0c8e4 Compare April 29, 2024 15:36
@paladin-devops paladin-devops marked this pull request as draft April 29, 2024 17:45
@paladin-devops
Copy link
Contributor Author

Converted this back to draft while I update it based on feedback which applied to #816.

@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch from 7c1421f to 6390bd3 Compare April 29, 2024 18:31
Base automatically changed from WAYP-2396-waypoint-input-vars to main April 29, 2024 18:42
@paladin-devops paladin-devops force-pushed the WAYP-2172-add-on-variable-options branch from 232bd57 to c2a287a Compare April 29, 2024 18:47
@paladin-devops paladin-devops marked this pull request as ready for review April 29, 2024 19:10
Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

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

I think user_enabled needs to be Computed as well, otherwise looks good ๐Ÿ‘

Description: "List of options",
},
"user_editable": &schema.BoolAttribute{
Required: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is Optional in resource_waypoint_application_template.go. I believe it also needs to be Computed: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 81d1757 (for both templates and add-on definitions).

@@ -10,7 +10,7 @@ import (

sharedmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models"
"github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service"
waypointmodels "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models"
waypoint_models "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this should be waypointModels but we can do a sweep later, I think a few other resources have the _ as well

@paladin-devops paladin-devops merged commit 31f8e50 into main May 6, 2024
6 checks passed
@paladin-devops paladin-devops deleted the WAYP-2172-add-on-variable-options branch May 6, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants