|
| 1 | +import * as pulumi from "@pulumi/pulumi"; |
| 2 | +import * as stackit from "@stackitcloud/pulumi-stackit"; |
| 3 | + |
| 4 | +export const networkInterfaceProjectId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; |
| 5 | +export const networkInterfaceNetworkId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx1"; |
| 6 | +export const networkInterfaceSecurityGroupId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx1"; |
| 7 | +export const networkInterfaceName = "example-networkInterface-name" |
| 8 | +export const networkInterfaceLabelKey = "unit-test"; |
| 9 | +export const networkInterfaceLabelValue = "test-label-value"; |
| 10 | +export const networkInterfaceAllowedAddresses = "192.168.0.0/24"; |
| 11 | +export const networkInterfaceIpv4 = "192.168.1.123"; |
| 12 | +export const networkInterfaceSecurity = true; |
| 13 | + |
| 14 | +// datasource |
| 15 | +export const networkInterfaceId = "networkInterface-id-to-read"; |
| 16 | + |
| 17 | +// only required fields were set |
| 18 | +export const exampleNetworkInterfaceOnlyRequired = new stackit.NetworkInterface("example_networkInterfaceInterface_req", { |
| 19 | + projectId: networkInterfaceProjectId, |
| 20 | + networkId: networkInterfaceNetworkId, |
| 21 | +}); |
| 22 | + |
| 23 | +// everything is set |
| 24 | +export const exampleNetworkInterfaceMax = new stackit.NetworkInterface("example_networkInterface_max", { |
| 25 | + projectId: networkInterfaceProjectId, |
| 26 | + networkId: networkInterfaceNetworkId, |
| 27 | + name: networkInterfaceName, |
| 28 | + allowedAddresses: [networkInterfaceAllowedAddresses], |
| 29 | + securityGroupIds: [networkInterfaceSecurityGroupId], |
| 30 | + ipv4: networkInterfaceIpv4, |
| 31 | + security: networkInterfaceSecurity, |
| 32 | + labels: {[networkInterfaceLabelKey]:networkInterfaceLabelValue}, |
| 33 | +}); |
| 34 | + |
| 35 | +export const networkInterfaceDatasource = stackit.getNetworkInterfaceOutput({ |
| 36 | + projectId: networkInterfaceProjectId, |
| 37 | + networkId: networkInterfaceNetworkId, |
| 38 | + networkInterfaceId: networkInterfaceId, |
| 39 | +}); |
0 commit comments