From a595cba8359ce95732fd7286552ae3ec2c39dbb4 Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Sat, 2 Apr 2022 00:39:35 -0400 Subject: [PATCH] Add support for darwin_arm64 in Makefile & bump deps in examples (#56) --- Makefile | 12 ++---------- example/ssh.tf | 8 ++++---- example/versions.tf | 4 ++-- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index a3e8cfd2..8dde66fd 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,7 @@ ifeq ($(OS),Windows_NT) TERRAFORM_PLUGIN_CACHE_DIRECTORY=$$(cygpath -u "$(shell pwd -P)")/cache/plugins TERRAFORM_PLUGIN_EXTENSION=.exe else - UNAME_S=$$(shell uname -s) - - ifeq ($(UNAME_S),Darwin) - TERRAFORM_PLATFORM=darwin_amd64 - else - TERRAFORM_PLATFORM=linux_amd64 - endif - + TERRAFORM_PLATFORM=$$(terraform -version | awk 'FNR == 2 {print $2}') TERRAFORM_PLUGIN_CACHE_DIRECTORY=$(shell pwd -P)/cache/plugins endif @@ -60,8 +53,7 @@ example-init: && export TF_PLUGIN_CACHE_DIR="$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)" \ && cd ./example \ && rm -f .terraform.lock.hcl \ - && terraform init \ - -verify-plugins=false + && terraform init example-plan: export TF_CLI_CONFIG_FILE="$(shell pwd -P)/example.tfrc" \ diff --git a/example/ssh.tf b/example/ssh.tf index 0ae04558..b390b788 100644 --- a/example/ssh.tf +++ b/example/ssh.tf @@ -1,11 +1,11 @@ -resource "local_file" "example_ssh_private_key" { +resource "local_sensitive_file" "example_ssh_private_key" { filename = "${path.module}/autogenerated/id_rsa" - sensitive_content = tls_private_key.example.private_key_pem + content = tls_private_key.example.private_key_pem } -resource "local_file" "example_ssh_public_key" { +resource "local_sensitive_file" "example_ssh_public_key" { filename = "${path.module}/autogenerated/id_rsa.pub" - sensitive_content = tls_private_key.example.public_key_openssh + content = tls_private_key.example.public_key_openssh } resource "tls_private_key" "example" { diff --git a/example/versions.tf b/example/versions.tf index b504ac02..082d95cf 100644 --- a/example/versions.tf +++ b/example/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { local = { source = "hashicorp/local" - version = "2.0.0" + version = "2.2.2" } proxmox = { source = "bpg/proxmox" @@ -10,7 +10,7 @@ terraform { } tls = { source = "hashicorp/tls" - version = "3.0.0" + version = "3.1.0" } } }