This repository shows how to use terraform AWS's S3 provider with Outscale Object Storage (OOS).
Beeing able to use a non-AWS S3 service with official AWS S3 provider is still work in progress so we will need to use a patched version of official AWS provider.
Because some features are not supported by OOS or are very specific to AWS services, official terraform-provider-aws has been adapted by Outscale and other contributors.
This allow us to disable non-supported features (mostly in provider
and bucket
blocks) while keeping the module AWS-compatible. You can get this patched terraform-provider-aws version by either building it locally or getting a pre-built module.
To ease the process, you can automatically fetch, build and install patched terraform-provider-aws module:
- You will need git, golang and make installed.
- Run
PLATFORM=linux_amd64 make install
(setdarwin_amd64
for OSX users).
Alternatively, you can get a pre-compiled module for your platform.
Only linux_amd64
and darwin_amd64
platforms are available for now.
- You will need make installed.
- Run
PLATFORM=linux_amd64 make install-prebuilt
Once installed, you should see a similar file structure in your home directory:
cd ~
tree .terraform.d/
.terraform.d/
└── plugins
└── registry.terraform.io
└── hashicorp
└── aws
└── 3.34.99
└── linux_amd64
└── terraform-provider-aws_v3.34.99
You will need to setup your credentials and region details through environement variables:
export TF_VAR_access_key="myAccessKey"
export TF_VAR_secret_key="mySecretKey"
export TF_VAR_region="eu-west-2"
export TF_VAR_endpoint="https://oos.eu-west-2.outscale.com"
Alternatively, you can write those details in examples/terraform.tfvars
(don't forget to uncomment).
Once the provider built and your credentials filled, you should be able to run examples. Make sur you have at least terraform >= 0.13.
cd examples
terraform init
terraform plan
terraform apply
terraform destroy
Want to add more examples? Have a question? Feel free to open an issue.
Copyright Outscale SAS
BSD-3-Clause
This project is compliant with REUSE.