Git Product home page Git Product logo

terraform-aws-s3-instance-profile's Introduction

This terraform module helps if your ec2 instanc needs to access S3 buckets without pushing in IAM user credentials. This module outputs the name of an IAM instance profile giving access to S3 and you attach it with one line in the aws_instance resource definition.

iam role giving s3 bucket access to ec2 instances

The profile name output of this module is fed to the iam_instance_profile parameter when creating an ec2 instance via the aws_instance resource.

Usage

module s3-instance-profile
{
    source = "github.com/devops4me/terraform-aws-s3-instance-profile"
}

After declaring this Terraform module you use its output within the aws_instance resource block.

resource aws_instance ec2-s3-instance
{

    iam_instance_profile = "${ module.s3-instance-profile.out_profile_name }"

}

Verification

To verify that your instance has access to S3 you

  • login to the instance
  • list all buckets
  • create a new bucket
  • add content to the bucket
  • read that content
  • delete the content
  • delete the bucket

See the integration test of this module for a demonstration of the above using the aws command line interface.

terraform-aws-s3-instance-profile's People

Contributors

apolloakora avatar devops4me avatar

Stargazers

Austin Songer,MIS,CEH,ESCA,Project+ (Navy Veteran) avatar

Watchers

James Cloos 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.