Terraform

 

(22)
https://developer.hashicorp.com/terraform/downloads
https://zenn.dev/sway/articles/terraform_biginner_helloworld


wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

 


terraform -help
terraform -version


vim hello.tf

resource "local_file" "helloworld" {
  content  = "hello world!"
  filename = "hello.txt"
}


terraform init

terraform plan
terraform apply


cat hello.txt

terraform destroy

(11)


https://developer.hashicorp.com/terraform/downloads
https://zenn.dev/sway/articles/terraform_biginner_helloworld


wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

 


terraform -help
terraform -version


vim hello.tf

resource "local_file" "helloworld" {
  content  = "hello world!"
  filename = "hello.txt"
}


terraform init

terraform plan
terraform apply


cat hello.txt

terraform destroy

 

(RL9)


https://developer.hashicorp.com/terraform/downloads
https://zenn.dev/sway/articles/terraform_biginner_helloworld


sudo dnf install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo dnf -y install terraform


terraform -help
terraform -version


vim hello.tf

resource "local_file" "helloworld" {
  content  = "hello world!"
  filename = "hello.txt"
}


terraform init

terraform plan
terraform apply


cat hello.txt

terraform destroy

(2022)

https://developer.hashicorp.com/terraform/downloads
https://zenn.dev/sway/articles/terraform_biginner_helloworld


notepad hello.tf

resource "local_file" "helloworld" {
  content  = "hello world!"
  filename = "hello.txt"
}


terraform init

terraform plan
terraform apply


type hello.txt

terraform destroy