Giter Club home page Giter Club logo

tfmerge's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tfmerge's Issues

[Bug] Failed to obtain provider schema unavailable provider "registry.terraform.io/hashicorp/random"

What versions are you using?

tfmerge: cb78f836b8f81e260e37255fba3dd3e63b148e82
environment: Darwin bne-nb-ariel 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112 arm64 arm Darwin

What are you doing?

Attempting to merge state files.

What was expected?

State files are merged and output file is populated with entire state.

What happened?

$ tfmerge -o infra2.tfstate infra1.tfstate 02-base.json

Error: Failed to load plugin schemas

Error while loading schemas for plugin components: Failed to obtain provider
schema: Could not load the schema for provider
registry.terraform.io/hashicorp/random: failed to instantiate provider
"registry.terraform.io/hashicorp/random" to obtain schema: unavailable
provider "registry.terraform.io/hashicorp/random"..

Anything else?

Files to reproduce

Skip importing common resources but finish the import?

Hi, thanks for creating this tool! There's one edge case we're running when using this tool as part of a larger terraform import script - should the two statefiles share any resources in common, you'll get the following error:

resource {tf_resource} is defined in both state files terraform.tfstate and new.tfstate

Even if for example terraform.state contains resources A, B and new.tfstate contains resources B, C, ideally we'd want the import to still work such that terraform.state contains resources A, B, C after execution (skipping these resource defined errors)

Failed to marshal state

Hi!

I have a directory with plenty of .tfstate files. I want to merge them into one. 1.tfstate to 200.tfstate
But i get 200 errors saying:

I ran "tfmerge -o 1.tfstate *"

showing state file /tfstate/done/100.tfstate: exit status 1
Failed to marshal state to json: no schema found for data.aws_sns_topic.sns_topic (in provider registry.terraform.io/-/aws)git/scripts/done/100.tfstate: exit status 1
Failed to marshal state to json: no schema found for data.aws_sns_topic.sns_topic (in provider registry.terraform.io/-/aws)

Also when i tried this:
"tfmerge -o 7.tfstate 8.tfstate 9.tfstate" i got:

1 error occurred:
	* showing state file /tfstate/done/9.tfstate: exit status 1
Failed to marshal state to json: schema version 2 for aws_security_group_rule.instances_egress_all in state does not match version 0 from the provider

Thanks for helping out!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.