At Gruntwork, we work with multiple software teams. That means we have to modify the "Switch Role" history multiple times. But the only way to do that today is to delete your cookie and clear all AWS Console saved settings. That got old after a while, so these instructions enable you to modify the "Switch Roles" configuration directly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in your Chrome WebDev Tools console | |
// Based on https://stackoverflow.com/questions/20836911/images-not-displayed-for-gmail#comment114947075_20837071 | |
(function(){ while(img = document.evaluate('//img[contains(@src, \'googleusercontent.com\')][contains(@src, \'#\')]', document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue){ var src = img.attributes.src.value; src = src.substr(src.indexOf('#')+1); img.attributes.src.value = src; } })(); | |
// NOTE: I have NOT validated this gist as pasted above, though I have validated it manually (or some variant of it before) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== RUN TestOsHardeningXFS | |
TestOsHardeningXFS 2018-11-21T06:02:13Z region.go:72: Looking up all AWS regions available in this account | |
TestOsHardeningXFS 2018-11-21T06:02:15Z region.go:57: Using region ap-northeast-2 | |
TestOsHardeningXFS 2018-11-21T06:02:15Z key_pair.go:31: Generating new public/private key of size 2048 | |
TestOsHardeningXFS 2018-11-21T06:02:20Z keypair.go:49: Creating new Key Pair in EC2 region ap-northeast-2 named AAsSgo | |
TestOsHardeningXFS 2018-11-21T06:03:08Z command.go:52: Running command ./packer-build.sh with args [-var ami_module_security_version_type="branch" -var vpc_id="vpc-32e3025b" -var should_create_keypair="0" -var aws_region="ap-northeast-2" -var ami_builder_source_ami="ami-0076ae0908f382581" -var ami_builder_source_ami_ssh_username="ec2-user" -var ami_ebs_volume_size="25" -var ami_github_oauth_token="<REDACTED>" -var ami_partition_fs_type="xfs" -var ami_module_security_version="master" -var ami_builder_keypair_private_key="-----BEGIN RSA PRIVATE KEY-----\nREDACTED\n-----END RSA PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user_data = <<-EOF | |
#!/bin/bash | |
echo "hello world" > index.html | |
nohup busybox httpd -f -p "8080" & | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file should be at /confluent/main.tf | |
variable "kafka_cluster_deployment_done" {} | |
module "confluent_tools" { | |
source = "../server-group/" | |
rolling_deployment_done = "${var.kafka_cluster_deployment_done}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file would need to be in its own folder like /tf-bar/main.tf | |
variable "bar" { | |
default = "foo" | |
} | |
resource "null_resource" "bar" { | |
triggers { | |
bar = "${var.bar}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
josh@pad-mac ~/g/s/g/g/p/t/tf-modules (kafka-status-check)> terraform apply | |
2018/05/31 13:24:29 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161 | |
2018/05/31 13:24:29 [INFO] Go runtime version: go1.10.1 | |
2018/05/31 13:24:29 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"} | |
2018/05/31 13:24:29 [DEBUG] Attempting to open CLI config file: /Users/josh/.terraformrc | |
2018/05/31 13:24:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2018/05/31 13:24:29 [INFO] CLI command args: []string{"apply"} | |
2018/05/31 13:24:29 [TRACE] module source: "../tf-foo" | |
2018/05/31 13:24:29 [TRACE] module source: "../tf-bar" | |
2018/05/31 13:24:29 [INFO] command: empty terraform config, returning nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kafka-standalone-ubuntu 2018/03/30 11:35:29 Error: Error applying plan: | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 2 error(s) occurred: | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 * module.zookeeper.module.zookeeper_servers.aws_launch_configuration.server_group: aws_launch_configuration.server_group: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue. | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 Please include the following information in your report: | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 Terraform Version: 0.11.5 | |
kafka-standalone-ubuntu 2018/03/30 11:35:29 Resource ID: aws_launch_configuration.server_group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2018-02-04 23:26:47,636] DEBUG Selector loop woken up from select, 1/3 selected (org.eclipse.jetty.io.SelectorManager:603) | |
[2018-02-04 23:26:47,637] DEBUG Queued change org.eclipse.jetty.io.SelectorManager$ManagedSelector$Accept@3b32c022 (org.eclipse.jetty.io.SelectorManager:481) | |
[2018-02-04 23:26:47,637] DEBUG Running change org.eclipse.jetty.io.SelectorManager$ManagedSelector$Accept@3b32c022 (org.eclipse.jetty.io.SelectorManager:526) | |
[2018-02-04 23:26:47,637] DEBUG onOpen NetworkTrafficSelectChannelEndPoint@3711c20b{/127.0.0.1:53908<->8081,Open,in,out,-,-,0/30000,null}{io=0,kio=0,kro=0} (org.eclipse.jetty.io.AbstractEndPoint:99) | |
[2018-02-04 23:26:47,637] DEBUG NetworkTrafficSelectChannelEndPoint@3711c20b{/127.0.0.1:53908<->8081,Open,in,out,-,-,0/30000,null}{io=0,kio=0,kro=0} idle timeout check, elapsed: 0 ms, remaining: 30000 ms (org.eclipse.jetty.io.IdleTimeout:151) | |
[2018-02-04 23:26:47,638] DEBUG new HttpChannelOverHttp@61c8edba{r=0,c=false,a=IDLE,uri=} -> NetworkTrafficSelectChannelEndPoint@3711c20b{/12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Make sure obtain an API Token | |
# 2. This has only been validated to work with ZenDesk agents, not end users | |
# 3. Look up the customer's org ID by querying https://gruntwork.zendesk.com/api/v2/organizations.json | |
# 4. Look up the ZenDesk custom Field ID that stores the number of hours used by querying a complete ticket and inspecting the JSON output | |
# 5. This script all automatically sum the total of all numbers in the given month and ignore empty numbers. | |
zendesk_username="josh@gruntwork.io/token" | |
zendesk_password="<enter-your-api-token>" |
NewerOlder