- TTL Stacks
- Scheduled Deployments
- Drift Detection
- requires Pulumi Cloud Personal Access Token
- Add
PULUMI_ACCESS_TOKEN
secret to Github Codespaces Secrets - Add CIVO API Key secret to Pulumi stack Config or Pulumi ESC
- Open repository in Github Codespaces
- Login and create a new Pulumi stack
pulumi login
pulumi org set-default ContainerCraft
pulumi stack select --create dev
vim pulumi/stacks/Pulumi.dev.yaml
- For Pulumi ESC, add your CIVO environment to
pulumi/stacks/Pulumi.dev.yaml
:
environment:
- civo
- Configure deployment settings
NOTE: First deploy with Pulumi Cloud DeploymentSettings disabled since our stack needs to be created before we can deploy Pulumi Cloud stack deployments configuration.
# Pulumi Project IaC specific settings
# Enable CIVO Infrastructure Deployment
pulumi config set civo_kubernetes.deploy true
# Enable Pulumi Cloud Stack Deployments Configuration
pulumi config set pulumicloud.deployment true
# Enable Pulumi Cloud Stack Deployments:
# - Pulumi Preview Deployments Schedule
pulumi config set pulumicloud.schedule true
- Deploy the stack
pulumi preview
pulumi up
- Destroy the stack
pulumi destroy --refresh=true --skip-preview -y
pulumi stack rm dev
# Load the kubeconfig locally for kubectl cli usage
mkdir ~/.kube && pulumi stack output kubeconfig --show-secrets > ~/.kube/config
# Try a kubectl command like this to list all pods
kubectl get po -A