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

cluster and clusters data source #22

Merged
merged 45 commits into from
Apr 20, 2024
Merged

cluster and clusters data source #22

merged 45 commits into from
Apr 20, 2024

Conversation

vandyliu
Copy link
Collaborator

@vandyliu vandyliu commented Apr 16, 2024

Description

This PR creates the cluster data source and clusters data source and adds some acceptance integration tests.

🎟 Issue(s)

#14 #13

🧪 Functional Testing

Tested with a terraform project
Can see the examples in the example file

📸 Screenshots

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make fmt before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@vandyliu vandyliu changed the base branch from cluster-data-source to main April 18, 2024 03:38
@vandyliu vandyliu changed the title clusters data source cluster and clusters data source Apr 18, 2024
@vandyliu vandyliu marked this pull request as ready for review April 18, 2024 03:40
@vandyliu vandyliu requested review from sunkickr and a team as code owners April 18, 2024 03:40
## Example Usage

```terraform
data "astronomer_deployments" "example_deployments" {}
Copy link

Choose a reason for hiding this comment

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

should we change these to clusters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, accidentally had them switched in the examples folder
fixed this

type ClustersDataSource struct {
Clusters types.List `tfsdk:"clusters"`
CloudProvider types.String `tfsdk:"cloud_provider"` // query parameter
Names types.List `tfsdk:"names"` // query parameter

Choose a reason for hiding this comment

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

Do we also need ClusterIds here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

its not in v1beta1 yet but ill add it when/if it is implemented

@vandyliu vandyliu merged commit 8998fe2 into main Apr 20, 2024
5 checks passed
@vandyliu vandyliu deleted the clusters-data-source branch April 20, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants