cd $HOMEtar-zxvfproviders.tgz# 目录结构如下/home/caifeng[caifeng@cnacebasy0008l ~]$ pwd/home/caifeng[caifeng@cnacebasy0008l ~]$ tree .terraform/.terraform/└──providers└──registry.terraform.io└──hashicorp└──azurerm└──3.48.0└──linux_amd64└──terraform-provider-azurerm_v3.48.0_x56directories,1file
[caifeng@cnacebasy0008l CNAZE2UAKSVPMS01]$ terraform init -plugin-dir=$HOME/.terraform/providersInitializingthebackend...Initializingproviderplugins...-Findinghashicorp/azurermversionsmatching"3.48.0"...-Installinghashicorp/azurermv3.48.0...-Installedhashicorp/azurermv3.48.0 (unauthenticated)Terraformhascreatedalockfile.terraform.lock.hcltorecordtheproviderselectionsitmadeabove.IncludethisfileinyourversioncontrolrepositorysothatTerraformcanguaranteetomakethesameselectionsbydefaultwhenyourun"terraform init"inthefuture.╷│Warning:Incompletelockfileinformationforproviders││ Due to your customized provider installation methods, Terraform was forced to calculate lock file checksums locally for the following
│providers:│-hashicorp/azurerm││ The current .terraform.lock.hcl file only includes checksums for linux_amd64, so Terraform running on another platform will fail to install
│theseproviders.││Tocalculateadditionalchecksumsforanotherplatform,run:│terraformproviderslock-platform=linux_amd64│ (where linux_amd64istheplatformtogenerate)╵Terraformhasbeensuccessfullyinitialized!YoumaynowbeginworkingwithTerraform.Tryrunning"terraform plan"toseeanychangesthatarerequiredforyourinfrastructure.AllTerraformcommandsshouldnowwork.IfyoueversetorchangemodulesorbackendconfigurationforTerraform,rerunthiscommandtoreinitializeyourworkingdirectory.Ifyouforget,othercommandswilldetectitandremindyoutodosoifnecessary.