Git Product home page Git Product logo

cnab_aws_s3_terraform's Introduction

CNAB : Bundle AWS S3 Bucket

The aim of this project is to manage AWS S3 bucket thanks to Terraform with CNAB best practices.

Getting Started

These instructions will get you a copy of the project up and running on your AWS subscription for development and testing purposes.

Prerequisites

What things you need to run this CNAB bundle :

  • Docker must be installed on your computer
  • Duffle must be installed on your computer

Duffle initialization

Start by setting the default confiugration of Duffle by running this command :

$ duffle init

To be able to manage the Terraform plan, the tfstate is automatically backuped in a S3 bucket created by the AWS CLI before the Terraform plan begin.

To do so, Duffle has to be configured with credentials. By default, Duffle creates a default folder at ~/.duffle/credentials.

Copy/ paste the following data to that file : ~/.duffle/credentials/poc.yaml

name: poc
credentials:
  - name: access_key_id
    source:
      env: AWS_ACCESS_KEY
  - name: secret_key_id
    source:
      env: AWS_SECRET_KEY

This allow Duffle to get the AWS cli login from environment variables :

export AWS_ACCESS_KEY=YOUR_AWS_ACCESS_KEY
export AWS_SECRET_KEY=YOUR_AWS_SECRET_KEY

Usage

A good point with CNAB is that you can create, update and destroy all architecture easily with some commands.

Be aware that you need to be in the CNAB directory to be able to run the commands.

Install

To deploy the CNAB bundle on AWS, just run this commands :

$ duffle build
$ duffle install --credentials=poc --parameters=./parameters.toml aws_s3_bucket aws_s3_bucket:0.1.0

If everything run has expected, you should be have a two new AWS S3 bucket, the desired bucket defined in the parameter.toml file and the Terraform backend bucket with the tfstate.

Destroy

To destroy the CNAB bundle on AWS, just run this commands :

$ duffle uninstall --credentials=poc --parameters=./parameters.toml aws_s3_bucket

Author

Member of Wikitops : https://www.wikitops.io/

Licence

This project is licensed under the Apache License, Version 2.0. For the full text of the license, see the LICENSE file.

cnab_aws_s3_terraform's People

Contributors

wikitops avatar

Watchers

 avatar

Forkers

devopstoday11

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.