Coder Social home page Coder Social logo

terraform-oos-examples's Introduction

OOS example using terraform

Project Sandbox

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.

Get patched terraform-provider-aws

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.

Build locally

To ease the process, you can automatically fetch, build and install patched terraform-provider-aws module:

  1. You will need git, golang and make installed.
  2. Run PLATFORM=linux_amd64 make install (set darwin_amd64 for OSX users).

Get pre-built module

Alternatively, you can get a pre-compiled module for your platform. Only linux_amd64and darwin_amd64 platforms are available for now.

  1. You will need make installed.
  2. Run PLATFORM=linux_amd64 make install-prebuilt

Verify you installation

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

Setup your credentials

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).

Run examples

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

Contributing

Want to add more examples? Have a question? Feel free to open an issue.

License

Copyright Outscale SAS

BSD-3-Clause

This project is compliant with REUSE.

terraform-oos-examples's People

Contributors

jerome-jutteau avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.