We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the @pulumi/random.RandomPet function in @pulumi/random

To help you get started, we’ve selected a few @pulumi/random examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / examples / packet-ts-webserver / index.ts View on Github external
// Copyright 2016-2019, Pulumi Corporation.  All rights reserved.

import * as packet from "@pulumi/packet";
import * as random from "@pulumi/random";

const randomHostName = new random.RandomPet("hostname");

const project = packet.getProject({name: "ci-project"});

const vm = new packet.Device("vm", {
    facilities: [packet.Facilities.EWR1],
    billingCycle: packet.BillingCycles.Hourly,
    hostname: randomHostName.id,
    operatingSystem: packet.OperatingSystems.CoreOSStable,
    plan: packet.Plans.T1SmallX86,
    projectId:  project.id,
    ipAddressTypes: [packet.IpAddressTypes.PublicIPv4, packet.IpAddressTypes.PrivateIPv4, packet.IpAddressTypes.PublicIPv6],
});

export const ip = vm.accessPublicIpv4;
export const name = vm.hostname;

@pulumi/random

A Pulumi package to safely use randomness in Pulumi programs.

Apache-2.0
Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis