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

provider/ignition: migration from resources to data resources #11851

Merged
merged 4 commits into from
Mar 6, 2017
Merged

provider/ignition: migration from resources to data resources #11851

merged 4 commits into from
Mar 6, 2017

Conversation

mcuadros
Copy link
Contributor

Fixes: #11518

@stack72
Copy link
Contributor

stack72 commented Feb 10, 2017

Hi @mcuadros

Thanks for the work here - I understand why we need to do this. Right now, this is backwards incompatible - which means we would need to duplicate the resources and deprecate the old ones etc

Luckily, the awesome @apparentlymart, wrote a shim function that he has used to map resources to data_sources

You can see an example of it here
and here

This would then allow us to keep backwards compatibility with older versions :)

Thoughts?

Paul

@stack72 stack72 added enhancement provider/ignition waiting-response An issue/pull request is waiting for a response from the community labels Feb 10, 2017
@mcuadros
Copy link
Contributor Author

@stack72 done

@stack72 stack72 removed the waiting-response An issue/pull request is waiting for a response from the community label Feb 15, 2017
@mcuadros
Copy link
Contributor Author

@stack72 ping

@@ -19,6 +19,19 @@ Use the navigation to the left to read about the available resources.
This config will write a single service unit (shown below) with the contents of an example service. This unit will be enabled as a dependency of multi-user.target and therefore start on boot

```
<<<<<<< HEAD
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 a merge that failed?

systemd = [
"${data.ignition_systemd_unit.example.id}",
]
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

merge conflict?

@mcuadros
Copy link
Contributor Author

@mildred nice catch! solved

@pgray
Copy link
Contributor

pgray commented Mar 1, 2017

Pulled down this branch and started working with it.
Great work!

Any idea on amount of time left to review?

@mildred
Copy link
Contributor

mildred commented Mar 6, 2017

By the way, we are using this in production and it works well.

@alexsomesan
Copy link
Member

👍 I would also like to see this merged. It's a biting us a little bit, using the latest stable release.

@stack72
Copy link
Contributor

stack72 commented Mar 6, 2017

LGTM! Thanks for the work here - sorry it took so long

% make testacc TEST=./builtin/providers/ignition                                                                                            ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/06 14:21:46 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/ignition -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestValidateUnit
--- PASS: TestValidateUnit (0.00s)
=== RUN   TestIngnitionFileReplace
--- PASS: TestIngnitionFileReplace (0.05s)
=== RUN   TestIngnitionFileAppend
--- PASS: TestIngnitionFileAppend (0.04s)
=== RUN   TestIngnitionDisk
--- PASS: TestIngnitionDisk (0.07s)
=== RUN   TestIngnitionDiskResource
--- PASS: TestIngnitionDiskResource (0.30s)
=== RUN   TestIngnitionFile
--- PASS: TestIngnitionFile (0.06s)
=== RUN   TestIngnitionFilesystem
--- PASS: TestIngnitionFilesystem (0.07s)
=== RUN   TestIngnitionGroup
--- PASS: TestIngnitionGroup (0.04s)
=== RUN   TestIngnitionNetworkdUnit
--- PASS: TestIngnitionNetworkdUnit (0.03s)
=== RUN   TestIngnitionRaid
--- PASS: TestIngnitionRaid (0.04s)
=== RUN   TestIngnitionSystemdUnit
--- PASS: TestIngnitionSystemdUnit (0.03s)
=== RUN   TestIngnitionSystemdUnitEmptyContentWithDropIn
--- PASS: TestIngnitionSystemdUnitEmptyContentWithDropIn (0.03s)
=== RUN   TestIgnitionSystemdUnit_emptyContent
--- PASS: TestIgnitionSystemdUnit_emptyContent (0.03s)
=== RUN   TestIngnitionUser
--- PASS: TestIngnitionUser (0.03s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/ignition	0.851s

@stack72 stack72 merged commit b58709a into hashicorp:master Mar 6, 2017
stack72 pushed a commit that referenced this pull request Mar 6, 2017
* provider/ignition: migration from resources to data resources

* website: provider/ignition documention updated to data resources

* provider/ignition: backwards compatibility support for old resources
yanndegat pushed a commit to yanndegat/terraform that referenced this pull request Mar 13, 2017
…orp#11851)

* provider/ignition: migration from resources to data resources

* website: provider/ignition documention updated to data resources

* provider/ignition: backwards compatibility support for old resources
@ghost
Copy link

ghost commented Apr 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provider/ignition: ignition_config should be a data source: invalid file <file-id>, unknown file id
5 participants