-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example infrastructure to test with #1
Conversation
|
@jordansissel 0ccc3e2 should have addressed that. Could you double check? |
|
@jordansissel if the bucket was created pre 0ccc3e2 then hashicorp/terraform-provider-aws#208 should fix it. TL;DR If this doesn't work then it seems it's another bug. We can bypass that by adding a helper calling |
👍 I'll move forward testing. |
cp terraform.tfvars.example terraform.tfvars
s3_bucket
must be unique (s3 has a global namespace)terraform init
will fetch the AWS and template terraform providers as well as theinfra/
moduleterraform apply
will create a graph diff of the resources on Cloud vs the ones kept in your local terraform stateterraform destroy
to tear down your test infra.This PR enables you to create the necessary resources to test this plugin.
It creates a VPC with proper networking to land in an ELB and an EC2 instance behind it running nginx. It also creates an S3 bucket where logs from ELB are shipped. An SQS queue is also created and notifications from logs arriving to S3 are pushed to that queue.
SSH pub keys are fetched from your
github_handle
and provisioned in the EC2 instance under the usercore
.On
terraform apply
orterraform show
you get the public ip of the EC2 instance if you want to perhaps run logstash from, or edit/debug nginx. You also get the public DNS of the ELB endpoint.Throw some traffic at the ELB to generate ELB logs.
P.S. it goes without saying that this is not a setup one would ever use in prod, but should serve the purpose of easily spinning and tearing down a full blown AWS environment for your tests.