sparse-intern-71089
09/26/2023, 7:51 PMstraight-cartoon-24485
09/26/2023, 7:56 PMterraform {
required_providers {
openwrt = {
source = "joneshf/openwrt"
}
}
}
provider "openwrt" {
hostname = "192.168.1.1"
username = "root"
password = var.openwrt_password
}
data "openwrt_system_system" "this" {
id = "cfg01e48a"
}
resource "openwrt_dhcp_host" "testing" {
id = "blah"
ip = "192.168.1.202"
mac = "12:34:56:78:90:ab"
name = "testing"
}
yet, the equivalent pulumi-wrapped version fails:
import * as pulumi from "@pulumi/pulumi";
import * as openwrt from "@deposition-cloud/pulumi-openwrt"
const openWrtProvider = new openwrt.Provider('openwrt', {
hostname: '192.168.1.1',
username: 'root',
scheme: 'http',
password: process.env.ROUTER_PASSWORD
})
const system = openwrt.getSystemSystem({
id: "cfg01e48a"
}, {
provider: openWrtProvider
} )
const ip = new openwrt.DhcpHost('testing', {
ip: '192.168.1.201',
mac: '12:23:34:45:56:67',
name: 'pulumi-openwrt-host'
}, {
id: "blah2",
provider: openWrtProvider
})
export const out = {
system
}
fails with:
Diagnostics:
openwrt:index:DhcpHost (testing):
error: problem getting dhcp. section: could not find section dhcp.
...because the resource to-be has yet tobe created on `pulumi up`(?)