Giter Site home page Giter Site logo

devenes / cloudtrail-terraform-s3 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 644 KB

Automate AWS CloudTrail Deployment for S3 Bucket with Terraform. CloudTrail helps you manage the administration, compliance and operational control of your S3 Bucket.

License: MIT License

HCL 100.00%
aws-cloudtrail cloudtrail s3 s3-backend s3-bucket terraform template json s3-policy

cloudtrail-terraform-s3's Introduction

Terraform Infrastructure Plan Terraform Deployment

Automate AWS CloudTrail Deployment for S3 Bucket with Terraform

trail

AWS CloudTrail

AWS CloudTrail is an AWS service that helps you enable governance, compliance, and operational and risk auditing of your AWS account. Actions taken by a user, role, or an AWS service are recorded as events in CloudTrail. Events include actions taken in the AWS Management Console, AWS Command Line Interface, and AWS SDKs and APIs.

CloudTrail is enabled on your AWS account when you create it. When activity occurs in your AWS account, that activity is recorded in a CloudTrail event. You can easily view recent events in the CloudTrail console by going to Event history.

Visibility into your AWS account activity is a key aspect of security and operational best practices. You can use CloudTrail to view, search, download, archive, analyze, and respond to account activity across your AWS infrastructure. You can identify who or what took which action, what resources were acted upon, when the event occurred, and other details to help you analyze and respond to activity in your AWS account. Optionally, you can enable AWS CloudTrail Insights on a trail to help you identify and respond to unusual activity.

You can integrate CloudTrail into applications using the API, automate trail creation for your organization, check the status of trails you create, and control how users view CloudTrail events.

Resources

Terraform Failed to Render Error

Terraform Failed to Render Error

  • The template argument in the template_file data source is processed as Terraform template syntax.

  • In this syntax, using ${...} has a special meaning, that the ... part will be injected by some var that is passed into the template.

  • Bash also allows this syntax, for getting the values of variables as your intending to use it.

  • To reconcile this, you'll need to escape the $ character so that the terraform template compiler will leave it be, which you can do by doubling up the character: $${i} in all cases.

│ Error: failed to render : <template_file>:20,69-73: Unknown variable; There is no variable named "data".
│
│   with data.template_file.cloudtrail_policy,
│   on cloudtrail.tf line 3, in data "template_file" "cloudtrail_policy":
│    3: data "template_file" "cloudtrail_policy" {

Eval Command

If you use $$ then the shell can only be run in Terraform environment. I recommend to use following command to run the shell in Terraform environment which keeps shell as shell and works with terraform. I am wondering if there is an option to tell terraform not to interpret shell script.

eval "$"{i}

References

Why does Terraform fail to render?

String Literals and String Templates

Strings and Templates

cloudtrail-terraform-s3's People

Contributors

devenes avatar

Watchers

 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.