Skip to content

Instantly share code, notes, and snippets.

@chrismarget
chrismarget / gist:5f348e2a4039270f41af2fab3956625b
Created June 14, 2023 19:55
setnested attribute no problem with terraform 1.4.6
2023-06-14T15:53:38.446-0400 [INFO] Terraform version: 1.4.6
2023-06-14T15:53:38.446-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.21.0
2023-06-14T15:53:38.446-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2023-06-14T15:53:38.446-0400 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-06-14T15:53:38.446-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2023-06-14T15:53:38.446-0400 [DEBUG] using github.com/zclconf/go-cty v1.12.1
2023-06-14T15:53:38.446-0400 [INFO] Go runtime version: go1.19.6
2023-06-14T15:53:38.446-0400 [INFO] CLI args: []string{"/Users/cmarget/Downloads/terraform-1.4.6", "plan"}
2023-06-14T15:53:38.446-0400 [TRACE] Stdout is not a terminal
2023-06-14T15:53:38.446-0400 [TRACE] Stderr is not a terminal
@chrismarget
chrismarget / gist:41aa7df14733e94c2c80e9532a8add56
Created June 14, 2023 19:52
setnested attribute problem with terraform 1.5.0
2023-06-14T15:49:53.183-0400 [INFO] Terraform version: 1.5.0
2023-06-14T15:49:53.184-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.26.0
2023-06-14T15:49:53.184-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2023-06-14T15:49:53.184-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2023-06-14T15:49:53.184-0400 [DEBUG] using github.com/zclconf/go-cty v1.12.2
2023-06-14T15:49:53.184-0400 [INFO] Go runtime version: go1.20.5
2023-06-14T15:49:53.184-0400 [INFO] CLI args: []string{"terraform", "plan"}
2023-06-14T15:49:53.184-0400 [TRACE] Stdout is not a terminal
2023-06-14T15:49:53.184-0400 [TRACE] Stderr is not a terminal
2023-06-14T15:49:53.184-0400 [TRACE] Stdin is a terminal
@chrismarget
chrismarget / gist:768be3c2a7aa3c55566890279c7ba5f7
Created December 19, 2022 20:45
terraform technique to get own external IP address -- useful for writing debug-friendly security group rules
data "external" "operator_ip" {
program = ["bash", "-c", "jq -n --arg ip $(curl -s https://checkip.amazonaws.com) '{\"ip\":$ip}'"]
}