Skip to content

Conversation

yec-akamai
Copy link
Contributor

@yec-akamai yec-akamai commented Oct 13, 2025

📝 Description

Support ACLP monitors related fields in regions.

✔️ How to Test

Unit and integration test

make test-unit PKG_NAME=region
make test-unit PKG_NAME=regions

make test-int PKG_NAME=region
make test-int PKG_NAME=regions

Manual Test

  1. In a sandbox environment, run the following script to list and view a core region
data "linode_regions" "foobar" {
    filter {
    name = "site_type"
    values = ["core"]
  }
}

output "result1" {
  value = data.linode_regions.foobar.regions.0.monitors
}

data "linode_region" "test" {
  id = data.linode_regions.foobar.regions.0.id
}

output "result2" {
  value = data.linode_region.test.monitors
}
  1. Observe the outputs display monitors

sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: revert linodego replacement once the lindoego PR merged

@yec-akamai yec-akamai marked this pull request as ready for review October 13, 2025 19:33
@yec-akamai yec-akamai requested a review from a team as a code owner October 13, 2025 19:33
@yec-akamai yec-akamai requested review from ezilber-akamai and vshanthe and removed request for a team October 13, 2025 19:33
@yec-akamai yec-akamai added the new-feature for new features in the changelog. label Oct 13, 2025
@yec-akamai yec-akamai requested a review from Copilot October 13, 2025 19:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for ACLP (Alert Correlation and Lifecycle Platform) monitoring fields to the regions data sources in the Terraform provider. The changes enable users to query available monitoring services (alerts and metrics) for each Linode region.

  • Adds monitors field to region data structures containing alerts and metrics lists
  • Updates parsing methods to accept context and handle diagnostics properly
  • Includes comprehensive test coverage for the new monitoring functionality

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
linode/region/framework_models.go Adds RegionMonitors struct and updates ParseRegion to handle monitors field
linode/region/framework_datasource_schema.go Defines schema for monitors attribute with alerts and metrics lists
linode/region/framework_datasource.go Updates to handle diagnostics from ParseRegion method
linode/regions/framework_models.go Updates parseRegions method signature to accept context
linode/regions/framework_datasource.go Passes context to parseRegions method call
linode/region/framework_models_unit_test.go Adds unit tests for monitors field parsing
linode/regions/framework_models_unit_test.go Adds unit tests for monitors field in regions collection
linode/region/datasource_test.go Adds acceptance tests for monitors attributes
go.mod Replaces linodego dependency with custom fork containing monitors support
docs/data-sources/region.md Documents monitors field and its attributes
docs/data-sources/regions.md Documents monitors field and its attributes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@vshanthe vshanthe requested a review from PawelSnoch October 16, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant