Update the packet examples to remove ipAddressTypes
MODIFY
packet-py-webserver/README.md
packet-py-webserver/README.md
@@ -16,8 +16,14 @@ After cloning this repo, `cd` into it and run these commands.
1. Install all of the dependencies for the application:
+1. Create a Python virtualenv, activate it, and install dependencies:
+
+ This installs the dependent packages [needed](https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/) for our Pulumi program.
+
```bash
- $ npm install
+ $ python3 -m venv venv
+ $ source venv/bin/activate
+ $ pip3 install -r requirements.txt
```
1. Deploy everything with the `pulumi up` command. This provisions the webserver:

MODIFY
packet-py-webserver/__main__.py
packet-py-webserver/__main__.py
@@ -16,7 +16,11 @@ vm = packet.Device(
operating_system="coreos_stable",
plan="baremetal_0",
project_id=project.id,
- ip_address_types=["public_ipv4", "private_ipv4"],
+ ip_addresses=[{
+ "type": "public_ipv4",
+ }, {
+ "type": "private_ipv4",
+ }]
)
export('ip', vm.access_public_ipv4)

MODIFY
packet-ts-webserver/index.ts
packet-ts-webserver/index.ts
@@ -14,7 +14,12 @@ const vm = new packet.Device("vm", {
operatingSystem: packet.OperatingSystems.CoreOSStable,
plan: packet.Plans.T1SmallX86,
projectId: project.then(p => p.id),
- ipAddressTypes: [packet.IpAddressTypes.PublicIPv4, packet.IpAddressTypes.PrivateIPv4, packet.IpAddressTypes.PublicIPv6],
+ ipAddresses: [{
+ type: "public_ipv4",
+ },
+ {
+ type: "private_ipv4",
+ }],
});
export const ip = vm.accessPublicIpv4;

Update the packet examples to remove ipAddressTypes (#628)