https://pulumi.com logo
#general
Title
# general
b

brainy-vegetable-77467

05/01/2020, 1:34 PM
Copy code
const master = new digitalocean.Droplet(`k3s-master`, {
	image: "ubuntu-18-04-x64",
	region: region,
	privateNetworking: true,    
	size: digitalocean.DropletSlugs.DropletS1VCPU1GB,
	userData: userDataMaster,
});

export const master_ip_priv = master.ipv4AddressPrivate;

const userDataWorker = `#!/bin/bash  
   echo IPAddressMaster: $master_ip_priv > ip-master.txt   
   `;

const worker = new digitalocean.Droplet(`k3s-worker-1`, {
  image: "ubuntu-18-04-x64",
  region: region,
  privateNetworking: true,    
  size: digitalocean.DropletSlugs.Droplet512mb,
  userData: userDataWorker,
});