Skip to content

Commit

Permalink
add state push
Browse files Browse the repository at this point in the history
  • Loading branch information
thereisnotime authored Sep 27, 2023
1 parent 5287bd2 commit dfdcef1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!"
Expand Down Expand Up @@ -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)"
Expand Down

0 comments on commit dfdcef1

Please sign in to comment.