1
server = aws.ec2.Instance(
   'rumbleInstance2',
   instance_type=size,
   vpc_security_group_ids=[group.id],
   region="Whateever region i want"
)    

Some option that i can think of are overloading provider function (i am not sure if i am doing it right)

Allan Chua
  • 9,305
  • 9
  • 41
  • 61
  • It's not super obvious what you're asking here, but I think Transformations is what you want? https://www.pulumi.com/docs/intro/concepts/resources/options/transformations/ – jaxxstorm Feb 09 '22 at 02:47

1 Answers1

0
import pulumi_aws as aws

available = aws.get_availability_zones(state="available")
primary = aws.ec2.Subnet("primary", availability_zone=available.names[0])

server = aws.ec2.Instance(
   'rumbleInstance2',
   instance_type=size,
   vpc_security_group_ids=[group.id],
   region="Whateever region i want",
   availabilityZone=primary 
)    
Allan Chua
  • 9,305
  • 9
  • 41
  • 61