Skip to content

feat(oci): add proxmox_virtual_environment_oci_image resource for OCI Images Management#2373

Merged
bpg-dev merged 11 commits intobpg:mainfrom
simoncaron:feat/implement-oci-pull-resource
Dec 6, 2025
Merged

feat(oci): add proxmox_virtual_environment_oci_image resource for OCI Images Management#2373
bpg-dev merged 11 commits intobpg:mainfrom
simoncaron:feat/implement-oci-pull-resource

Conversation

@simoncaron
Copy link
Copy Markdown
Contributor

@simoncaron simoncaron commented Nov 23, 2025

Implement OCI image pulling for PVE 9.1.

Contributor's Note

  • I have added / updated documentation in /docs for any user-facing features or additions.
  • I have added / updated acceptance tests in /fwprovider/tests for any new or updated resources / data sources.
  • I have ran make example to verify that the change works as expected.

Proof of Work

Capture d’écran du 2025-11-23 14-05-46 Capture d’écran du 2025-11-23 14-04-54

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #2369

Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
@simoncaron simoncaron force-pushed the feat/implement-oci-pull-resource branch from d4dd9b4 to 693b99f Compare November 24, 2025 23:28
Comment thread fwprovider/nodes/resource_oci_image.go
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
@simoncaron simoncaron marked this pull request as ready for review November 28, 2025 21:33
Comment thread fwprovider/nodes/resource_oci_image_test.go Outdated
@bpg-dev bpg-dev added the lifecycle:needs-info Requested additional information from the reporter label Nov 30, 2025
Copy link
Copy Markdown
Member

@bpg-dev bpg-dev left a comment

Choose a reason for hiding this comment

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

Hey @simoncaron 👋🏼

Looks like there are few more issues with the code, see my comments.

After fixing them, I tried to run the tests, but got theses errors:

=== NAME  TestAccResourceOCIImage/missing_reference
    resource_oci_image_test.go:278: Step 1/1, expected an error with pattern, no match on: Error running apply: exit status 1
        
        Error: Error downloading file from url
        
          with proxmox_virtual_environment_oci_image.test_image,
          on terraform_plugin_test.tf line 25, in resource "proxmox_virtual_environment_oci_image" "test_image":
          25:                           resource "proxmox_virtual_environment_oci_image" "test_image" {
        
        Could not download file '.tar', unexpected error: error download OCI image by
        reference: received an HTTP 400 response - Reason: Parameter verification
        failed. (reference: value does not match the regex pattern - filename: value
        must be at least 1 characters long)
=== NAME  TestAccResourceOCIImage/override_behavior
    resource_oci_image_test.go:278: Step 3/3 error: Pre-apply plan check(s) failed:
        'proxmox_virtual_environment_oci_image.test_override' - expected DestroyBeforeCreate, got action(s): [update]

Would you be able to take a look?

}{
{"missing reference", []resource.TestStep{{
Config: te.RenderConfig(`
resource "proxmox_oci_image" "test_image" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

proxmox_oci_image won't work, should be proxmox_virtual_environment_oci_image

Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
Signed-off-by: Simon Caron <8635747+simoncaron@users.noreply.github.com>
@simoncaron simoncaron requested a review from bpg-dev December 5, 2025 19:59
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Copy link
Copy Markdown
Member

@bpg-dev bpg-dev left a comment

Choose a reason for hiding this comment

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

Thanks a lot @simoncaron!

Everything is 👌🏼, i just made a few small cleanups on top of your changes.

LGTM! 🚀

@bpg-dev bpg-dev merged commit 86a5bf1 into bpg:main Dec 6, 2025
5 checks passed
@github-actions github-actions bot added the status:in-progress The issue is being worked on label Dec 6, 2025
@bpg-dev bpg-dev changed the title feat(oci): Add proxmox_virtual_environment_oci_image Resource for OCI Images Management feat(oci): add proxmox_virtual_environment_oci_image resource for OCI Images Management Dec 6, 2025
@github-actions github-actions bot removed the status:in-progress The issue is being worked on label Dec 6, 2025
@simoncaron simoncaron deleted the feat/implement-oci-pull-resource branch December 6, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle:needs-info Requested additional information from the reporter size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement OCI Image Pull from Registry

2 participants