Compare commits
No commits in common. "ab749f7e111478cc20175c77e920cdb6a639b5d9" and "0d24c69e325dd2da401d1026898ecaaf94c459f0" have entirely different histories.
ab749f7e11
...
0d24c69e32
2
linode/.gitignore
vendored
2
linode/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
*.pyc
|
|
||||||
venv/
|
|
@ -1,5 +0,0 @@
|
|||||||
name: ${PROJECT}
|
|
||||||
description: ${DESCRIPTION}
|
|
||||||
runtime: python
|
|
||||||
template:
|
|
||||||
description: A Pulumi deployment with Linode cloud and Python
|
|
@ -1,25 +0,0 @@
|
|||||||
"""A Linode Python Pulumi program"""
|
|
||||||
|
|
||||||
import pulumi
|
|
||||||
import pulumi_linode
|
|
||||||
import yaml
|
|
||||||
from dotmap import DotMap
|
|
||||||
|
|
||||||
conf = DotMap(yaml.safe_load(open("input.yaml").read()))
|
|
||||||
config = pulumi.Config()
|
|
||||||
|
|
||||||
# Create a Linode resource (Linode Instance)
|
|
||||||
instance = pulumi_linode.Instance('my-instance',
|
|
||||||
type=config.linode.type,
|
|
||||||
region=config.linode.region,
|
|
||||||
image=config.linode.image,
|
|
||||||
label=config.vm.name,
|
|
||||||
root_pass=config.vm.root_password,
|
|
||||||
authorized_keys=config.vm.sshkeys
|
|
||||||
opts=pulumi.ResourceOptions(
|
|
||||||
custom_timeouts=pulumi.CustomTimeouts(create="2m")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Export the Instance label of the instance
|
|
||||||
pulumi.export('ip_address', instance.ip_address)
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
linode:
|
|
||||||
type: g6-nanode-1
|
|
||||||
region: eu-central
|
|
||||||
image: linode/debian12
|
|
||||||
|
|
||||||
# Basic VM configuration
|
|
||||||
vm:
|
|
||||||
name: linode-test
|
|
||||||
root_password: cicciopasticcio
|
|
||||||
sshkeys:
|
|
||||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFioHkaV1NhX6NCqsJakJw8EVBOcDHm1MEbpY499CPtG syntaxerrormmm@fisso"
|
|
||||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILu91hBh8pNRt4eE1pug0Y4jCHZDCcMJ+vj3CiF5EQHV syntaxerrormmm@syntaxxps"
|
|
||||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILH5q/ObtC4VhNT88gebezP/svpvCoQLoZCh4DvUn4xq syntaxerrormmm@taz"
|
|
@ -1,4 +0,0 @@
|
|||||||
pulumi>=3.0.0,<4.0.0
|
|
||||||
pulumi-linode>=4.0.0,<5.0.0
|
|
||||||
pyyaml>=6.0
|
|
||||||
dotmap>=1.3.30
|
|
@ -14,10 +14,12 @@ i.close()
|
|||||||
config = pulumi.Config()
|
config = pulumi.Config()
|
||||||
|
|
||||||
provider = proxmox.Provider("proxmoxve",
|
provider = proxmox.Provider("proxmoxve",
|
||||||
endpoint=input_['pve']['url'],
|
virtual_environment = {
|
||||||
insecure=input_['pve']['insecure'],
|
"endpoint": input_['pve']['url'],
|
||||||
username=input_['pve']['username'],
|
"insecure": input_['pve']['insecure'],
|
||||||
password=config.require_secret("password")
|
"username": input_['pve']['username'],
|
||||||
|
"password": config.require_secret("password")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
vm_name = input_['vm']['name']
|
vm_name = input_['vm']['name']
|
||||||
@ -73,8 +75,7 @@ vm = proxmox.vm.VirtualMachine("vm",
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
opts = pulumi.ResourceOptions(
|
opts = pulumi.ResourceOptions(
|
||||||
provider = provider,
|
provider = provider
|
||||||
custom_timeouts=pulumi.CustomTimeouts(create="3m")
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""A ProxmoxVE VM template with Python"""
|
"""A ProxmoxVE VM template with Python"""
|
||||||
|
|
||||||
import pulumi
|
|
||||||
import pulumi_proxmoxve as proxmox
|
|
||||||
import yaml
|
import yaml
|
||||||
from dotmap import DotMap
|
from dotmap import DotMap
|
||||||
|
import pulumi
|
||||||
|
import pulumi_proxmoxve as proxmox
|
||||||
|
|
||||||
conf = DotMap(yaml.safe_load(open("input.yaml").read()))
|
conf = DotMap(yaml.safe_load(open("input.yaml").read()))
|
||||||
config = pulumi.Config()
|
config = pulumi.Config()
|
||||||
@ -63,8 +63,7 @@ vm = proxmox.vm.VirtualMachine(conf.vm.name,
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
opts = pulumi.ResourceOptions(
|
opts = pulumi.ResourceOptions(
|
||||||
provider = provider,
|
provider = provider
|
||||||
custom_timeouts=pulumi.CustomTimeouts(create="3m")
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user