ããã¯ããªã«ãããããŠæžãããã®ïŒ
Terraformã䜿ããšãterraform init
æã«äœ¿çšããProviderãããŠã³ããŒãããŠããã®ã§ããããããããããã®ãã£ã¬ã¯ããªã§è¡ã£ãŠãããš
åã«ãŒãã¢ãžã¥ãŒã«é
äžã®.terraform
ãã£ã¬ã¯ããªã®ãµã€ãºã®åèšãã ãã ãç¡èŠã§ããªããªã£ãŠããŸãã
ããããã§ããŠã³ããŒãããŠããŸããŸããããã
ãããã©ãã«ãããæ¹æ³ã¯ãªãã®ããªïŒãšããããšã§ãProvider Plugin Cacheãšãããã®ãè©ŠããŠã¿ãããšã«ããŸããã
Provider Plugin Cache
Provider Plugin Cacheã«é¢ããããã¥ã¡ã³ãã¯ãã¡ãã§ãã
æåã«åé ã§æžããããšã«äŒŒã課é¡æãæžããŠãã£ãŠãããã©ã«ãã§ã¯terraform init
æã«ããããProviderãããŠã³ããŒãããŸãã
Providerã¯æ°çŸMBã«ãªãããšããããããäœéãªãããã¯ãŒã¯ã®ãŠãŒã¶ãŒã«ã¯äžäŸ¿ã§ããããã®ããŠã³ããŒãçµæãå
±æããããšã§
ããŠã³ããŒãåæ°ã1åã«ã§ãããšãã話ã«ãªã£ãŠããŸãã
By default, terraform init downloads plugins into a subdirectory of the working directory so that each working directory is self-contained. As a consequence, if you have multiple configurations that use the same provider then a separate copy of its plugin will be downloaded for each configuration.
Given that provider plugins can be quite large (on the order of hundreds of megabytes), this default behavior can be inconvenient for those with slow or metered Internet connections. Therefore Terraform optionally allows the use of a local directory as a shared plugin cache, which then allows each distinct plugin binary to be downloaded only once.
䜿ãæ¹ã¯$HOME
ãã£ã¬ã¯ããªã«çœ®ãã.terraformrc
ãã¡ã€ã«ïŒWindowsã§ã¯%APPDATA%
ãã£ã¬ã¯ããªã«çœ®ããterraform.rc
ãã¡ã€ã«ïŒã®
plugin_cache_dir
ããŸãã¯TF_PLUGIN_CACHE_DIR
ç°å¢å€æ°ã§ãã©ã°ã€ã³ããã£ãã·ã¥ããããã®ãã£ã¬ã¯ããªãæå®ããŸãã
ããã§Provider Plugin Cacheãæå¹ã«ãªããŸãã
ãªãããã£ãã·ã¥çšã®ãã£ã¬ã¯ããªã¯å ã«äœæããŠããå¿ èŠããããTerraformèªèº«ããã®ãã£ã¬ã¯ããªãäœæããããšã¯ãªãããã§ãã
ç¹æ§ãããå°ãæžãããŠããã®ã§ããã¡ããæžããŠãããŸãããã
- Provider Plugin Cacheãæå¹ã§ãã
terraform init
æã«é©åãªããŒãžã§ã³ããã£ãã·ã¥ãã䜿çšå¯èœã確èªãããªããã°ããŠã³ããŒããã - ãã£ãã·ã¥ããProviderãå©çšããå Žåã¯ãã·ã³ããªãã¯ãªã³ã¯ãšããŠå®çŸããã
- ãã£ãã·ã¥çšã®ãã£ã¬ã¯ããªã¯ãä»ã®ç®çïŒããšãã°ã¬ãžã¹ããªãŒã®ãã©ãŒãªã©ïŒãšå ±æããªãããš
- ãã£ãã·ã¥ãããProviderã¯ã䜿çšããProviderã®ããŒãžã§ã³ãå¢ãããšããã«åãããŠãã£ãã·ã¥äžã«å¢ããŠããããšã«ãªãã®ã§ã䜿çšããªãããŒãžã§ã³ãã§ããå Žåã¯æåã§åé€ããããš
ã§ã¯è©ŠããŠã¿ãŸãããã
ç°å¢
ä»åã®ç°å¢ã¯ãã¡ãã
$ terraform version Terraform v1.7.3 on linux_amd64
Terraformã䜿ãã®ã§Providerãå¿ èŠã«ãªããŸãããä»åã¯AWS Providerã䜿ãããšã«ããŸãã䜿ã察象ã¯LocalStackã«ããŸãããã
$ python3 --version Python 3.10.12 $ localstack --version 3.1.0
èµ·åã
$ localstack start
確èªçšã®Terraformã¢ãžã¥ãŒã«ãäœæãã
ã²ãšãŸããTerraformã®æ§æãã¡ã€ã«ãäœããªããšå§ãŸããŸãããProviderãå
±æãããããšã確èªãããã®ã§ã2ã€ã®ã«ãŒãã¢ãžã¥ãŒã«ã
äœãå¿
èŠããããŸãã
ä»åã¯Amazon S3ãšAmazon SQSãæ§ç¯ããã¢ãžã¥ãŒã«ãäœæããããšã«ããŸãã
$ mkdir s3 sqs
å 容ã¯åçŽãªãã®ã«ããŠãããŸãã
Amazon S3ãã±ããæ§ç¯çšã
s3/main.tf
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.36.0" } } } provider "aws" { access_key = "mock_access_key" region = "us-east-1" s3_use_path_style = true secret_key = "mock_secret_key" skip_credentials_validation = true skip_metadata_api_check = true skip_requesting_account_id = true endpoints { apigateway = "http://localhost:4566" cloudformation = "http://localhost:4566" cloudwatch = "http://localhost:4566" dynamodb = "http://localhost:4566" es = "http://localhost:4566" firehose = "http://localhost:4566" iam = "http://localhost:4566" kinesis = "http://localhost:4566" lambda = "http://localhost:4566" route53 = "http://localhost:4566" redshift = "http://localhost:4566" s3 = "http://localhost:4566" secretsmanager = "http://localhost:4566" ses = "http://localhost:4566" sns = "http://localhost:4566" sqs = "http://localhost:4566" ssm = "http://localhost:4566" stepfunctions = "http://localhost:4566" sts = "http://localhost:4566" } } resource "aws_s3_bucket" "this" { bucket = "my-bucket" } output "bucket" { value = aws_s3_bucket.this.bucket }
Amazon SQSæ§ç¯çšã
sqs/main.tf
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.36.0" } } } provider "aws" { access_key = "mock_access_key" region = "us-east-1" s3_use_path_style = true secret_key = "mock_secret_key" skip_credentials_validation = true skip_metadata_api_check = true skip_requesting_account_id = true endpoints { apigateway = "http://localhost:4566" cloudformation = "http://localhost:4566" cloudwatch = "http://localhost:4566" dynamodb = "http://localhost:4566" es = "http://localhost:4566" firehose = "http://localhost:4566" iam = "http://localhost:4566" kinesis = "http://localhost:4566" lambda = "http://localhost:4566" route53 = "http://localhost:4566" redshift = "http://localhost:4566" s3 = "http://localhost:4566" secretsmanager = "http://localhost:4566" ses = "http://localhost:4566" sns = "http://localhost:4566" sqs = "http://localhost:4566" ssm = "http://localhost:4566" stepfunctions = "http://localhost:4566" sts = "http://localhost:4566" } } resource "aws_sqs_queue" "this" { name = "my-queue" } output "queue_name" { value = aws_sqs_queue.this.name } output "queue_url" { value = aws_sqs_queue.this.url }
ããããterraform init
ããterraform apply
ãŸã§ãè¡ãããªãœãŒã¹ãæ§ç¯ã§ããããšã確èªããŸãã
## S3 $ cd s3 $ terraform init $ terraform apply ## SQS $ cd ../sqs $ terraform init $ terraform apply
çµæã¯çç¥ããŸãã
terraform init
æã«ã¯ãããã以äžã®ãã°ãåºåãããProviderãããŠã³ããŒããããŸãã
Initializing provider plugins... - Finding hashicorp/aws versions matching "5.36.0"... - Installing hashicorp/aws v5.36.0... - Installed hashicorp/aws v5.36.0 (signed by HashiCorp)
ãµã€ãºã確èªããŠã¿ãŸãããã
$ cd .. $ du -sh s3/.terraform 393M s3/.terraform $ du -sh sqs/.terraform 393M sqs/.terraform
400MB匱ã§ãããAWS Providerã§ãããããã®ãµã€ãºãããããšã«ãªããŸãã
ãããç©ã¿éãªããšã¡ãã£ãšèŸãã§ãããããšããããšã§Provider Plugin Cacheãè©ŠããŠã¿ãŸãããã
æ§ç¯ãããªãœãŒã¹ã¯ããã®åŸã¯èŠããªãã®ã§åé€ããŠãããŸãã
$ cd s3 $ terraform destroy $ $ cd ../sqs $ terraform destroy
Provider Plugin Cacheãè©Šã
ã§ã¯ãProvider Plugin Cacheãè©ŠããŠã¿ãŸãã
å
ã«ãå.terraform
ãã£ã¬ã¯ããªã¯åé€ããŠãããŸãããã
$ rm -rf s3/.terraform sqs/.terraform
ãã£ãã·ã¥å ã®ãã£ã¬ã¯ããªã¯å ã«äœæããå¿ èŠããããšãã話ã§ããã®ã§ãäœã£ãŠãããŸãã
$ mkdir -p $HOME/.terraform.d/plugin-cache
ãŸãã¯ç°å¢å€æ°ããè©ŠããŠã¿ãŸãããã
$ export TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache
## S3 $ cd s3 $ terraform init
terraform init
æã«å°ã衚瀺ãå€ãããŸããã
## 1åç®ïŒS3ïŒ Initializing provider plugins... - Reusing previous version of hashicorp/aws from the dependency lock file - Installing hashicorp/aws v5.36.0... - Installed hashicorp/aws v5.36.0 (signed by HashiCorp) ## 2åç®ïŒSQSïŒ Initializing provider plugins... - Reusing previous version of hashicorp/aws from the dependency lock file - Using hashicorp/aws v5.36.0 from the shared cache directory
2åç®ã¯ããã§ã«ãã£ãã·ã¥ã«ãããã®ã䜿ã£ãŠããããã«èŠããŸãã
äžèŠãããš.terraform
ãã£ã¬ã¯ããªããããäžèº«ãããããã«èŠããŸãã
$ ll åèš 24 drwxrwxr-x 3 xxxxx xxxxx 4096 2æ 11 18:31 ./ drwxrwxr-x 5 xxxxx xxxxx 4096 2æ 11 18:18 ../ drwxr-xr-x 3 xxxxx xxxxx 4096 2æ 11 18:31 .terraform/ -rw-r--r-- 1 xxxxx xxxxx 1406 2æ 11 18:23 .terraform.lock.hcl -rw-rw-r-- 1 xxxxx xxxxx 1449 2æ 11 18:20 main.tf -rw-rw-r-- 1 xxxxx xxxxx 2652 2æ 11 18:23 terraform.tfstate $ find .terraform .terraform .terraform/providers .terraform/providers/registry.terraform.io .terraform/providers/registry.terraform.io/hashicorp .terraform/providers/registry.terraform.io/hashicorp/aws .terraform/providers/registry.terraform.io/hashicorp/aws/5.36.0 .terraform/providers/registry.terraform.io/hashicorp/aws/5.36.0/linux_amd64
ã§ããããã®ãã¡ã€ã«ã¯ã·ã³ããªãã¯ãªã³ã¯ã«ãªã£ãŠããŸãã
$ tree .terraform .terraform âââ providers âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.36.0 âââ linux_amd64 -> $HOME/.terraform.d/plugin-cache/registry.terraform.io/hashicorp/aws/5.36.0/linux_amd64 6 directories, 0 files
.terraform
ãã£ã¬ã¯ããªã®ãµã€ãºãåçã«æžããŸãããã
$ du -sh .terraform 28K .terraform
ãã¡ã€ã«ã¯ãå ã»ã©äœæãããã£ãã·ã¥çšã®ãã£ã¬ã¯ããªã«ããŠã³ããŒããããŠããŸãã
$ tree $HOME/.terraform.d/plugin-cache $HOME/.terraform.d/plugin-cache âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.36.0 âââ linux_amd64 âââ terraform-provider-aws_v5.36.0_x5 5 directories, 1 file
Amazon SQSåŽã§ã確èªã
$ cd ../sqs $ terraform init
çµæã¯åãã§ããã
$ tree .terraform .terraform âââ providers âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.36.0 âââ linux_amd64 -> $HOME/.terraform.d/plugin-cache/registry.terraform.io/hashicorp/aws/5.36.0/linux_amd64 6 directories, 0 files $ du -sh .terraform 28K .terraform
ããã§Providerãåãã£ã¬ã¯ããªã§ããŠã³ããŒãããã«æžãããã«ãªããŸããã
.terraformrc
ãã¡ã€ã«ã§ãè©ŠããŠã¿ãŸãããã
1床ãã£ã¬ã¯ããªãåé€ã
$ cd .. $ rm -rf s3/.terraform sqs/.terraform
ç°å¢å€æ°TF_PLUGIN_CACHE_DIR
ãåé€ã
$ unset TF_PLUGIN_CACHE_DIR
ããã¥ã¡ã³ãã®ãšããã以äžã®ãã¡ã€ã«ãäœæã
$HOME/.terraformrc
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"
確èªã
## S3 $ cd s3 $ terraform init ## SQS $ cd ../sqs $ terraform init
terraform init
æã®æ§åã¯å
ã»ã©ãšåãã§ããããã§ã«ããŠã³ããŒãæžã¿ãªã®ã§ãããªè¡šç€ºã«ãªããŸãã
Initializing provider plugins... - Reusing previous version of hashicorp/aws from the dependency lock file - Using hashicorp/aws v5.36.0 from the shared cache directory
.terraform
ãã£ã¬ã¯ããªå
ãã·ã³ããªãã¯ãªã³ã¯ã«ãªã£ãŠããã®ãåãã§ããã
$ tree .terraform .terraform âââ providers âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.36.0 âââ linux_amd64 -> $HOME/.terraform.d/plugin-cache/registry.terraform.io/hashicorp/aws/5.36.0/linux_amd64 6 directories, 0 files
è¯ãããã§ãã
ããå°ãè©ŠããŠã¿ã
ãããŸã§ã§ããããããšã¯ç¢ºèªã§ããŸããããããå°ãèžã¿èŸŒãã§ã¿ãŸãããã
䜿çšããProviderã®ããŒãžã§ã³ãå€æŽãã
ä»åã¯2ã€ã®ã«ãŒãã¢ãžã¥ãŒã«ã§åãããŒãžã§ã³ã®AWS Providerã䜿çšããŸããããããŒãžã§ã³ãæã£ãŠããªããŠã倧äžå€«ãã©ãã
確èªããŠãããŸãã
Amazon SQSã®æ¹ã¯ãAWS Provider 5.35.0ã䜿ãããšã«ããŸããã
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.35.0" } } }
Amazon S3ã®æ¹ã¯5.36.0ã§ãã
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.36.0" } } }
1床.terraform
ã¯åé€ã
$ cd .. $ rm -rf s3/.terraform sqs/.terraform
確èªããŸãã
## S3 $ cd s3 $ terraform init ## SQS $ cd ../sqs $ terraform init -upgrade
Amazon SQSã®æ¹ã¯ã.terraform.lock.hcl
ãæ®ãããŸãŸã ã£ãã®ã§-upgrade
ãªãã·ã§ã³ãä»ããŠããŸãâŠã
terraform init
æã®Providerã®ããŠã³ããŒãã®æ§åã§ããAmazon SQSã®æ¹ã¯5.35.0ãªã®ã§ãæ°ããããŠã³ããŒããããŠããŸãã
## S3 Initializing provider plugins... - Reusing previous version of hashicorp/aws from the dependency lock file - Using hashicorp/aws v5.36.0 from the shared cache directory ## SQS Initializing provider plugins... - Finding hashicorp/aws versions matching "5.35.0"... - Installing hashicorp/aws v5.35.0... - Installed hashicorp/aws v5.35.0 (signed by HashiCorp)
ãã£ãã·ã¥ãã£ã¬ã¯ããªäžã¯ããããªããŸããã
$ tree $HOME/.terraform.d/plugin-cache $HOME/.terraform.d/plugin-cache âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.35.0 â  âââ linux_amd64 â  âââ terraform-provider-aws_v5.35.0_x5 âââ 5.36.0 âââ linux_amd64 âââ terraform-provider-aws_v5.36.0_x5 7 directories, 2 files
ã¡ãããšããããã®ããŒãžã§ã³ã䜿ã£ãŠããããã§ãã
ã¢ãžã¥ãŒã«ã¯ã©ããªãã®ãïŒ
ç¹ã«ããã¥ã¡ã³ãã«ã¯æžãããŠããŸããããã¢ãžã¥ãŒã«ã«ã€ããŠã¯ã©ããªãã®ã§ããããïŒ
ãã¡ããè©ŠããŠã¿ãŸãããã
ãé¡ã¯terraform-aws-modules/s3-bucketã«ããŸãã
terraform-aws-modules/s3-bucket
ã¢ãžã¥ãŒã«çšã®ãã£ã¬ã¯ããªãäœæã
$ mkdir s3_1 s3_2
Provider Plugin Cacheã®èšå®ã¯ã$HOME/.terraformrc
ãã¡ã€ã«ã§è¡ã£ãŠãããã®ãšããŸãã
$HOME/.terraformrc
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"
ä»åã¯å²ãšå®çŸ©ã¯ãªãã§ãããã®ã§ãversion
ãåºå®ãã以å€ã¯ã¢ãžã¥ãŒã«ã®ãµã³ãã«ããã®ãŸãŸäœ¿ããŸããã
ã€ãŸãããããªæãã§ãã
s3_1/main.tf
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.36.0" } } } provider "aws" { access_key = "mock_access_key" region = "us-east-1" s3_use_path_style = true secret_key = "mock_secret_key" skip_credentials_validation = true skip_metadata_api_check = true skip_requesting_account_id = true endpoints { apigateway = "http://localhost:4566" cloudformation = "http://localhost:4566" cloudwatch = "http://localhost:4566" dynamodb = "http://localhost:4566" es = "http://localhost:4566" firehose = "http://localhost:4566" iam = "http://localhost:4566" kinesis = "http://localhost:4566" lambda = "http://localhost:4566" route53 = "http://localhost:4566" redshift = "http://localhost:4566" s3 = "http://localhost:4566" secretsmanager = "http://localhost:4566" ses = "http://localhost:4566" sns = "http://localhost:4566" sqs = "http://localhost:4566" ssm = "http://localhost:4566" stepfunctions = "http://localhost:4566" sts = "http://localhost:4566" } } module "s3_bucket" { source = "terraform-aws-modules/s3-bucket/aws" version = "4.1.0" bucket = "my-s3-bucket-1" acl = "private" control_object_ownership = true object_ownership = "ObjectWriter" versioning = { enabled = true } }
s3_2/main.tf
terraform { required_version = "1.7.3" required_providers { aws = { source = "hashicorp/aws" version = "5.36.0" } } } provider "aws" { access_key = "mock_access_key" region = "us-east-1" s3_use_path_style = true secret_key = "mock_secret_key" skip_credentials_validation = true skip_metadata_api_check = true skip_requesting_account_id = true endpoints { apigateway = "http://localhost:4566" cloudformation = "http://localhost:4566" cloudwatch = "http://localhost:4566" dynamodb = "http://localhost:4566" es = "http://localhost:4566" firehose = "http://localhost:4566" iam = "http://localhost:4566" kinesis = "http://localhost:4566" lambda = "http://localhost:4566" route53 = "http://localhost:4566" redshift = "http://localhost:4566" s3 = "http://localhost:4566" secretsmanager = "http://localhost:4566" ses = "http://localhost:4566" sns = "http://localhost:4566" sqs = "http://localhost:4566" ssm = "http://localhost:4566" stepfunctions = "http://localhost:4566" sts = "http://localhost:4566" } } module "s3_bucket" { source = "terraform-aws-modules/s3-bucket/aws" version = "4.1.0" bucket = "my-s3-bucket-2" acl = "private" control_object_ownership = true object_ownership = "ObjectWriter" versioning = { enabled = true } }
ã»ãŒåãå 容ã§ãããç³ãèš³çšåºŠã«ãã±ããåã ãå€ããŠãããŸãâŠã
ã§ã¯ãåã¢ãžã¥ãŒã«å
ã§terraform init
ããŠãã£ãŠã¿ãŸãã
## ã²ãšã€ç® $ cd s3_1 $ terraform init ## 2ã€ç® $ cd ../s3_2 $ terraform init
terraform init
æã®ã¢ãžã¥ãŒã«ããã³Providerã®åæåãã°ã¯ãããªããŸããã
Initializing modules... Downloading registry.terraform.io/terraform-aws-modules/s3-bucket/aws 4.1.0 for s3_bucket... - s3_bucket in .terraform/modules/s3_bucket Initializing provider plugins... - Finding hashicorp/aws versions matching ">= 5.27.0, 5.36.0"... - Installing hashicorp/aws v5.36.0... - Installed hashicorp/aws v5.36.0 (signed by HashiCorp)
ãµã€ãºãèŠãŠã¿ãŸãã
$ cd .. $ du -sh s3_1/.terraform s3_2/.terraform 1.1M s3_1/.terraform 1.1M s3_2/.terraform
å°ãªãã§ãããå ã»ã©ã®Providerã®ã¿ããã£ã·ã¥ããæããã¯å€ãã§ãã
ã©ããªã£ãŠããããšãããšãã¢ãžã¥ãŒã«ã¯å.terraform
ãã£ã¬ã¯ããªå
ã«ããŠã³ããŒããããããã§ãã
$ tree s3_1/.terraform s3_1/.terraform âââ modules â  âââ modules.json â  âââ s3_bucket â  âââ CHANGELOG.md â  âââ LICENSE â  âââ README.md â  âââ UPGRADE-3.0.md â  âââ examples â  â  âââ complete â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ complete-legacy â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ notification â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ object â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ s3-analytics â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ s3-inventory â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ s3-replication â  â  âââ README.md â  â  âââ iam.tf â  â  âââ main.tf â  â  âââ outputs.tf â  â  âââ variables.tf â  â  âââ versions.tf â  âââ main.tf â  âââ modules â  â  âââ notification â  â  â  âââ README.md â  â  â  âââ main.tf â  â  â  âââ outputs.tf â  â  â  âââ variables.tf â  â  â  âââ versions.tf â  â  âââ object â  â  âââ README.md â  â  âââ main.tf â  â  âââ outputs.tf â  â  âââ variables.tf â  â  âââ versions.tf â  âââ outputs.tf â  âââ variables.tf â  âââ versions.tf â  âââ wrappers â  âââ README.md â  âââ main.tf â  âââ notification â  â  âââ README.md â  â  âââ main.tf â  â  âââ outputs.tf â  â  âââ variables.tf â  â  âââ versions.tf â  âââ object â  â  âââ README.md â  â  âââ main.tf â  â  âââ outputs.tf â  â  âââ variables.tf â  â  âââ versions.tf â  âââ outputs.tf â  âââ variables.tf â  âââ versions.tf âââ providers âââ registry.terraform.io âââ hashicorp âââ aws âââ 5.36.0 âââ linux_amd64 -> $HOME/.terraform.d/plugin-cache/registry.terraform.io/hashicorp/aws/5.36.0/linux_amd64 22 directories, 70 files
ã¢ãžã¥ãŒã«ã¯ãã£ãã·ã¥å¯Ÿè±¡ã«ãªããªããšããããšã§ããã
ãŸãããããŸã§Providerã®ãã£ãã·ã¥ã®ãããªã®ã§ãã®ç¹ã¯ä»æ¹ãªãããªãšâŠã
issueããããŸãããããã£ã±ãã§ããªãã¿ããã§ããã
Feature Request: Module cache dir à la plugins · Issue #16268 · hashicorp/terraform · GitHub
ãããã«
Terraformã®Provider Plugin Cacheãè©ŠããŠã¿ãŸããã
Providerã¯ããããã®ãµã€ãºã«ãªãã®ã§ãåãã£ã¬ã¯ããªã§ããŠã³ããŒãããã®ã§ã¯ãªããããã£ãŠãã£ãã·ã¥ã§ãããšäŸ¿å©ã§ãããã
ãšããããæ°ã¥ããªãéã«åãã£ã¬ã¯ããªå
ã«.terraform
ãã£ã¬ã¯ããªãæ£ãã°ã£ãŠããç¶æ
ã ãšåèšã§ããããµã€ãºã«ãªã£ãŠ
å°ã£ããããŠããã®ã§ãã¡ãããšãã£ãã·ã¥ããŸããããšããæãã§ããã
èŠããŠãããŸãããã