Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Invalid output from 'terraform plan' #113

Open
tarak666 opened this issue Apr 2, 2024 · 3 comments
Open

ERROR: Invalid output from 'terraform plan' #113

tarak666 opened this issue Apr 2, 2024 · 3 comments

Comments

@tarak666
Copy link

tarak666 commented Apr 2, 2024

Hi

I have running code and when i run terraform plan and apply it works on CLI, but when i run here it shows bwlo error.
ERROR: Invalid output from 'terraform plan' command. Try using the terraform CLI first to check source files have no errors.

Output:
Preflight check..
dot command detected: /cygdrive/c/ProgramData/chocolatey/bin/dot
gvpr command detected: /cygdrive/c/ProgramData/chocolatey/bin/gvpr
git command detected: /usr/bin/git
terraform command detected: /usr/bin/terraform

Checking Terraform Version...

Terraform v1.7.2

Initializing the backend...

Initializing provider plugins...

  • Reusing previous version of hashicorp/aws from the dependency lock file
  • Installing hashicorp/aws v5.39.0...
  • Installed hashicorp/aws v5.39.0 (signed by HashiCorp)

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Initalising workspace: default

Generating Terraform Plan..

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:

  • create

Terraform will perform the following actions:

aws_instance.myec2vm will be created

  • resource "aws_instance" "myec2vm" {
    • ami = "ami-01387af90a62e3c01"
    • arn = (known after apply)
    • associate_public_ip_address = (known after apply)
    • availability_zone = (known after apply)
    • cpu_core_count = (known after apply)
    • cpu_threads_per_core = (known after apply)
    • disable_api_stop = (known after apply)
    • disable_api_termination = (known after apply)
    • ebs_optimized = (known after apply)
    • get_password_data = false
    • host_id = (known after apply)
    • host_resource_group_arn = (known after apply)
    • iam_instance_profile = (known after apply)
    • id = (known after apply)
    • instance_initiated_shutdown_behavior = (known after apply)
    • instance_lifecycle = (known after apply)
    • instance_state = (known after apply)
    • instance_type = "t3.micro"
    • ipv6_address_count = (known after apply)
    • ipv6_addresses = (known after apply)
    • key_name = (known after apply)
    • monitoring = (known after apply)
    • outpost_arn = (known after apply)
    • password_data = (known after apply)
    • placement_group = (known after apply)
    • placement_partition_number = (known after apply)
    • primary_network_interface_id = (known after apply)
    • private_dns = (known after apply)
    • private_ip = (known after apply)
    • public_dns = (known after apply)
    • public_ip = (known after apply)
    • secondary_private_ips = (known after apply)
    • security_groups = (known after apply)
    • source_dest_check = true
    • spot_instance_request_id = (known after apply)
    • subnet_id = (known after apply)
    • tags = {
      • "Name" = "EC2 Demo"
        }
    • tags_all = {
      • "Name" = "EC2 Demo"
        }
    • tenancy = (known after apply)
    • user_data = "fc08a413e16a57e0b0c0ca2bdd2ce0235f020f12"
    • user_data_base64 = (known after apply)
    • user_data_replace_on_change = false
    • vpc_security_group_ids = (known after apply)
      }

Plan: 1 to add, 0 to change, 0 to destroy.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Saved the plan to: /tmp/tfplan.bin

To perform exactly these actions, run the following command to apply:
terraform apply "/tmp/tfplan.bin"

Analysing plan..

ERROR: Invalid output from 'terraform plan' command. Try using the terraform CLI first to check source files have no errors.

@patrickchugh
Copy link
Owner

hello @tarak666 can you share your terraform source so I can try to reproduce?

@tarak666
Copy link
Author

tarak666 commented Apr 8, 2024

@seanfaubus
Copy link

I'm getting the same error for a lot of the tf written at my company. Is there a particular way you have seen Terravision work best? Is it best to have all code in one file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants