Code Monkey home page Code Monkey logo

cloud-infrastructures's People

Contributors

thompsizzle avatar

Watchers

 avatar

cloud-infrastructures's Issues

Create S3 bucket example template

Create a terraform template that creates S3 bucket for static website, displays Hello World and outputs the S3 static website URL.

S3_Hello_world aws_s3_object index.html is not uploading to bucket correctly

When the index.html is added as an object to the bucket, the static website does not work when visited. Instead, the file must be replaced via the AWS console and then the site will work. Must be something to do with the upload of the index.html using aws_s3_object. Try replacing source with another argument.

Enable access logs for load balancer

In the EC2_hello_world_ASG template, configure the access_logs block within aws_lb. We will need an S3 bucket to be created and then referenced here.

`resource "aws_lb" "test" {
name = "test-lb-tf"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.lb_sg.id]
subnets = [for subnet in aws_subnet.public : subnet.id]

enable_deletion_protection = true

access_logs {
bucket = aws_s3_bucket.lb_logs.bucket
prefix = "test-lb"
enabled = true
}

tags = {
Environment = "production"
}
}`

Error: Invalid template interpolation value

on output.tf line 2, in output "s3_static_website_endpoint":
2: value = "http://${aws_s3_bucket.bucket_tf.website_endpoint}"
├────────────────
│ aws_s3_bucket.bucket_tf.website_endpoint is null

The expression result is null. Cannot include a null value in a string template.

Move bucket name into variable

Right now, bucket name is hardcoded for the S3_hello_world template. Make this into a variable for users to configure.

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.