Skip to content

nf import

Import existing infrastructure into a synthesized legacy Terraform/OpenTofu stack.

Using hybrid execution (the default)? Do not use nf import. Hybrid apps import existing objects as reviewed import actions inside nf plan and nf apply using .import_from(...), LifecycleRules(adopt=...), or --adopt-from manifest.json. See How to Import (Adopt) Existing Resources.

Synopsis

nf import [OPTIONS] [TERRAFORM_ARGS]...

Main use

Pass terraform import / tofu import through to a synthesized stack directory under .nf.out/ when running the legacy compatibility workflow. The exact import address and ID format depend on the provider and resource type.

nf import --stack .nf.out/platform/network aws_vpc.vpc vpc-1234567890abcdef0

Options

  • --stack, -s TEXT: synthesized legacy stack selector or directory path
  • --legacy-bin TEXT: path to the Terraform/OpenTofu binary
  • --outdir PATH: synthesized output directory override