[root@workstation terraform-exmaple]# terraform planTerraform used the selected providers to generate the following execution plan. Resource actions are indicated
with the following symbols:
+ create
Terraform will perform the following actions:
# local_file.example will be created + resource "local_file""example"{ + content=<<-EOT
Created by Terraform
EOT + directory_permission="0777" + file_permission="0777" + filename="/tmp/example.txt" + id=(known after apply)}Plan: 1 to add, 0 to change, 0 to destroy.
...
[root@workstation terraform-exmaple]# terraform applyTerraform used the selected providers to generate the following execution plan. Resource actions are indicated
with the following symbols:
+ create
Terraform will perform the following actions:
# local_file.example will be created + resource "local_file""example"{ + content=<<-EOT
Created by Terraform
EOT + directory_permission="0777" + file_permission="0777" + filename="/tmp/example.txt" + id=(known after apply)}Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
local_file.example: Creating...
local_file.example: Creation complete after 0s [id=ea874a7a3b87f4aa75c34c599a75a561909fad5d]Apply complete! Resources: 1 added, 0 changed, 0 destroyed
查看創建的檔案 :
1
2
[root@workstation terraform-exmaple]# cat /tmp/example.txt Created by Terraform