可以通过命令terraform state查看状态,主要命令有: $ terraform state Subcommands: list List resources in the state mv Move an item in the state pull Pull current state and output to stdout push Update remote state from a local state file replace-provider Replace provider in the state rm Remove i...
然后实现COS为state file的远端存储,修改代码进行存储 highlighter- kotlin terraform {required_providers {tencentcloud = {source ="tencentcloudstack/tencentcloud"}}}##增加以下模块terraform {backend"cos"{bucket ="terraform-state-aiops-camp"##这里的名称是控制台现实的名称prefix ="terraform/state"region ="ap...
$ terraform state show local_file.test-file# local_file.test-file:resource"local_file""test-file"{ content ="https://www.pkslow.com"directory_permission ="0777"file_permission ="0777"filename ="./terraform-guides-by-pkslow.txt"id="6db7ad1bbf57df0c859cd5fc62ff5408515b5fc1"} 显示当前...
可以通过命令terraform state查看状态,主要命令有: 代码语言:javascript 复制 $ terraform stateSubcommands:list List resourcesinthe state mv Move an iteminthe state pull Pull current state and output to stdout push Update remote state from a local state file replace-provider Replace providerinthe state ...
可以通过terraform state做一些状态管理: 显示状态列表: $ terraform state list local_file.test-file 查看具体资源的状态信息: $ terraform state show local_file.test-file # local_file.test-file: resource "local_file" "test-file" { content = "https://www.pkslow.com" ...
resource_group_name = "TerraformState_CloudShell" storage_account_name = "tfstatecloudshell2021" container_name = "tfstate" key = "prod.terraform.tfstate" } } 4. Azure Storage Key While theterraform.tffile has all the other information for the Azure Storage account, ...
可以通过命令terraform state查看状态,主要命令有: $ terraform state Subcommands: list List resources in the state mv Move an item in the state pull Pull current state and output to stdout push Update remote state from a local state file
可以通过terraform state做一些状态管理: 显示状态列表: $ terraform state list local_file.test-file 查看具体资源的状态信息: $ terraform state show local_file.test-file # local_file.test-file: resource "local_file" "test-file" { content = "https://www.pkslow.com" ...
当执行terraform apply命令时: ①、terraform唤醒进程,初始化backend(默认为local-file); ②、解析用户定义的模板文件,并获取最新的资源状态,进行对比; ③、构建DAG,将所有编排动作依次发送给provider; ④、provider调用云API管理云资源 ⑤、将返回的结果写回state...
filename = "${path.module}/terraform-introduction-by-pkslow.txt" } 然后执行下面命令: $ terraform init Initializing the backend... Initializing provider plugins... - Finding hashicorp/local versions matching "2.1.0"... - Installing hashicorp/local v2.1.0... ...