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

terraform-provider: add image datasource #2642

Merged
merged 37 commits into from
Nov 27, 2023

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Nov 23, 2023

Context

In the Terraform provider, we need a way to transform a CSP-agnostic image reference to a CSP-specific image reference, which can be used inside the Cluster resource. This is based on #2632.

Proposed change(s)

  • Add a data source to fetch CSP-specific image references from CSP-agnostic image references.

Additional info

Checklist

  • Update docs
  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@msanft msanft added the feature This introduces new functionality label Nov 23, 2023
@msanft msanft added this to the v2.14.0 milestone Nov 23, 2023
@msanft msanft requested a review from elchead November 23, 2023 17:45
@msanft msanft requested review from 3u13r and daniel-weisse and removed request for derpsteb and katexochen November 23, 2023 17:45
@msanft msanft force-pushed the feat/terraform-provider/image-datasource branch from 1e8ff57 to bb0473e Compare November 24, 2023 08:14
Copy link
Contributor

@elchead elchead left a comment

Choose a reason for hiding this comment

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

have tested it locally and changes look mostly good

@elchead
Copy link
Contributor

elchead commented Nov 24, 2023

can you rebase? otherwise my PR is hard to review 🙈

@msanft
Copy link
Contributor Author

msanft commented Nov 24, 2023

can you rebase? otherwise my PR is hard to review 🙈

Rebase to what? I should be up-to-date with origin/feat/terraform-provider/image-datasource.

Copy link
Member

@daniel-weisse daniel-weisse left a comment

Choose a reason for hiding this comment

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

Didn't review the Bazel parts or the tests
Rest looks good to me

Base automatically changed from feat/terraform/init-provider-scaffolding to main November 24, 2023 14:58
Copy link

netlify bot commented Nov 24, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 215e4b1
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/6564466702b5f80008c9bd80

@msanft msanft force-pushed the feat/terraform-provider/image-datasource branch from 4bc35bd to 686f465 Compare November 24, 2023 15:16
// Save data into Terraform state
data.Reference = types.StringValue(imageRef)
// Use a placeholder ID for testing, as per
data.ID = types.StringValue("placeholder")
Copy link
Contributor

Choose a reason for hiding this comment

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

is this relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Coverage report

Package Old New Trend
terraform-provider-constellation [no test files] [no test files] 🚧
terraform-provider-constellation/internal/data 0.00% [no test files] 🚨
terraform-provider-constellation/internal/provider 3.20% 3.00% ↘️

@msanft msanft merged commit 34bf3ad into main Nov 27, 2023
9 checks passed
@msanft msanft deleted the feat/terraform-provider/image-datasource branch November 27, 2023 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This introduces new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants