aman chhabra
aman chhabra

Reputation: 47

How to import helm resources using terarform

Can anyone help me in importing the below helm resources using terraform inside tf state file?

helm ls
NAME    NAMESPACE   REVISION    UPDATED                 STATUS  CHART       APP VERSION
portworx    default     1       2022-08-25 06:01:24.991655337 +0000 UTC deployed    portworx-1.0.32 2.9.1.4

I tried by running terraform import helm_release.px default/portworx -lock=false but getting below error:

terraform import helm_release.px default/portworx  -lock=false
The import command expects two arguments.
Usage: terraform [global options] import [options] ADDR ID

  Import existing infrastructure into your Terraform state.

  This will find and import the specified resource into your Terraform
  state, allowing existing infrastructure to come under Terraform
  management without having to be initially created by Terrafor

Upvotes: 2

Views: 3360

Answers (1)

Leslie Alldridge
Leslie Alldridge

Reputation: 1583

Based on https://www.terraform.io/cli/commands/import you need to do your -lock=false option first instead of last

terraform import -lock=false helm_release.px default/portworx

Upvotes: 2

Related Questions