Skip to content

Commit e4b76e8

Browse files
wrangler cloudchamber create: IPv6 opt-in is explicitly defined (#8536)
Co-authored-by: Carmen Popoviciu <[email protected]>
1 parent ecbe026 commit e4b76e8

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.changeset/tangy-streets-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
wrangler cloudchamber create explicitly sets IPv6 predefined

packages/wrangler/src/cloudchamber/create.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { brandColor, dim } from "@cloudflare/cli/colors";
1010
import { inputPrompt, spinner } from "@cloudflare/cli/interactive";
1111
import { pollSSHKeysUntilCondition, waitForPlacement } from "./cli";
1212
import { getLocation } from "./cli/locations";
13-
import { AssignIPv4, DeploymentsService } from "./client";
13+
import { AssignIPv4, AssignIPv6, DeploymentsService } from "./client";
1414
import {
1515
checkEverythingIsSet,
1616
collectEnvironmentVariables,
@@ -137,7 +137,9 @@ export async function createCommand(
137137
: [];
138138
const useIpv4 = args.ipv4 ?? config.cloudchamber.ipv4;
139139
const network =
140-
useIpv4 === true ? { assign_ipv4: AssignIPv4.PREDEFINED } : undefined;
140+
useIpv4 === true
141+
? { assign_ipv4: AssignIPv4.PREDEFINED }
142+
: { assign_ipv6: AssignIPv6.PREDEFINED };
141143
const deployment = await DeploymentsService.createDeploymentV2({
142144
image: body.image,
143145
location: body.location,

packages/wrangler/src/cloudchamber/network/network.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { processArgument } from "@cloudflare/cli/args";
2-
import { AssignIPv4 } from "../client";
2+
import { AssignIPv4, AssignIPv6 } from "../client";
33
import type { NetworkParameters } from "../client";
44

55
export async function getNetworkInput(args: {
@@ -12,5 +12,7 @@ export async function getNetworkInput(args: {
1212
label: "Include IPv4",
1313
type: "confirm",
1414
});
15-
return ipv4 === true ? { assign_ipv4: AssignIPv4.PREDEFINED } : undefined;
15+
return ipv4 === true
16+
? { assign_ipv4: AssignIPv4.PREDEFINED }
17+
: { assign_ipv6: AssignIPv6.PREDEFINED };
1618
}

0 commit comments

Comments
 (0)