Skip to content

Added support for Host Maintenance Policy features #1961

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

Open
wants to merge 5 commits into
base: proj/maintenance-policy
Choose a base branch
from

Conversation

ezilber-akamai
Copy link
Contributor

@ezilber-akamai ezilber-akamai commented Jul 9, 2025

📝 Description

Added support for Host Maintenance in account settings and instances, and added datasource for maintenance policies.

NOTE: Do not merge until after the corresponding linodego release. Prior to merging, need to point to the latest linodego release and add a link to the new GET /maintnenace/policies endpoint in the datasource documentaton.

✔️ How to Test

The following steps assume you have pulled down this PR locally

Unit Tests

make test-unit

Integration Tests

For running the integration tests, you will need to point at DevCloud. Note that the account settings tests will not pass due to limitations with changing account settings for DevCloud accounts.

make test-int PKG_NAME="accountsettings" TEST_CASE="TestAccDataSourceLinodeAccountSettings_basic"
make test-int PKG_NAME="accountsettings" TEST_CASE="TestAccResourceAccountSettings_update"
make test-int PKG_NAME="instance" TEST_CASE="TestAccDataSourceInstances_basic"
make test-int PKG_NAME="instance" TEST_CASE="TestAccResourceInstance_updateMaintenancePolicy"
make test-int PKG_NAME="maintenancepolicies" TEST_CASE="TestAccDataSourceMaintenancePolicies_basic"

@ezilber-akamai ezilber-akamai requested a review from a team as a code owner July 9, 2025 13:13
@ezilber-akamai ezilber-akamai requested review from zliang-akamai and yec-akamai and removed request for a team July 9, 2025 13:13
@ezilber-akamai ezilber-akamai added new-feature for new features in the changelog. do-not-merge PRs that should not be merged until the commented issue is resolved labels Jul 9, 2025
@zliang-akamai
Copy link
Member

make test-int PKG_NAME="maintenancepolicies" TEST_CASE="TestAccResourceInstance_updateMaintenancePolicy"
This test ^^^ actually lives in instance package

Copy link
Member

@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

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

Looks good overall, nice work!

@ezilber-akamai ezilber-akamai changed the title Added support for Host Maintenance features Added support for Host Maintenance Policy features Jul 21, 2025
Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Should we implement maintainacepolicies as the other listing data source and support filtering?

"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
)

var frameworkDataSourceSchema = schema.Schema{
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it's a listing data source, should we implement the schema including filter, order, etc.? Also might need to make some changes to the data source Read to support filtering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The API Spec did not mention any filtering so I wasn't sure if I should implement it or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PRs that should not be merged until the commented issue is resolved new-feature for new features in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants