Skip to content

Instantly share code, notes, and snippets.

View miguelaferreira's full-sized avatar

Miguel Ferreira miguelaferreira

View GitHub Profile
@miguelaferreira
miguelaferreira / gist:5658e9a79f0ccda4c2c00ad96d9b060b
Last active May 4, 2020 11:22
Troubleshoot terraform datadog provider aws integration
$ TF_LOG=debug tf apply -auto-approve
2020/05/04 11:59:00 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/05/04 11:59:00 [INFO] Terraform version: 0.12.24
2020/05/04 11:59:00 [INFO] Go runtime version: go1.12.13
2020/05/04 11:59:00 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "-auto-approve"}
2020/05/04 11:59:00 [DEBUG] Attempting to open CLI config file: /Users/miguel/.terraformrc
2020/05/04 11:59:00 Loading CLI configuration from /Users/miguel/.terraformrc
2020/05/04 11:59:00 [INFO] CLI command args: []string{"apply", "-auto-approve"}
@miguelaferreira
miguelaferreira / troubleshoot-issue-18.md
Last active July 31, 2019 08:49
Troubleshooting Issue #18 of terraform-aws-vpn-gateway

Troubleshooting issue #18

To reproduce issue with terraform v0.11.14 and module version v1.6.1:

git checkout v1.6.1
cd examples/complete-vpn-gateway-with-static-routes

# Edit main.tf and set version on the vpc module to 1.67.0 (terraform-0.11 compatible)

#############################
@miguelaferreira
miguelaferreira / gist:9397dce94aa9c0f8deb79d9833917c34
Last active January 8, 2019 10:44
Terraform debug output for datadog provider ignoring request type field
2019/01/08 11:43:58 [INFO] Terraform version: 0.11.11
2019/01/08 11:43:58 [INFO] Go runtime version: go1.11.4
2019/01/08 11:43:58 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.11/bin/terraform", "plan", "-var-file", "overrides.tfvars"}
2019/01/08 11:43:58 [DEBUG] Attempting to open CLI config file: /Users/miguel/.terraformrc
2019/01/08 11:43:58 Loading CLI configuration from /Users/miguel/.terraformrc
2019/01/08 11:43:58 [INFO] CLI command args: []string{"plan", "-var-file", "overrides.tfvars"}
2019/01/08 11:43:58 [INFO] command: empty terraform config, returning nil
2019/01/08 11:43:58 [DEBUG] command: no data state file found for backend config
2019/01/08 11:43:58 [DEBUG] New state was assigned lineage "850e2615-37ce-2875-48d8-978311d69924"
2019/01/08 11:43:58 [INFO] command: backend initialized: <nil>
@miguelaferreira
miguelaferreira / datadog-alert.xml
Created July 2, 2018 12:40
NLO Gateway Alert Configuration
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="woman">NLO Gateway Alert from DataDog</Say>
</Response>
@miguelaferreira
miguelaferreira / gist:a7aee93c44b2c5ccf6286b9c8aed8ac4
Created November 15, 2017 10:10
terraform bug using consul module
This file has been truncated, but you can view the full file.
terraform plan -out terraform.tfplan -var-file secrets.tfvars
2017/11/15 11:02:28 [INFO] Terraform version: 0.10.8
2017/11/15 11:02:28 [INFO] Go runtime version: go1.9.1
2017/11/15 11:02:28 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.10.8/bin/terraform", "plan", "-out", "terraform.tfplan", "-var-file", "secrets.tfvars"}
2017/11/15 11:02:28 [DEBUG] Attempting to open CLI config file: /Users/miguel/.terraformrc
2017/11/15 11:02:28 Loading CLI configuration from /Users/miguel/.terraformrc
2017/11/15 11:02:28 [DEBUG] CLI config is &main.Config{Providers:map[string]string{}, Provisioners:map[string]string{"ansible":"/usr/local/bin/terraform-provisioner-ansible"}, DisableCheckpoint:false, DisableCheckpointSignature:false, PluginCacheDir:"", Credentials:map[string]map[string]interface {}(nil), CredentialsHelpers:map[string]*main.ConfigCredentialsHelper(nil)}
2017/11/15 11:02:28 [INFO] CLI command args: []string{"plan", "-out", "terraform.tfplan", "-var-file", "secrets.tfvars"}
2017/11/15 11:02:28 [TRA
@miguelaferreira
miguelaferreira / gist:ae711575e5eacdeb8792c59a154f23d4
Created July 17, 2017 14:28
terraform-providers/terraform-provider-mysql Issue #9
2017/07/17 16:28:00 [INFO] Terraform version: 0.9.8
2017/07/17 16:28:00 [INFO] Go runtime version: go1.8.3
2017/07/17 16:28:00 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.8/bin/terraform", "plan"}
2017/07/17 16:28:00 [DEBUG] Detected home directory from env var: /Users/miguel
2017/07/17 16:28:00 [DEBUG] Detected home directory from env var: /Users/miguel
2017/07/17 16:28:00 [DEBUG] Attempting to open CLI config file: /Users/miguel/.terraformrc
2017/07/17 16:28:00 [DEBUG] Detected home directory from env var: /Users/miguel
2017/07/17 16:28:00 [INFO] CLI command args: []string{"plan"}
2017/07/17 16:28:00 [DEBUG] command: loading backend config file: /Users/miguel/tmp/terraform
2017/07/17 16:28:00 [DEBUG] command: no data state file found for backend config
### Keybase proof
I hereby claim:
* I am miguelaferreira on github.
* I am miguelferreira (https://keybase.io/miguelferreira) on keybase.
* I have a public key ASBpNr8jHKTjMRvvNoG_qaZ_SPGaivKwTPabq1OaVPwZQgo
To claim this, I am signing this object:
@miguelaferreira
miguelaferreira / gist:74a1e21e17c76d7d21ed
Created August 5, 2015 11:59
Have deployDataCenter.py create Nicira devices and enable plugin
commit 5c67de19bf9e6544585cb2015cb40130b3f32b0d
Author: Miguel Ferreira <miguelferreira@me.com>
Date: Tue Aug 4 16:45:35 2015 +0200
Configure a NiciraNvp device while deploying a datacenter
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index 4fcd696..73f0e31 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@miguelaferreira
miguelaferreira / NfsUtilsTest
Created February 10, 2014 13:19
Test for NfsUtils.url2Mount(String strUrl)
public class NfsUtilsTest {
@Test(expected = NullPointerException.class)
public void testUrl2MountWithExpectedWhenStringIsNull() throws Exception {
String urlStr = null;
NfsUtils.url2Mount(urlStr);
}
@Test