Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b15ea5d33 | ||
|
|
344f748b84 | ||
|
|
84cf39e7d9 |
No files matched your search
@@ -3,6 +3,13 @@ name: Deploy Proxmox Infra
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "01-proxmox-infra/**"
|
||||||
|
- ".gitea/workflows/01-deploy-proxmox-infra.yaml"
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -51,7 +58,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
name: Pulumi Deploy
|
name: Pulumi Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -75,7 +82,10 @@ jobs:
|
|||||||
run: pulumi package add terraform-provider marshallford/pfsense 0.22.0
|
run: pulumi package add terraform-provider marshallford/pfsense 0.22.0
|
||||||
working-directory: 01-proxmox-infra
|
working-directory: 01-proxmox-infra
|
||||||
|
|
||||||
|
# Manual runs only: a refresh that finds a VM missing drops it from state,
|
||||||
|
# and `up` would then create a blank replacement without review.
|
||||||
- name: Refresh State
|
- name: Refresh State
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
run: |
|
run: |
|
||||||
pulumi login "$PULUMI_BACKEND_URL"
|
pulumi login "$PULUMI_BACKEND_URL"
|
||||||
pulumi refresh --yes --stack dev \
|
pulumi refresh --yes --stack dev \
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ const pveNodes = pveNodeSeeds
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ provider: n.provider, ignoreChanges: ["disks"] },
|
{ provider: n.provider, protect: true, ignoreChanges: ["disks"] },
|
||||||
),
|
),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ const k3sVms = nodeConfigs.map(
|
|||||||
agent: { enabled: true, timeout: "30s" },
|
agent: { enabled: true, timeout: "30s" },
|
||||||
cdrom: { fileId: "none" },
|
cdrom: { fileId: "none" },
|
||||||
started: false,
|
started: false,
|
||||||
stopOnDestroy: true,
|
rebootAfterUpdate: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider: node.host.provider,
|
provider: node.host.provider,
|
||||||
@@ -322,7 +322,7 @@ k3sVms.forEach((vmResource, i) => {
|
|||||||
ipAddress: nodeConfigs[i].ip,
|
ipAddress: nodeConfigs[i].ip,
|
||||||
hostname: nodeConfigs[i].name,
|
hostname: nodeConfigs[i].name,
|
||||||
},
|
},
|
||||||
{ dependsOn: vmResource, provider: pfSenseProvider },
|
{ dependsOn: vmResource, provider: pfSenseProvider, protect: true },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@ const ansibleDhcp = new pfsense.Dhcpv4Staticmapping(
|
|||||||
ipAddress: ansibleIp,
|
ipAddress: ansibleIp,
|
||||||
hostname: "ansible",
|
hostname: "ansible",
|
||||||
},
|
},
|
||||||
{ provider: pfSenseProvider },
|
{ provider: pfSenseProvider, protect: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
|
new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
|
||||||
@@ -396,6 +396,7 @@ new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
|
|||||||
provider: ansibleHost.provider,
|
provider: ansibleHost.provider,
|
||||||
dependsOn: ansibleDhcp,
|
dependsOn: ansibleDhcp,
|
||||||
retainOnDelete: true,
|
retainOnDelete: true,
|
||||||
|
protect: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user