infraharvest

command module
v0.0.0-...-25e72f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

README

infraharvest

OpenSSF Scorecard

infraharvest generates Terraform configuration for infrastructure that already exists. It lists your resources, writes an import block for each, and has Terraform (or OpenTofu) generate the configuration with plan -generate-config-out. It then tidies that configuration and checks that it plans with no changes.

  • Clean code, not a dump: references between resources instead of IDs, shared tags as locals, secrets as variables, and clusters of resources as calls of curated modules.
  • Checked, not hoped: a change to the generated code is kept only if the plan still shows no changes, every root goes through a verification gate (format, validate, a plan with no changes, scanners, secrets, determinism), and the report says what was imported, what was left out and why.
  • Read-only: it never applies anything and writes no state; least-privilege permission templates for each cloud.
  • AWS, Azure and Google Cloud, with Terraform or OpenTofu, from the command line, a GitHub Action or an AI agent over MCP.

Terraform's own terraform query and HCP Terraform's Search & Import suit a handful of resources; infraharvest is for whole accounts, subscriptions and projects (see infraharvest and Terraform's own import).

Licensed under AGPL-3.0-only. The documentation is also published at ignatg.github.io/infraharvest.

Documentation

  • Quickstart: list, choose, import and plan, on AWS, Azure or Google Cloud.
  • Install: releases, the container image, the install script, Go.
  • Usage: commands, choosing what to import, services and filters, day-to-day runs, and which options go together.
  • Audit: what in an account no Terraform state or other tool manages, without importing anything.
  • Configuration: the configuration file and the state backend.
  • Output: what each root holds, applying it, how the configuration is tidied, the report and the verification gate.
  • Modules: the curated modules clusters of resources move into, your own modules, and generated local modules.
  • Permissions: read-only access for AWS, Azure and Google Cloud.
  • Troubleshooting: what an error message or exit code means, and what to do.
  • GitHub Action: scheduled imports that open a pull request.
  • AI agents (MCP) · Catalogue · Command-line reference

Install

On Linux and macOS, including AWS CloudShell, Azure Cloud Shell and Google Cloud Shell once cosign is there (Install shows how):

curl -fsSL https://raw.githubusercontent.com/IgnatG/infraharvest/main/install.sh | sh

The script installs the latest release into ~/.local/bin, after checking its cosign signature and its checksum. The other ways are in Install:

  • a release archive for Linux, macOS or Windows, on amd64 or arm64: on Windows, use the zip;
  • the container image ghcr.io/ignatg/infraharvest, with Terraform and OpenTofu included;
  • go install github.com/IgnatG/infraharvest@latest, with Go 1.27 or later;
  • the GitHub Action, in a workflow.

infraharvest needs Terraform 1.5 or later, which it downloads if there is none on PATH, or OpenTofu 1.6 or later with --engine=tofu. It also needs credentials that can read the resources: the permission templates grant read-only access on each cloud. infraharvest version checks the install.

Import

The steps are the same on every cloud:

  1. infraharvest discover <provider> lists the resources into selection.yaml, and opens the picker on it in a terminal. By default it leaves out what the cloud creates itself and what another tool manages, with the reason.
  2. Review selection.yaml: each resource has include: true or false. infraharvest pick --selection selection.yaml opens the picker again.
  3. infraharvest import <provider>, with the same flags and --selection=selection.yaml, writes a root for each account (subscription, project) and region under infrastructure/, and a report in infrastructure/_reports/.

--all in place of --selection imports everything the default selection includes, without a file. See the Quickstart and Usage.

AWS
infraharvest discover aws --profile prod --services=vpc,subnet,sg,s3 --regions=eu-west-2,us-east-1
infraharvest import aws --profile prod --services=vpc,subnet,sg,s3 --regions=eu-west-2,us-east-1 --selection=selection.yaml

For several accounts, add --accounts=111111111111,222222222222 or --organization: each account is reached through the role --assume-role names. See AWS.

Azure
export ARM_SUBSCRIPTION_ID=<subscription ID>
infraharvest discover azure --services=resource_graph --resource-group=web
infraharvest import azure --services=resource_graph --resource-group=web --selection=selection.yaml

Without --resource-group, the import covers the whole subscription. For several, use --subscriptions=<ID>,<ID> or --management-group=<group ID>. See Azure.

Google Cloud
infraharvest discover google --services='*' --projects=my-project --regions=global,europe-west2
infraharvest import google --services='*' --projects=my-project --regions=global,europe-west2 --selection=selection.yaml

--regions is global by default; import global with your regions. For several projects, use --projects=<ID>,<ID>, --organization=<organization ID> or --folders=<folder ID>,<folder ID>. See Google Cloud.

Apply the generated roots

infraharvest writes configuration and no state. Each root holds the generated configuration and imports.tf, with one import block per resource. You don't create or edit a state file first: the first terraform apply writes it.

cd infrastructure/aws/123456789012/eu-west-2
terraform init    # the backend in backend.tf, or local state without one
terraform plan    # imports every resource, changes nothing
terraform apply   # writes the resources into the state, changes nothing in the cloud
rm imports.tf     # the resources are in the state
  • State: a backend (s3, azurerm or gcs) in the configuration file gives each root a backend.tf with a state key of its own, and infraharvest bootstrap --config <file> writes a root that creates the storage. Without one, each root keeps local state in terraform.tfstate.
  • Secrets: infraharvest never writes a secret value. Each secret becomes a sensitive variable in variables.tf, without a default: set it before planning, from your secret store or with TF_VAR_<name>. The root's README lists them.
  • Resources another state manages: import with --managed-state pointing at that state, and they are left out, so no resource ends up in two states.
  • rejected.hcl: what Terraform couldn't import, with its errors. Terraform doesn't load it: fix a resource and move its blocks back, or leave it out.

See Applying the roots.

Day to day

To Use
Add new resources to the roots discover again (it marks them new), review them, then import with --selection and --incremental; add --managed-state once imports.tf is deleted
Finish a run that failed part way The same command with --resume
Generate the roots again --regenerate; resources at other addresses get moved blocks, and those that go to another root it generates get removed blocks: apply the root they leave first
Import what discover just listed --reuse-inventory, instead of listing again
Check roots after editing them infraharvest verify, before deleting imports.tf
See what changed in the cloud since applying infraharvest drift: which changes the next apply would revert (see Drift)
Print the report again infraharvest report, with --format json for JSON
Import faster --parallel for accounts and regions (default 1), --list-parallel for services (default 4)
Lay out the roots --layout, and --env-tags for roots per environment
Choose modules --modules: registry (the default), latest-untested, local or none; your own modules in the configuration file
Import less --services, --skip, --id, --tag, --where
Accept a partial import --allow-partial
Script it --format json: the report on stdout, logs on stderr
Run it in CI The GitHub Action
Use it from an AI agent infraharvest mcp (see AI agents)

The exit code is 0 when everything was imported, 1 when something wasn't (3 with --allow-partial), 2 when the import couldn't run, and 130 or 143 when it was interrupted or terminated (see Troubleshooting). Day to day has more.

Options that go together

  • import needs --selection or --all, not both; discover refuses --all.
  • --services is required, on the command line or in the configuration file.
  • --incremental with --resume generates a root whose import didn't finish again, then adds to it.
  • --regenerate or --incremental, not both; without either, an import into a root an earlier import finished is refused.
  • --incremental finds what a root has from its import blocks or its checkpoint; without either, pass --managed-state.
  • --managed-state=backend needs a backend in the configuration file.
  • A --layout of your own starts with {out}/, contains {account} for several accounts, subscriptions or projects (on AWS, with any --accounts or --organization), and {env} with --env-tags.
  • On AWS, --accounts or --organization, not both, and --assume-role with {account}.
  • Azure's --subscriptions and --management-group, and Google Cloud's --projects, --organization and --folders, add up.

See Options that go together for the full list.

How it works

  1. The provider's listers call the cloud's APIs and record each resource's type, ID and attributes. The catalogue turns them into the ID Terraform imports the resource by, and says which resources the default selection leaves out.
  2. The selection decides which of them to import (see Choosing what to import).
  3. infraharvest writes an import block for each one into a root, and runs terraform plan -generate-config-out (or tofu), so the provider itself reads every resource and writes its configuration.
  4. It tidies the generated configuration: references between resources, shared tags and identifiers as locals, secrets as variables, and clusters of resources as module calls. Each change is kept only if a new plan shows no extra changes.
  5. It runs the verification gate on every root and writes a report.

infraharvest reads the cloud and writes files; it never applies anything, and writes no state. terraform apply on a generated root records the imported resources in state without changing them.

Supported providers

Each is covered in depth: inventory APIs, the catalogue, curated modules, and end-to-end tests on an emulator on every pull request. Each is also tested against a real AWS account, Azure subscription and Google Cloud project with the read-only permission templates. A new provider is added by following the steps below.

Adding a provider

  1. Create internal/providers/<name>/ with the provider and a lister for each of its services. The provider implements harvest.Provider (internal/harvest/provider.go), and Services maps each service's name to its lister, which usually embeds harvest.ListerOf. A lister's List(ctx, settings) lists the service's resources, records each one with harvest.Record or harvest.RecordBare: its ID, a name, the Terraform resource type, and attributes for import IDs and selection rules.
  2. Create internal/cli/providers/provider_cmd_<name>.go, under the build constraint !minimal || <name>. It describes the provider's command with a definition (see command.go): the help, the provider's own flags, and the planner that turns them into the scopes and calls to import. It registers it with define from init().
  3. Describe the provider in its Profile (internal/harvest/profile.go): its command's name, its registry Source when its Terraform provider isn't hashicorp/<name>, how it applies tags, which files of a root its resources go in, and what a root that environments share reads of its account and region. Implement the optional interfaces in internal/harvest/capabilities.go that it needs, for example ProviderWithScope to lay out roots by account and region, or ProviderWithTerraformEnv to pass credentials on to Terraform. For the query service, which lists through Terraform's own list resources, list harvest.QueryService among the services with a harvest.QueryLister, opt-in, set ListedTypes to the types its services list, which TestGoldenListedTypes (internal/cli) generates into the package's listed_types.go or, as AWS's services declare them, TestListedTypesAreDeclared checks, and implement ProviderWithQueryScope where the provider's scope is narrower than its provider block.
  4. Add catalogue entries under internal/catalogue/data/<provider>/ for types that need them, such as an import ID template when the ID a lister records isn't the one Terraform imports by, each with a golden test (see docs/catalogue.md).
  5. Add a page under docs/, list it in mkdocs.yml's navigation, and link it from this README. To have the command-line and services references cover it, add it to referenceProviders in internal/cli/clireference_test.go and rewrite them with the golden task of the remote workflow (see CONTRIBUTING.md).

Privacy

infraharvest collects no telemetry and sends nothing to its authors or anyone else. A run connects only to your clouds' APIs, the registries Terraform downloads providers and modules from, the state you point it at, and HashiCorp's release site when it has to download Terraform. Privacy lists every connection and every file it writes.

Contributing

Contributions are welcome. CONTRIBUTING.md describes the workflow: branches and pull requests against main, commit messages, the checks CI runs, and how to rewrite golden files and generated docs on GitHub without a local Go toolchain. docs/development.md is the reference for how the code is written: the layout, the conventions, the tests and the checks behind them. The documentation explains how infraharvest works from the user's side. Report vulnerabilities privately, as SECURITY.md says, and follow the code of conduct.

Licence

infraharvest is licensed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only). The schema metadata it embeds, the defaults and argument constraints read out of the HashiCorp Terraform providers' code (internal/catalogue/schemameta/*.json.gz), is MPL-2.0, as those providers are (LICENSES/MPL-2.0.txt): NOTICE names the releases it was read from and where their source is. OPA's capabilities file it embeds (internal/engine/gate/conftest_capabilities.json) is Apache-2.0, as OPA is (LICENSES/Apache-2.0.txt), and NOTICE names its release too (see Licences).

