Files
configpolicy/pulumi/dch/vps.py
Dustin C. Hatch f868cea05c pulumi: Manage HostVDS instances
HostVDS provides public access to their OpenStack API, which we can use
to manage cloud instances.  This particular instance will be used to run
the remote blackbox exporter/vmagent to monitor website availability.
2025-01-26 13:08:59 -06:00

34 lines
688 B
Python

import pulumi_openstack as os
key_pair = os.compute.Keypair(
'default',
name='dustin--rosalina',
public_key='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJsL5fSylmiJmBtW0DH/viAAmtU2E/2M17GPvysiyRs+',
)
flavor = os.compute.get_flavor(
vcpus=1,
ram=1024,
)
image = os.images.get_image(
name='AlmaLinux-9-amd64',
)
instance = os.compute.Instance(
'vps',
flavor_id=flavor.id,
image_id=image.id,
key_pair=key_pair.id,
networks=[
{'name': 'Internet-01'},
],
metadata={
'os_distro': 'alma', # Sets the icon in the HostVDS Control Panel
'groups': 'remote-blackbox',
},
security_groups=[
'allow_all',
],
)