hashicorp / terraform-provider-ignition

Terraform Ignition provider
https://www.terraform.io/docs/providers/ignition/
Mozilla Public License 2.0
38 stars 64 forks source link

NEW BRANCH: v2: Update Provider to use Ignition v2.1.1 / Ignition Config Spec v3.0.0 #66

Closed LorbusChris closed 4 years ago

LorbusChris commented 4 years ago

:warning: This PR should not be merged! :warning:

Instead, a v2 branch should be created for these changes so that this version can be distributed alongside v1

der-eismann commented 4 years ago

Thanks for your work! I am already trying to test this with Fedora CoreOS, but if I read the code correctly there is currently no way to set the overwrite property for files, is it?

vrutkovs commented 4 years ago

overwrite is still there, enabled by default - see https://coreos.com/ignition/docs/latest/configuration-v2_3.html

der-eismann commented 4 years ago

Yes, but that changed in v3 - see https://github.com/coreos/ignition/blob/master/doc/configuration-v3_0.md

overwrite (boolean): whether to delete preexisting nodes at the path. source must be specified if overwrite is true. Defaults to false.

And I don't see an argument to set it to true.

LorbusChris commented 4 years ago

@der-eismann thanks for having a look at this! This proposed v2 might not be feature-complete at this stage - it does however satisfy all requirements we have so far discovered for an ign spec v3 terraform provider in our use-case, which is the openshift-installer.

I don't have much in-depth knowledge of this project, so I'd happily welcome another PR that adds this :) Otherwise, I'll have a look into it, but it might be a while til I get to it.

LorbusChris commented 4 years ago

Any word on making v2 its own dedicated branch in this repo?

LorbusChris commented 4 years ago

ping

LorbusChris commented 4 years ago

@der-eismann I added support for the overwrite arg. I hope this works for you now, I'd appreciate your feedback!

der-eismann commented 4 years ago

Wow, thank you very much!! I'm on vacation right now, but I'll test this as soon as I get back 🙂

AndrewChubatiuk commented 4 years ago

Is there any progress there?

LorbusChris commented 4 years ago

The lack of responses from maintainers here is unfortunate.

Note that Ignition Spec v3.1 is going to be released soon. I will update this branch soon after.

egeturgay commented 4 years ago

We would appreciate some movement on this as the lack of spec v3 support is hindering our efforts to migrate to Fedora CoreOS as the CoreOS end of life is looming. Please let us know if we can help in anyway to speed this up.

LorbusChris commented 4 years ago

@egeturgay spec v3 works with this branch and it will be maintained for the foreseeable future (it's already used for OKD, see https://github.com/openshift/installer/blob/fcos/go.mod#L140, and it works fine with FCOS when provisioning with TF.)

If this isn't welcomed into this repository any time soon, the code will be moved from my personal namespace to the OpenShift org.

LorbusChris commented 4 years ago

@alexsomesan could we get a word on whether this has a change of landing here any time soon?

LorbusChris commented 4 years ago

@alexsomesan friendly ping :) I'm part of the team that maintaines Ignition at Red Hat, and we'd be happy to see to it that the Version 2/ Spec 3 branch is maintained here in this repo. Please let us know how to proceed.

egeturgay commented 4 years ago

I have tested @LorbusChris 's PR and It works without issues for me for provisioning Fedora CoreOS with ignition (with terraform 0.14 which has an older version of the HCL).

dadux commented 4 years ago

Hi @LorbusChris - can you please update us if you decide to fork and release the provider in some other way ?

I've also tested it with Fedora CoreOS 👌

LorbusChris commented 4 years ago

This will live in https://github.com/community-terraform-providers/terraform-provider-ignition for the time being.

Is anybody here up for co-maintainership to do binary releases from there? (we don't need the binaries)

LorbusChris commented 4 years ago

This PR is superseded by https://github.com/terraform-providers/terraform-provider-ignition/pull/69