A more generic S3 provider for Terraform. The objective is to have an independent S3 provider that is compatible with AWS, RGW, GCE, etc.
The installation process assumes a properly installed and configured Go environment.
go get github.com/negronjl/terraform-provider-s3
go install github.com/negronjl/terraform-provider-s3
The provider will be available in $GOPATH/bin
The provider requires some variables to be configured in order to gain access to the S3 compatible server:
s3
provider "s3" {
s3_server = "http://localhost:9000"
s3_region = "custom-region-1"
s3_access_key = "Access Key here"
s3_secret_key = "Secret Key here"
s3_api_signature = "v2"
s3_ssl = false
s3_debug = true
}
s3_bucket
resources represent a bucket in the S3 server. It requires a bucket name to operate:
resource "s3_bucket" "resource_name" {
bucket = "my_bucket_name"
}
s3_file
resources represent a file to be uploaded to the S3 server or downloaded from it. It currently takes the following arguments:
application/octet-stream
resource "s3_file" "resource_name" {
bucket = "my_bucket_name"
name = "my_object_name"
file_path = /tmp/my_file.bin
content_type = "application/octet-stream"
debug = true
}