From dfdcef18faf26d44717555a63654bddaaebe9cfa Mon Sep 17 00:00:00 2001 From: There Is No TIme <37583483+thereisnotime@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:53:40 +0300 Subject: [PATCH] add state push --- terraform/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/terraform/Makefile b/terraform/Makefile index cb8e18c..f9a8196 100644 --- a/terraform/Makefile +++ b/terraform/Makefile @@ -15,7 +15,7 @@ endif # Define live updates MAKE_REPOSITORY := https://raw.githubusercontent.com/thereisnotime/xxMake/master/terraform/Makefile -MAKE_VERSION := 1.54 +MAKE_VERSION := 1.55 # Define variables TF_MORE_ARGS := -compact-warnings @@ -53,6 +53,7 @@ help: @echo " $(COLOR_YELLOW)megalint$(COLOR_DEFAULT) Run Mega Linter on the whole repo (SLOW)" @echo " $(COLOR_YELLOW)info$(COLOR_DEFAULT) Shows providers, output, state and more" @echo " $(COLOR_YELLOW)statepull$(COLOR_DEFAULT) Prints the current tfstate even if it is remote" + @echo " $(COLOR_YELLOW)statepush$(COLOR_DEFAULT) Does terraform state push from a local file to the remote backend" @echo " $(COLOR_YELLOW)tfk8s$(COLOR_DEFAULT) Converts K8s yaml 'input.yaml' to Terraform resource 'converted.tf'" @echo " $(COLOR_YELLOW)req$(COLOR_DEFAULT) Checks local dependency requirements" @echo " $(COLOR_YELLOW)rmstate$(COLOR_DEFAULT) Deletes the remote state. Use with caution!" @@ -196,6 +197,11 @@ statepull: @echo "$(COLOR_GREEN)Pulling Terraform state...$(COLOR_DEFAULT)" terraform state pull +.PHONY: statepush +statepush: + @echo "$(COLOR_GREEN)Pushing Terraform state...$(COLOR_DEFAULT)" + terraform state push + .PHONY: import import: @echo "$(COLOR_GREEN)Importing...$(COLOR_DEFAULT)"