Skip to content

Commit c03ed86

Browse files
author
Hayden Young
committed
feat: SDK build
1 parent cd65d33 commit c03ed86

File tree

284 files changed

+42336
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+42336
-23
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:${UBUNTU_VERSION}
33

44
ARG BUILD_UID=1000
55

6-
RUN useradd -ms /bin/bash build -u $BUILD_UID
6+
RUN useradd -mls /bin/bash build -u $BUILD_UID
77

88
# Update apt-get and install various needed utilities
99
RUN apt-get update && \

deployment-templates/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: release
23
on:
34
push:

provider/cmd/pulumi-resource-netbox/schema.json

+52-20
Large diffs are not rendered by default.

provider/resources.go

+19-2
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,26 @@ func Provider() tfbridge.ProviderInfo {
145145
"netbox_device_role": {Tok: netboxResource(netboxMod, "DeviceRole")},
146146
"netbox_device_type": {Tok: netboxResource(netboxMod, "DeviceType")},
147147
"netbox_interface": {Tok: netboxResource(netboxMod, "Interface")},
148-
"netbox_ip_address": {Tok: netboxResource(netboxMod, "IpAddress")},
148+
"netbox_ip_address": {
149+
Tok: netboxResource(netboxMod, "IpAddress"),
150+
Fields: map[string]*tfbridge.SchemaInfo{
151+
"ip_address": {
152+
CSharpName: "IpAddressOutput",
153+
},
154+
},
155+
},
149156
"netbox_ip_range": {Tok: netboxResource(netboxMod, "IpRange")},
150157
"netbox_ipam_role": {Tok: netboxResource(netboxMod, "IpamRole")},
151158
"netbox_manufacturer": {Tok: netboxResource(netboxMod, "Manufacturer")},
152159
"netbox_platform": {Tok: netboxResource(netboxMod, "Platform")},
153-
"netbox_prefix": {Tok: netboxResource(netboxMod, "Prefix")},
160+
"netbox_prefix": {
161+
Tok: netboxResource(netboxMod, "Prefix"),
162+
Fields: map[string]*tfbridge.SchemaInfo{
163+
"prefix": {
164+
CSharpName: "PrefixOutput",
165+
},
166+
},
167+
},
154168
"netbox_primary_ip": {Tok: netboxResource(netboxMod, "PrimaryIp")},
155169
"netbox_region": {Tok: netboxResource(netboxMod, "Region")},
156170
"netbox_rir": {Tok: netboxResource(netboxMod, "Rir")},
@@ -191,6 +205,7 @@ func Provider() tfbridge.ProviderInfo {
191205
},
192206

193207
JavaScript: &tfbridge.JavaScriptInfo{
208+
PackageName: "pulumi-netbox",
194209
// List any npm dependencies and their versions
195210
Dependencies: map[string]string{
196211
"@pulumi/pulumi": "^3.0.0",
@@ -205,6 +220,7 @@ func Provider() tfbridge.ProviderInfo {
205220
//Overlay: &tfbridge.OverlayInfo{},
206221
},
207222
Python: &tfbridge.PythonInfo{
223+
PackageName: "pulumi_netbox",
208224
// List any Python dependencies and their version ranges
209225
Requires: map[string]string{
210226
"pulumi": ">=3.0.0,<4.0.0",
@@ -220,6 +236,7 @@ func Provider() tfbridge.ProviderInfo {
220236
GenerateResourceContainerTypes: true,
221237
},
222238
CSharp: &tfbridge.CSharpInfo{
239+
RootNamespace: "HBJYDev",
223240
PackageReferences: map[string]string{
224241
"Pulumi": "3.*",
225242
},

sdk/dotnet/Aggregate.cs

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Collections.Immutable;
7+
using System.Threading.Tasks;
8+
using Pulumi.Serialization;
9+
using Pulumi;
10+
11+
namespace HBJYDev.Netbox
12+
{
13+
/// <summary>
14+
/// From the [official documentation](https://docs.netbox.dev/en/stable/core-functionality/ipam/#aggregates):
15+
///
16+
/// &gt; NetBox allows us to specify the portions of IP space that are interesting to us by defining aggregates. Typically, an aggregate will correspond to either an allocation of public (globally routable) IP space granted by a regional authority, or a private (internally-routable) designation.
17+
/// </summary>
18+
[NetboxResourceType("netbox:index/aggregate:Aggregate")]
19+
public partial class Aggregate : global::Pulumi.CustomResource
20+
{
21+
[Output("description")]
22+
public Output<string?> Description { get; private set; } = null!;
23+
24+
[Output("prefix")]
25+
public Output<string> Prefix { get; private set; } = null!;
26+
27+
[Output("rirId")]
28+
public Output<int?> RirId { get; private set; } = null!;
29+
30+
[Output("tags")]
31+
public Output<ImmutableArray<string>> Tags { get; private set; } = null!;
32+
33+
[Output("tenantId")]
34+
public Output<int?> TenantId { get; private set; } = null!;
35+
36+
37+
/// <summary>
38+
/// Create a Aggregate resource with the given unique name, arguments, and options.
39+
/// </summary>
40+
///
41+
/// <param name="name">The unique name of the resource</param>
42+
/// <param name="args">The arguments used to populate this resource's properties</param>
43+
/// <param name="options">A bag of options that control this resource's behavior</param>
44+
public Aggregate(string name, AggregateArgs args, CustomResourceOptions? options = null)
45+
: base("netbox:index/aggregate:Aggregate", name, args ?? new AggregateArgs(), MakeResourceOptions(options, ""))
46+
{
47+
}
48+
49+
private Aggregate(string name, Input<string> id, AggregateState? state = null, CustomResourceOptions? options = null)
50+
: base("netbox:index/aggregate:Aggregate", name, state, MakeResourceOptions(options, id))
51+
{
52+
}
53+
54+
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
55+
{
56+
var defaultOptions = new CustomResourceOptions
57+
{
58+
Version = Utilities.Version,
59+
};
60+
var merged = CustomResourceOptions.Merge(defaultOptions, options);
61+
// Override the ID if one was specified for consistency with other language SDKs.
62+
merged.Id = id ?? merged.Id;
63+
return merged;
64+
}
65+
/// <summary>
66+
/// Get an existing Aggregate resource's state with the given name, ID, and optional extra
67+
/// properties used to qualify the lookup.
68+
/// </summary>
69+
///
70+
/// <param name="name">The unique name of the resulting resource.</param>
71+
/// <param name="id">The unique provider ID of the resource to lookup.</param>
72+
/// <param name="state">Any extra arguments used during the lookup.</param>
73+
/// <param name="options">A bag of options that control this resource's behavior</param>
74+
public static Aggregate Get(string name, Input<string> id, AggregateState? state = null, CustomResourceOptions? options = null)
75+
{
76+
return new Aggregate(name, id, state, options);
77+
}
78+
}
79+
80+
public sealed class AggregateArgs : global::Pulumi.ResourceArgs
81+
{
82+
[Input("description")]
83+
public Input<string>? Description { get; set; }
84+
85+
[Input("prefix", required: true)]
86+
public Input<string> Prefix { get; set; } = null!;
87+
88+
[Input("rirId")]
89+
public Input<int>? RirId { get; set; }
90+
91+
[Input("tags")]
92+
private InputList<string>? _tags;
93+
public InputList<string> Tags
94+
{
95+
get => _tags ?? (_tags = new InputList<string>());
96+
set => _tags = value;
97+
}
98+
99+
[Input("tenantId")]
100+
public Input<int>? TenantId { get; set; }
101+
102+
public AggregateArgs()
103+
{
104+
}
105+
public static new AggregateArgs Empty => new AggregateArgs();
106+
}
107+
108+
public sealed class AggregateState : global::Pulumi.ResourceArgs
109+
{
110+
[Input("description")]
111+
public Input<string>? Description { get; set; }
112+
113+
[Input("prefix")]
114+
public Input<string>? Prefix { get; set; }
115+
116+
[Input("rirId")]
117+
public Input<int>? RirId { get; set; }
118+
119+
[Input("tags")]
120+
private InputList<string>? _tags;
121+
public InputList<string> Tags
122+
{
123+
get => _tags ?? (_tags = new InputList<string>());
124+
set => _tags = value;
125+
}
126+
127+
[Input("tenantId")]
128+
public Input<int>? TenantId { get; set; }
129+
130+
public AggregateState()
131+
{
132+
}
133+
public static new AggregateState Empty => new AggregateState();
134+
}
135+
}

sdk/dotnet/AvailableIpAddress.cs

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Collections.Immutable;
7+
using System.Threading.Tasks;
8+
using Pulumi.Serialization;
9+
using Pulumi;
10+
11+
namespace HBJYDev.Netbox
12+
{
13+
[NetboxResourceType("netbox:index/availableIpAddress:AvailableIpAddress")]
14+
public partial class AvailableIpAddress : global::Pulumi.CustomResource
15+
{
16+
[Output("description")]
17+
public Output<string?> Description { get; private set; } = null!;
18+
19+
[Output("dnsName")]
20+
public Output<string?> DnsName { get; private set; } = null!;
21+
22+
[Output("interfaceId")]
23+
public Output<int?> InterfaceId { get; private set; } = null!;
24+
25+
[Output("ipAddress")]
26+
public Output<string> IpAddress { get; private set; } = null!;
27+
28+
[Output("ipRangeId")]
29+
public Output<int?> IpRangeId { get; private set; } = null!;
30+
31+
[Output("prefixId")]
32+
public Output<int?> PrefixId { get; private set; } = null!;
33+
34+
[Output("status")]
35+
public Output<string?> Status { get; private set; } = null!;
36+
37+
[Output("tags")]
38+
public Output<ImmutableArray<string>> Tags { get; private set; } = null!;
39+
40+
[Output("tenantId")]
41+
public Output<int?> TenantId { get; private set; } = null!;
42+
43+
[Output("vrfId")]
44+
public Output<int?> VrfId { get; private set; } = null!;
45+
46+
47+
/// <summary>
48+
/// Create a AvailableIpAddress resource with the given unique name, arguments, and options.
49+
/// </summary>
50+
///
51+
/// <param name="name">The unique name of the resource</param>
52+
/// <param name="args">The arguments used to populate this resource's properties</param>
53+
/// <param name="options">A bag of options that control this resource's behavior</param>
54+
public AvailableIpAddress(string name, AvailableIpAddressArgs? args = null, CustomResourceOptions? options = null)
55+
: base("netbox:index/availableIpAddress:AvailableIpAddress", name, args ?? new AvailableIpAddressArgs(), MakeResourceOptions(options, ""))
56+
{
57+
}
58+
59+
private AvailableIpAddress(string name, Input<string> id, AvailableIpAddressState? state = null, CustomResourceOptions? options = null)
60+
: base("netbox:index/availableIpAddress:AvailableIpAddress", name, state, MakeResourceOptions(options, id))
61+
{
62+
}
63+
64+
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
65+
{
66+
var defaultOptions = new CustomResourceOptions
67+
{
68+
Version = Utilities.Version,
69+
};
70+
var merged = CustomResourceOptions.Merge(defaultOptions, options);
71+
// Override the ID if one was specified for consistency with other language SDKs.
72+
merged.Id = id ?? merged.Id;
73+
return merged;
74+
}
75+
/// <summary>
76+
/// Get an existing AvailableIpAddress resource's state with the given name, ID, and optional extra
77+
/// properties used to qualify the lookup.
78+
/// </summary>
79+
///
80+
/// <param name="name">The unique name of the resulting resource.</param>
81+
/// <param name="id">The unique provider ID of the resource to lookup.</param>
82+
/// <param name="state">Any extra arguments used during the lookup.</param>
83+
/// <param name="options">A bag of options that control this resource's behavior</param>
84+
public static AvailableIpAddress Get(string name, Input<string> id, AvailableIpAddressState? state = null, CustomResourceOptions? options = null)
85+
{
86+
return new AvailableIpAddress(name, id, state, options);
87+
}
88+
}
89+
90+
public sealed class AvailableIpAddressArgs : global::Pulumi.ResourceArgs
91+
{
92+
[Input("description")]
93+
public Input<string>? Description { get; set; }
94+
95+
[Input("dnsName")]
96+
public Input<string>? DnsName { get; set; }
97+
98+
[Input("interfaceId")]
99+
public Input<int>? InterfaceId { get; set; }
100+
101+
[Input("ipRangeId")]
102+
public Input<int>? IpRangeId { get; set; }
103+
104+
[Input("prefixId")]
105+
public Input<int>? PrefixId { get; set; }
106+
107+
[Input("status")]
108+
public Input<string>? Status { get; set; }
109+
110+
[Input("tags")]
111+
private InputList<string>? _tags;
112+
public InputList<string> Tags
113+
{
114+
get => _tags ?? (_tags = new InputList<string>());
115+
set => _tags = value;
116+
}
117+
118+
[Input("tenantId")]
119+
public Input<int>? TenantId { get; set; }
120+
121+
[Input("vrfId")]
122+
public Input<int>? VrfId { get; set; }
123+
124+
public AvailableIpAddressArgs()
125+
{
126+
}
127+
public static new AvailableIpAddressArgs Empty => new AvailableIpAddressArgs();
128+
}
129+
130+
public sealed class AvailableIpAddressState : global::Pulumi.ResourceArgs
131+
{
132+
[Input("description")]
133+
public Input<string>? Description { get; set; }
134+
135+
[Input("dnsName")]
136+
public Input<string>? DnsName { get; set; }
137+
138+
[Input("interfaceId")]
139+
public Input<int>? InterfaceId { get; set; }
140+
141+
[Input("ipAddress")]
142+
public Input<string>? IpAddress { get; set; }
143+
144+
[Input("ipRangeId")]
145+
public Input<int>? IpRangeId { get; set; }
146+
147+
[Input("prefixId")]
148+
public Input<int>? PrefixId { get; set; }
149+
150+
[Input("status")]
151+
public Input<string>? Status { get; set; }
152+
153+
[Input("tags")]
154+
private InputList<string>? _tags;
155+
public InputList<string> Tags
156+
{
157+
get => _tags ?? (_tags = new InputList<string>());
158+
set => _tags = value;
159+
}
160+
161+
[Input("tenantId")]
162+
public Input<int>? TenantId { get; set; }
163+
164+
[Input("vrfId")]
165+
public Input<int>? VrfId { get; set; }
166+
167+
public AvailableIpAddressState()
168+
{
169+
}
170+
public static new AvailableIpAddressState Empty => new AvailableIpAddressState();
171+
}
172+
}

0 commit comments

Comments
 (0)