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

Implement linode_database_postgresql_v2 data source #1716

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Jan 14, 2025

📝 Description

This pull request introduces a new linode_database_postgresql_v2 data source with schema matching the schema of the linode_database_postgresql_v2 resource.

✔️ How to Test

The following test steps assume you have pulled down this PR locally.

Integration Testing

make PKG_NAME=linode/databasepostgresqlv2 int-test

Manual Testing

  1. Using a terraform-provider-linode sandbox environment (e.g. dx-devenv), apply the following configuration:

output "datasource_result" {
  value = data.linode_database_postgresql_v2.foobar
  sensitive = true
}

data "linode_database_postgresql_v2" "foobar" {
  id = linode_database_postgresql_v2.foobar.id
}

resource "linode_database_postgresql_v2" "foobar" {
  label = "mydatabase"
  engine_id = "postgresql/16"
  region = "us-mia"
  type = "g6-nanode-1"

  allow_list = ["10.0.0.3/32"]
  cluster_size = 3

  updates = {
    duration = 4
    frequency = "weekly"
    hour_of_day = 22
    day_of_week = 2
  }
}
  1. Ensure the output accurate reflects the database's information.

@lgarber-akamai lgarber-akamai added the new-feature for new features in the changelog. label Jan 14, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review January 14, 2025 17:24
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner January 14, 2025 17:24
@lgarber-akamai lgarber-akamai requested review from zliang-akamai and ezilber-akamai and removed request for a team January 14, 2025 17:24
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Tested locally and everything is working properly. LGTM

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM and works locally

@lgarber-akamai lgarber-akamai merged commit 61a2c9c into linode:dev Jan 22, 2025
8 checks passed
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.

3 participants