I am deploying a kube cluster using kops/terraform. My Kube's state store in in S3. However I also want to save my the terraform state file to be in S3:\bucket\something.tf instead of a local filesystem from where I deploy the kube.
Asked
Active
Viewed 142 times
1 Answers
0
If you use Kops with terraform, the result is the usual terraform definition. Simply your own in the same folder to modify/augment what kops generated. To achieve what you need a section like
terraform {
backend "s3" {
bucket = "mybucket"
key = "path/to/my/key"
region = "us-east-1"
}
}
should be enough. For reference : https://www.terraform.io/docs/backends/types/s3.html
![](../../users/profiles/450398.webp)
Radek 'Goblin' Pieczonka
- 381
- 1
- 6