Skip to content

Mandatory id blocks pulumi-openwrt wrapper #136

@pcuci

Description

@pcuci

Hi @joneshf - thanks for creating this provider!

I'm trying to wrap your project with pulumi (so I can use it in my home lab stack), but am running into an issue due to the mandatory id field for LuCI's RPC calls

Am I understanding correctly that the id gets populated right after creating the section in uci? re:

id := d.getId(model).ValueString()

In pulumi, this blows up with (see this example:

  openwrt:index:DhcpHost (testing):
    error: problem getting dhcp. section: could not find section dhcp.

However, the equivalent in Terraform native, seems to work fine, as in this example

... and I believe this is because Pulumi wants to first refresh the state of the world before it creates the resource, whereas in your provider no such pre-step happens(?)

A possible fix would require the LuCI id field to be made optional for Read operations(?) Is this something you've considered?

I'll detail more debug attempts in: deposition-cloud/pulumi-openwrt#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions