Skip to content

Instantly share code, notes, and snippets.

@andresvia
Last active July 13, 2018 21:37
Show Gist options
  • Select an option

  • Save andresvia/d54fdc802f023c39246dbcc457da6072 to your computer and use it in GitHub Desktop.

Select an option

Save andresvia/d54fdc802f023c39246dbcc457da6072 to your computer and use it in GitHub Desktop.
terragrunt repro
terragrunt {
terraform {
source = "git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git//?ref=master"
}
remote_state {
backend = "s3"
config {
bucket = "t-villa-tg-0162"
dynamodb_table = "t-villa-tg-0162"
encrypt = true
key = "terraform.tfstate"
region = "us-east-1"
}
}
}


# w: /tmp/gists/d54fdc802f023c39246dbcc457da6072
rm -rf ~/.terragrunt/ .terragrunt-cache && ./terragrunt0.14 plan 
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:35:17 Running command: terraform --version
[terragrunt] 2018/07/13 14:35:18 Reading Terragrunt config file at /tmp/gists/d54fdc802f023c39246dbcc457da6072/terraform.tfvars
[terragrunt] 2018/07/13 14:35:18 Downloading Terraform configurations from git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master into /Users/t_villa/.terragrunt/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk using terraform init
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:35:18 Initializing remote state for the s3 backend
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:35:19 Running command: terraform init -backend-config=key=terraform.tfstate -backend-config=region=us-east-1 -backend-config=bucket=t-villa-tg-0162 -backend-config=dynamodb_table=t-villa-tg-0162 -backend-config=encrypt=true -from-module=git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master /Users/t_villa/.terragrunt/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk
Copying configuration from "git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master"...
Initializing modules...
- module.module
  Getting source "git::https://gist.github.com/2df54ba3bfff410c38fd9cf7acc59f5d.git//?ref=master"

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "random" (1.3.1)...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.random: version = "~> 1.3"

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.
[terragrunt] 2018/07/13 14:35:26 Copying files from /tmp/gists/d54fdc802f023c39246dbcc457da6072 into /Users/t_villa/.terragrunt/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk
[terragrunt] 2018/07/13 14:35:26 Setting working directory to /Users/t_villa/.terragrunt/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk
[terragrunt] 2018/07/13 14:35:26 Backend s3 has not changed.
[terragrunt] 2018/07/13 14:35:26 Running command: terraform plan
Acquiring state lock. This may take a few moments...
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + module.module.random_pet.pet
      id:        <computed>
      length:    "2"
      separator: "-"


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

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.

Releasing state lock. This may take a few moments...
# branch.oid 86e83991643efe6993155a9df17b4f02a2eb0a54
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
# ?? terragrunt0.14
# ?? terragrunt0.16

# w: /tmp/gists/d54fdc802f023c39246dbcc457da6072




# w: /tmp/gists/d54fdc802f023c39246dbcc457da6072
rm -rf ~/.terragrunt/ .terragrunt-cache && ./terragrunt0.16 plan 
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:36:09 Running command: terraform --version
[terragrunt] 2018/07/13 14:36:10 Reading Terragrunt config file at /tmp/gists/d54fdc802f023c39246dbcc457da6072/terraform.tfvars
[terragrunt] 2018/07/13 14:36:10 Downloading Terraform configurations from git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master into /tmp/gists/d54fdc802f023c39246dbcc457da6072/.terragrunt-cache/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk using terraform init
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:36:10 Initializing remote state for the s3 backend
[terragrunt] [/tmp/gists/d54fdc802f023c39246dbcc457da6072] 2018/07/13 14:36:11 Running command: terraform init -backend-config=key=terraform.tfstate -backend-config=region=us-east-1 -backend-config=bucket=t-villa-tg-0162 -backend-config=dynamodb_table=t-villa-tg-0162 -backend-config=encrypt=true -get=false -get-plugins=false -backend=false -from-module=git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master /tmp/gists/d54fdc802f023c39246dbcc457da6072/.terragrunt-cache/ee5wphhXBgOwNgK-qbndmKQvetc/5bWEuS5KXjYvjksx-n51t142ZUk
Copying configuration from "git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git?ref=master"...
Backend reinitialization required. Please run "terraform init".
Reason: Initial configuration of the requested backend "s3"

The "backend" is the interface that Terraform uses to store state,
perform operations, etc. If this message is showing up, it means that the
Terraform configuration you're using is using a custom configuration for
the Terraform backend.

Changes to backend configurations require reinitialization. This allows
Terraform to setup the new configuration, copy existing state, etc. This is
only done during "terraform init". Please run that command now then try again.

If the change reason above is incorrect, please verify your configuration
hasn't changed and try again. At this point, no changes to your existing
configuration or state have been made.


Error: Error loading modules: module module: not found, may need to run 'terraform init'


[terragrunt] 2018/07/13 14:36:11 Hit multiple errors:
exit status 1
# branch.oid 86e83991643efe6993155a9df17b4f02a2eb0a54
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
# ?? .terragrunt-cache/
# ?? terragrunt0.14
# ?? terragrunt0.16

# w: /tmp/gists/d54fdc802f023c39246dbcc457da6072


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment