So - the basics. First my script assumes that you already have the AWS CLI tool configured and ready to go. That would mean you have an .aws directory, with at least a config and credentials file:
[default]
aws_access_key_id = ANACCESSKEYIDGOESHERE
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "sqs:GetQueueAttributes", | |
| "sqs:ListQueues", | |
| "sqs:ReceiveMessage", | |
| "sqs:GetQueueUrl", |
| sudo su - | |
| cd /var/db | |
| mv ConfigurationProfiles ConfigurationProfilesOLD | |
| /usr/local/bin/jamf removeFramework | |
| reboot |
| // This Terraform code will fail. Aside from the obvious (no provider information, etc)... | |
| // Please explain why this would fail, and what you can do to fix it? | |
| // Policy template to be applied to our S3 bucket. | |
| data "template_file" "policy" { | |
| template = file("${path.module}/policy.tpl") | |
| vars = { | |
| bucket_name = aws_s3_bucket.bucket.id |
| version: '2' | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy:latest | |
| container_name: nginx-proxy | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock:ro | |
| ports: | |
| - 80:80 | |
| restart: always |
I hereby claim:
To claim this, I am signing this object:
| {"service": {"name": "web", "tags": ["rails"], "port": 80, | |
| "check": {"args": ["curl", "localhost"], "interval": "10s"}}} |
| {"check": {"name": "ping", | |
| "args": ["ping", "-c1", "google.com"], "interval": "30s"}} |
| { | |
| "server": true, | |
| "datacenter": "dc01", | |
| "bootstrap_expect": 3, | |
| "data_dir": "/var/consul", | |
| "encrypt": "oUnNCn3ylbbFy0FP9QQLYg==", | |
| "log_level": "INFO", | |
| "retry_join": ["provider=aws tag_key=\"Consul Cluster\" tag_value=dc01"], | |
| "leave_on_terminate": true, | |
| "enable_script_checks": true, |
| #!/bin/bash | |
| # | |
| # consul Manage the consul agent | |
| # | |
| # chkconfig: 2345 95 85 | |
| # description: Consul is a tool for service discovery and configuration | |
| # processname: consul | |
| # config: /etc/consul.d | |
| # pidfile: /var/run/consul.pid |