Terraform: Difference between revisions
From wiki.vacula.xyz
(Created page with "'''Terraform''' serves as an infrastructure-as-code deployment tool. == Quick Usage == <nowiki> # Prepare terraform in the current directory terraform init # Format the .tf file terraform fmt # Verify .tf file syntax terraform validate # Show changes terraform plan # Apply changes terraform apply # Remove everything terraform destroy</nowiki> <nowiki>") |
No edit summary |
||
| Line 16: | Line 16: | ||
terraform destroy</nowiki> | terraform destroy</nowiki> | ||
== Libvirt/KVM/QEMU == | |||
<nowiki> | |||
terraform { | |||
required_providers { | |||
libvirt = { | |||
source = "dmacvicar/libvirt" | |||
} | |||
} | |||
} | |||
provider "libvirt" { | |||
uri = "qemu:///system" | |||
} | |||
resource "libvirt_domain" "test1" { | |||
name = "terraform_test" | |||
} | |||
</nowiki> | |||
Latest revision as of 16:07, 13 August 2024
Terraform serves as an infrastructure-as-code deployment tool.
Quick Usage
# Prepare terraform in the current directory terraform init # Format the .tf file terraform fmt # Verify .tf file syntax terraform validate # Show changes terraform plan # Apply changes terraform apply # Remove everything terraform destroy
Libvirt/KVM/QEMU
terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
provider "libvirt" {
uri = "qemu:///system"
}
resource "libvirt_domain" "test1" {
name = "terraform_test"
}