Documentation

Overview

infraharvest imports existing cloud infrastructure into Terraform code. The command line lives in internal/cli; main only sets up logging and turns the outcome into the process's exit code.

Directories

Path Synopsis
Package e2e runs infraharvest end to end against local cloud emulators.
Package e2e runs infraharvest end to end against local cloud emulators.
internal
adapters
Package adapters maps clusters of imported resources onto calls of curated public modules, such as terraform-aws-modules/s3-bucket/aws.
Package adapters maps clusters of imported resources onto calls of curated public modules, such as terraform-aws-modules/s3-bucket/aws.
adapters/cmd/adaptercheck command
Command adaptercheck checks the curated module adapters against module versions.
Command adaptercheck checks the curated module adapters against module versions.
adapters/moduleinterface
Package moduleinterface reads a registry module version's interface (its variables and outputs, the providers it requires and the resources it declares) and checks adapters against it: the snapshots in internal/adapters/testdata/interfaces, and the nightly check for newer versions.
Package moduleinterface reads a registry module version's interface (its variables and outputs, the providers it requires and the resources it declares) and checks adapters against it: the snapshots in internal/adapters/testdata/interfaces, and the nightly check for newer versions.
catalogue
Package catalogue holds what infraharvest knows about each Terraform resource type, as data: the ID Terraform imports a resource with, the arguments to leave out of generated configuration, the resources the default selection skips, the child resources a resource brings with it, the data source that reads one, and where its provider's APIs name it.
Package catalogue holds what infraharvest knows about each Terraform resource type, as data: the ID Terraform imports a resource with, the arguments to leave out of generated configuration, the resources the default selection skips, the child resources a resource brings with it, the data source that reads one, and where its provider's APIs name it.
catalogue/cmd/listcoverage command
Command listcoverage counts, for the newest release of each provider in providers, the resource types its schema has and the list resources: the types `terraform query` can discover.
Command listcoverage counts, for the newest release of each provider in providers, the resource types its schema has and the list resources: the types `terraform query` can discover.
catalogue/schemameta
Package schemameta holds what each provider's own code says about its resource types' arguments and `terraform providers schema -json` leaves out: the value an argument defaults to, and which arguments exclude or need each other (ExactlyOneOf, ConflictsWith, AtLeastOneOf, RequiredWith).
Package schemameta holds what each provider's own code says about its resource types' arguments and `terraform providers schema -json` leaves out: the value an argument defaults to, and which arguments exclude or need each other (ExactlyOneOf, ConflictsWith, AtLeastOneOf, RequiredWith).
cli
Package cli is infraharvest's command line: the root command and its subcommands.
Package cli is infraharvest's command line: the root command and its subcommands.
cli/providers
Package providers holds the command of each provider infraharvest imports from: its flags, and how they become calls of the importer.
Package providers holds the command of each provider infraharvest imports from: its flags, and how they become calls of the importer.
config
Package config reads infraharvest's configuration file.
Package config reads infraharvest's configuration file.
discovery
Package discovery lists the resources an import covers: one Discoverer per service and scope (an account and region, a subscription, a project), run by List with a deadline each and a bounded number at a time.
Package discovery lists the resources an import covers: one Discoverer per service and scope (an account and region, a subscription, a project), run by List with a deadline each and a bounded number at a time.
driftpolicy
Package driftpolicy decides what infraharvest drift does with each change it finds in the cloud: accept it into the code, or keep the code's value, which the next apply puts back.
Package driftpolicy decides what infraharvest drift does with each change it finds in the cloud: accept it into the code, or keep the code's value, which the next apply puts back.
engine
Package engine generates Terraform configuration for existing resources by running Terraform itself.
Package engine generates Terraform configuration for existing resources by running Terraform itself.
engine/cmd/opacapabilities command
Command opacapabilities checks the OPA capabilities infraharvest gives conftest (internal/engine/gate/conftest_capabilities.json) against the OPA release the newest conftest is built with, and with -write bumps them to it.
Command opacapabilities checks the OPA capabilities infraharvest gives conftest (internal/engine/gate/conftest_capabilities.json) against the OPA release the newest conftest is built with, and with -write bumps them to it.
engine/drift
Package drift finds what changed in the cloud since a root was last applied, and takes the changes it is told to accept into the root's code where it can be told how, held to the plan of the edited code and to the checks of the verification gate.
Package drift finds what changed in the cloud since a root was last applied, and takes the changes it is told to accept into the root's code where it can be told how, held to the plan of the edited code and to the checks of the verification gate.
engine/envmerge
Package envmerge merges the finished roots of a stack's environments into the root they share, with what differs between them in each environment's var files, and works on that root afterwards: it verifies it as one environment, writes its moved blocks, hands its resources over to other roots, and gives back each environment's blocks as its own root would have them.
Package envmerge merges the finished roots of a stack's environments into the root they share, with what differs between them in each environment's var files, and works on that root afterwards: it verifies it as one environment, writes its moved blocks, hands its resources over to other roots, and gives back each environment's blocks as its own root would have them.
engine/gate
Package gate is the verification gate: the checks a root passes before infraharvest calls it done, and in what order they run.
Package gate is the verification gate: the checks a root passes before infraharvest calls it done, and in what order they run.
engine/hclfile
Package hclfile reads, edits and lays out Terraform configuration files: each a syntax tree with source positions and an editable tree, and the byte edits made to their source.
Package hclfile reads, edits and lays out Terraform configuration files: each a syntax tree with source positions and an editable tree, and the byte edits made to their source.
engine/rootfile
Package rootfile names the files of a root the engine writes, and writes those it generates from data alone: the import blocks (imports.tf), the Terraform and provider requirements (versions.tf) and the provider block (providers.tf), the moved and removed blocks (moves.tf) with what roots hand over to each other, and the Terraform release the root requires.
Package rootfile names the files of a root the engine writes, and writes those it generates from data alone: the import blocks (imports.tf), the Terraform and provider requirements (versions.tf) and the provider block (providers.tf), the moved and removed blocks (moves.tf) with what roots hand over to each other, and the Terraform release the root requires.
engine/secret
Package secret keeps secret values out of the configuration infraharvest generates: it finds them, among the values Terraform marks sensitive and those it writes in the open, moves them into sensitive variables, hides them from the output of infraharvest's own plans, and tells whether a file holds one.
Package secret keeps secret values out of the configuration infraharvest generates: it finds them, among the values Terraform marks sensitive and those it writes in the open, moves them into sensitive variables, hides them from the output of infraharvest's own plans, and tells whether a file holds one.
engine/tfrun
Package tfrun runs Terraform, or OpenTofu, for the engine: it finds the binary, runs its commands in a root with the plugin cache the roots share, bounded in time or without the root's local state, and reads the diagnostics and the change summary of a plan.
Package tfrun runs Terraform, or OpenTofu, for the engine: it finds the binary, runs its commands in a root with the plugin cache the roots share, bounded in time or without the root's local state, and reads the diagnostics and the change summary of a plan.
export
Package export writes the metadata of an import that a hosted control plane may receive: the inventory of the estate, the run and the verification gate, each a JSON document with a schema (see schemas/).
Package export writes the metadata of an import that a hosted control plane may receive: the inventory of the estate, the run and the verification gate, each a JSON document with a schema (see schemas/).
filelock
Package filelock takes exclusive locks on files that hold across processes, with the operating system's own locks: flock on Unix, LockFileEx on Windows.
Package filelock takes exclusive locks on files that hold across processes, with the operating system's own locks: flock on Unix, LockFileEx on Windows.
fsutil
Package fsutil writes files that must never be left half written, checks that a directory a run writes into holds nothing that would lead those writes elsewhere, and makes directories private to the user running infraharvest.
Package fsutil writes files that must never be left half written, checks that a directory a run writes into holds nothing that would lead those writes elsewhere, and makes directories private to the user running infraharvest.
harvest
Package harvest is the API between the providers and the importer: a Provider maps each of its services to a Lister, which lists the service's resources and records each as a Resource.
Package harvest is the API between the providers and the importer: a Provider maps each of its services to a Lister, which lists the service's resources and records each as a Resource.
importer
Package importer runs what the provider commands, discover, import, verify and drift, ask for, with no command line in it: the commands fill in Options from their flags and call it, so that what they do is tested without one.
Package importer runs what the provider commands, discover, import, verify and drift, ask for, with no command line in it: the commands fill in Options from their flags and call it, so that what they do is tested without one.
logging
Package logging filters what the standard logger writes: it drops the debug and trace messages client libraries log, some of which hold whole HTTP requests, and keeps everything else.
Package logging filters what the standard logger writes: it drops the debug and trace messages client libraries log, some of which hold whole HTTP requests, and keeps everything else.
managed
Package managed finds the resources Terraform already manages, from state, so that an import can leave them out instead of importing them a second time.
Package managed finds the resources Terraform already manages, from state, so that an import can leave them out instead of importing them a second time.
managed/stores/azblob
Package azblob reads Terraform state from Azure Blob Storage, where the azurerm backend keeps it.
Package azblob reads Terraform state from Azure Blob Storage, where the azurerm backend keeps it.
managed/stores/gcs
Package gcs reads Terraform state from Cloud Storage, where the gcs backend keeps it.
Package gcs reads Terraform state from Cloud Storage, where the gcs backend keeps it.
managed/stores/hcp
Package hcp reads the current state of HCP Terraform (formerly Terraform Cloud) or Terraform Enterprise workspaces through their API.
Package hcp reads the current state of HCP Terraform (formerly Terraform Cloud) or Terraform Enterprise workspaces through their API.
managed/stores/s3
Package s3 reads Terraform state from Amazon S3, where the s3 backend keeps it.
Package s3 reads Terraform state from Amazon S3, where the s3 backend keeps it.
mcpserver
Package mcpserver serves infraharvest to AI agents over the Model Context Protocol.
Package mcpserver serves infraharvest to AI agents over the Model Context Protocol.
picker
Package picker is an interactive terminal picker for a selection file: a tree of the listed resources by scope (provider, account and region) and type, to include or exclude one at a time or a group at once, with a live summary of what an import would bring under Terraform.
Package picker is an interactive terminal picker for a selection file: a tree of the listed resources by scope (provider, account and region) and type, to include or exclude one at a time or a group at once, with a live summary of what an import would bring under Terraform.
providers/providertest
Package providertest stands up fake clouds for the providers' tests, at the HTTP level, so that a test doesn't depend on how a lister builds its clients: a Cloud answers every request its Handler is asked, whether the SDK sends it through the Cloud as its HTTP client (AWS, Azure) or to the Cloud's server (Google).
Package providertest stands up fake clouds for the providers' tests, at the HTTP level, so that a test doesn't depend on how a lister builds its clients: a Cloud answers every request its Handler is asked, whether the SDK sends it through the Cloud as its HTTP client (AWS, Azure) or to the Cloud's server (Google).
providers/workers
Package workers runs a lister's per-resource reads in goroutines that can't take the process down: a panic in one is caught where it happened and raised again on the goroutine that waits, so that the discoverer's own recovery (see discovery.Discover) turns it into that service's failure, and the other services carry on.
Package workers runs a lister's per-resource reads in goroutines that can't take the process down: a panic in one is caught where it happened and raised again on the goroutine that waits, so that the discoverer's own recovery (see discovery.Discover) turns it into that service's failure, and the other services carry on.
ratelimit
Package ratelimit limits the requests a run sends to each API host, such as ec2.eu-west-1.amazonaws.com or compute.googleapis.com: the clouds throttle by API, and a run lists many services, regions and accounts at once.
Package ratelimit limits the requests a run sends to each API host, such as ec2.eu-west-1.amazonaws.com or compute.googleapis.com: the clouds throttle by API, and a run lists many services, regions and accounts at once.
report
Package report describes what an import did: what it found, what it imported, what it left out and why, and the versions it used.
Package report describes what an import did: what it found, what it imported, what it left out and why, and the versions it used.
report/cfn
Package cfn is the report's section on the AWS CloudFormation stacks an import is scoped to (AWS --cfn-stack): what became of each stack's resources, whether the stack can be deleted without deleting what the import brought under Terraform, and the AWS CLI commands that update it with the copy of its template that has Retain added.
Package cfn is the report's section on the AWS CloudFormation stacks an import is scoped to (AWS --cfn-stack): what became of each stack's resources, whether the stack can be deleted without deleting what the import brought under Terraform, and the AWS CLI commands that update it with the copy of its template that has Retain added.
report/mdtext
Package mdtext writes text infraharvest doesn't control into Markdown.
Package mdtext writes text infraharvest doesn't control into Markdown.
selection
Package selection decides which listed resources an import brings under Terraform.
Package selection decides which listed resources an import brings under Terraform.
sentence
Package sentence words lists as messages and help text read them.
Package sentence words lists as messages and help text read them.
stackintent
Package stackintent carries a CloudFormation stack's template into a root generated from the stack's live resources (AWS --cfn-stack): the parameters it sets properties from become variables, its outputs become outputs, and its conditions are recorded as comments.
Package stackintent carries a CloudFormation stack's template into a root generated from the stack's live resources (AWS --cfn-stack): the parameters it sets properties from become variables, its outputs become outputs, and its conditions are recorded as comments.
tfquery
Package tfquery lists resources through Terraform's own list resources: it writes list blocks into a .tfquery.hcl file of a working directory of its own, runs terraform query -json there and records each result by its resource identity (see harvest.RecordIdentity), which the import then imports it by.
Package tfquery lists resources through Terraform's own list resources: it writes list blocks into a .tfquery.hcl file of a working directory of its own, runs terraform query -json there and records each result by its resource identity (see harvest.RecordIdentity), which the import then imports it by.
tftypes
Package tftypes holds what infraharvest knows of Terraform resource types that more than one package needs, such as the engine and the reading of managed state: which types are other names of each other, and the ID of a resource imported by its identity (see IdentityID).
Package tftypes holds what infraharvest knows of Terraform resource types that more than one package needs, such as the engine and the reading of managed state: which types are other names of each other, and the ID of a resource imported by its identity (see IdentityID).
version
Package version holds the version infraharvest reports, which release builds set at link time.
Package version holds the version infraharvest reports, which release builds set at link time.
pkg
cfn
Package cfn translates AWS CloudFormation templates into Terraform configuration for the AWS provider.
Package cfn translates AWS CloudFormation templates into Terraform configuration for the AWS provider.
cfn/hclname
Package hclname holds what the CloudFormation converter (package cfn) writes that a program building on its output must write alike: the Terraform names of CloudFormation names, numbers as HCL literals, and the variables and data sources of SSM parameter types.
Package hclname holds what the CloudFormation converter (package cfn) writes that a program building on its output must write alike: the Terraform names of CloudFormation names, numbers as HCL literals, and the variables and data sources of SSM parameter types.
Package schemas holds the JSON Schemas of the documents infraharvest export writes, so that a hosted control plane can validate what it receives.
Package schemas holds the JSON Schemas of the documents infraharvest export writes, so that a hosted control plane can validate what it receives.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL