{"action":"closed","issue":{"url":"https://api.github.com/repos/pulumi/pulumi-openstack/issues/27","repository_url":"https://api.github.com/repos/pulumi/pulumi-openstack","labels_url":"https://api.github.com/repos/pulumi/pulumi-openstack/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/pulumi/pulumi-openstack/issues/27/comments","events_url":"https://api.github.com/repos/pulumi/pulumi-openstack/issues/27/events","html_url":"https://github.com/pulumi/pulumi-openstack/issues/27","id":394819120,"node_id":"MDU6SXNzdWUzOTQ4MTkxMjA=","number":27,"title":"(Go) How to specify AllocationPools for Subnet","user":{"login":"danieltrautmann","id":4022138,"node_id":"MDQ6VXNlcjQwMjIxMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/4022138?v=4","gravatar_id":"","url":"https://api.github.com/users/danieltrautmann","html_url":"https://github.com/danieltrautmann","followers_url":"https://api.github.com/users/danieltrautmann/followers","following_url":"https://api.github.com/users/danieltrautmann/following{/other_user}","gists_url":"https://api.github.com/users/danieltrautmann/gists{/gist_id}","starred_url":"https://api.github.com/users/danieltrautmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieltrautmann/subscriptions","organizations_url":"https://api.github.com/users/danieltrautmann/orgs","repos_url":"https://api.github.com/users/danieltrautmann/repos","events_url":"https://api.github.com/users/danieltrautmann/events{/privacy}","received_events_url":"https://api.github.com/users/danieltrautmann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-29T19:26:48Z","updated_at":"2018-12-30T12:07:03Z","closed_at":"2018-12-30T12:07:03Z","author_association":"NONE","body":"Hi,\r\n\r\nI have some troubles specifying `AllocationPools` in `SubnetArgs` using Go.\r\nI've seen a similar issue (#14) where is mentioned, that the structure can be found in the TypeScript code. There I was able to find that it should have a `start` and `end` property.\r\n\r\nHowever, I was not able to get it to work.\r\n\r\n**Version**\r\n\r\n```bash\r\n$ pulumi version\r\nv0.16.9\r\n```\r\n\r\nThis is the current code:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/pulumi/pulumi-openstack/sdk/go/openstack/networking\"\r\n\t\"github.com/pulumi/pulumi/sdk/go/pulumi\"\r\n)\r\n\r\nfunc main() {\r\n\tpulumi.Run(func(ctx *pulumi.Context) (err error) {\r\n\t\tvar network *networking.Network\r\n\r\n\t\tnetwork, err = networking.NewNetwork(ctx, \"k8s-net\", nil)\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\r\n\t\t_, err = networking.NewSubnet(ctx, \"k8s-subnet\", &networking.SubnetArgs{\r\n\t\t\tAllocationPools: []struct {\r\n\t\t\t\tStart string\r\n\t\t\t\tEnd   string\r\n\t\t\t}{\r\n\t\t\t\t{Start: \"10.10.0.100\", End: \"10.10.0.199\"},\r\n\t\t\t},\r\n\t\t\tCidr:           \"10.10.0.0/24\",\r\n\t\t\tDnsNameservers: []string{\"1.1.1.1\", \"1.0.0.1\"},\r\n\t\t\tEnableDhcp:     true,\r\n\t\t\tGatewayIp:      \"10.10.0.1\",\r\n\t\t\tNetworkId:      network.ID(),\r\n\t\t})\r\n\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\r\n\t\treturn nil\r\n\t})\r\n}\r\n```\r\n\r\nAnd this is the error:\r\n\r\n```\r\n$ pulumi up\r\nPreviewing update (k8s-dev):\r\n\r\n     Type                 Name         Plan     Info\r\n     pulumi:pulumi:Stack  k8s-k8s-dev           1 error; 2 messages\r\n 9} (s\r\nDiagnostics:\r\n  pulumi:pulumi:Stack (k8s-k8s-dev):\r\n    error: program failed: 1 error occurred:\r\n    \t* marshaling properties: awaiting input property allocationPools: unrecognized input property type: {10.10.0.100 10.10.0.199} (struct { Start string; End string })\r\n\r\n    error: an unhandled error occurred: program exited with non-zero exit code: 1\r\n\r\nerror: an error occurred while advancing the preview\r\n```\r\n\r\nI even tried to use lowercase property names (`start`, `end` instead of `Start`, `End`), but I'm seeing the same error."}}
{"actor":{"display_login":"danieltrautmann"}}