By mikebywater
Has anyone figured out how to configure terraform remote state to work with spaces by using its s3 driver. I have got other things that use s3 to work with spaces but have failed with terraform so far
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Does it support state file locking? AWS supports locking using dynamodb table.
A future release of terraform should support using other s3 compatible backends like Spaces but none of the currently available versions(v0.10.7 is the current latest) will work.
I was able to configure terraform to store remote state in Spaces by building terraform from source and using the config
terraform {
backend "s3" {
bucket = "tfstate-bucket"
key = "path/terraform.tfstate"
region = "us-east-1"
endpoint = "https://nyc3.digitaloceanspaces.com"
access_key = "redacted"
secret_key = "redacted"
skip_credentials_validation = true
skip_get_ec2_platforms = true
skip_requesting_account_id = true
skip_metadata_api_check = true
}
}
Note the region key is set to a known s3 region. Attempting to use an unknown region still causes terraform to complain
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.