Skip to content

Instantly share code, notes, and snippets.

@jbruett
Created February 17, 2020 15:20
Show Gist options
  • Save jbruett/6a2c3596c0790404deaad99614f9fbe3 to your computer and use it in GitHub Desktop.
Save jbruett/6a2c3596c0790404deaad99614f9fbe3 to your computer and use it in GitHub Desktop.
TF v0.12.20 not importing provider
$ tf12 init
2020/02/17 15:19:11 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/02/17 15:19:11 [INFO] Terraform version: 0.12.20
2020/02/17 15:19:11 [INFO] Go runtime version: go1.12.13
2020/02/17 15:19:11 [INFO] CLI args: []string{"/usr/local/bin/terraform12", "init"}
2020/02/17 15:19:11 [DEBUG] Attempting to open CLI config file: /home/ec2-user/.terraformrc
2020/02/17 15:19:11 Loading CLI configuration from /home/ec2-user/.terraformrc
2020/02/17 15:19:11 [INFO] CLI command args: []string{"init"}
Initializing the backend...
2020/02/17 15:19:11 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/02/17 15:19:11 [INFO] Setting AWS metadata API timeout to 100ms
2020/02/17 15:19:11 [INFO] AWS EC2 instance detected via default metadata API endpoint, EC2RoleProvider added to the auth chain
2020/02/17 15:19:11 [INFO] AWS Auth provider used: "EC2RoleProvider"
2020/02/17 15:19:11 [INFO] Attempting to AssumeRole arn:aws:iam::156661170251:role/admin_terraform_states (SessionName: "", ExternalId: "", Policy: "")
2020/02/17 15:19:11 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] DEBUG: Request sts/GetCallerIdentity Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: sts.amazonaws.com
User-Agent: aws-sdk-go/1.25.3 (go1.12.13; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.20
Content-Length: 43
Authorization: AWS4-HMAC-SHA256 Credential=ASIASI6N3YBFXP2QBUOB/20200217/us-east-1/sts/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=0e0c9729dac55a924e132912846a88c1ea55401b7ccd272c5f230998bb31fd15
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Amz-Date: 20200217T151911Z
X-Amz-Security-Token: FwoGZXIvYXdzEBkaDLe5KidENOuef6EFhiK3AdS7YHdK4zamVzyIeUcJv4lUT2RfAcE/wT9/DUB1oxPstEaQs8GkD1BvaCAkpIjbfPNS3xTYiTJf2l0XJTC9DkTNSBTeyJziqXLsvPHW9NR9KWstaiNkkKDtYDolr9wyBI0pBazQgc/WlxalYRaqEncBH4HV/1TrAKboD9luzSwJX6DAOCvGs/lrB5vnGYsuPRk4yb/cLv5s3MBcmY0c87RbsSq60zJLE0v2yTnFzAq1K9tser9DMyjv3aryBTItG2AaUFKL3ymPsQI+fiADAb+klqkrFlKvc/6fZsXDpi+Ldz8WwmVmFMjoR+vc
Accept-Encoding: gzip
Action=GetCallerIdentity&Version=2011-06-15
-----------------------------------------------------
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] DEBUG: Response sts/GetCallerIdentity Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Content-Length: 467
Content-Type: text/xml
Date: Mon, 17 Feb 2020 15:19:11 GMT
X-Amzn-Requestid: a1e61e58-9516-4850-a10d-11d19af1b4de
-----------------------------------------------------
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] <GetCallerIdentityResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
<GetCallerIdentityResult>
<Arn>arn:aws:sts::156661170251:assumed-role/admin_terraform_states/1581952751739727052</Arn>
<UserId>AROAIMA2YBPLWZNZJZRVO:1581952751739727052</UserId>
<Account>156661170251</Account>
</GetCallerIdentityResult>
<ResponseMetadata>
<RequestId>a1e61e58-9516-4850-a10d-11d19af1b4de</RequestId>
</ResponseMetadata>
</GetCallerIdentityResponse>
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] DEBUG: Request s3/ListObjects Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /?max-keys=1000&prefix=admin_aviatrix%2F HTTP/1.1
Host: fortitude-central-terraformstate-us-east-1.s3.amazonaws.com
User-Agent: aws-sdk-go/1.25.3 (go1.12.13; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.20
Authorization: AWS4-HMAC-SHA256 Credential=ASIASI6N3YBFXP2QBUOB/20200217/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=7d29495422d72375c65f7bd253562971be4004dc20fa64cba3cd9d5fb610d6a7
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20200217T151911Z
X-Amz-Security-Token: FwoGZXIvYXdzEBkaDLe5KidENOuef6EFhiK3AdS7YHdK4zamVzyIeUcJv4lUT2RfAcE/wT9/DUB1oxPstEaQs8GkD1BvaCAkpIjbfPNS3xTYiTJf2l0XJTC9DkTNSBTeyJziqXLsvPHW9NR9KWstaiNkkKDtYDolr9wyBI0pBazQgc/WlxalYRaqEncBH4HV/1TrAKboD9luzSwJX6DAOCvGs/lrB5vnGYsuPRk4yb/cLv5s3MBcmY0c87RbsSq60zJLE0v2yTnFzAq1K9tser9DMyjv3aryBTItG2AaUFKL3ymPsQI+fiADAb+klqkrFlKvc/6fZsXDpi+Ldz8WwmVmFMjoR+vc
Accept-Encoding: gzip
-----------------------------------------------------
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] DEBUG: Response s3/ListObjects Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Mon, 17 Feb 2020 15:19:12 GMT
Server: AmazonS3
X-Amz-Bucket-Region: us-east-1
X-Amz-Id-2: h8K7EKa2EEfFgMYvJSd4kHAEitBjMSuDeM6oZ35OYLzkyYuoeiCCBaUk5I4+LW/tJBIgQhMd0YY=
X-Amz-Request-Id: A4849589A5AA5DE6
-----------------------------------------------------
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>fortitude-central-terraformstate-us-east-1</Name><Prefix>admin_aviatrix/</Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>admin_aviatrix/development/admin_aviatrix/terraform.state</Key><LastModified>2020-02-17T14:52:16.000Z</LastModified><ETag>&quot;22028b6ce2faa5cfc81356cba5812bd5&quot;</ETag><Size>157</Size><Owner><ID>d7af1d3c1fc1ed281f3ee608356cfb5521d2464cbac8209c79a27f6fe2008c85</ID><DisplayName>CloudServices-AWS-Accounts-094</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>admin_aviatrix/production/admin_aviatrix/terraform.state</Key><LastModified>2020-02-17T14:52:24.000Z</LastModified><ETag>&quot;82684f72f79fc544d80d55a8e5730c67&quot;</ETag><Size>157</Size><Owner><ID>d7af1d3c1fc1ed281f3ee608356cfb5521d2464cbac8209c79a27f6fe2008c85</ID><DisplayName>CloudServices-AWS-Accounts-094</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>
2020/02/17 15:19:11 [DEBUG] checking for provider in "."
2020/02/17 15:19:11 [DEBUG] checking for provider in "/usr/local/bin"
2020/02/17 15:19:11 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:11 [DEBUG] found provider "terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:11 [DEBUG] found plugin override in .terraformrc: "aviatrix", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
2020/02/17 15:19:11 [DEBUG] found valid plugin: "aviatrix", "0.0.0", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
2020/02/17 15:19:11 [DEBUG] found valid plugin: "aws", "2.49.0", "/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:11 [DEBUG] checking for provisioner in "."
2020/02/17 15:19:11 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/02/17 15:19:11 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:11 [DEBUG] [aws-sdk-go] DEBUG: Request s3/ListObjects Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /?max-keys=1000&prefix=admin_aviatrix%2F HTTP/1.1
Host: fortitude-central-terraformstate-us-east-1.s3.amazonaws.com
User-Agent: aws-sdk-go/1.25.3 (go1.12.13; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.20
Authorization: AWS4-HMAC-SHA256 Credential=ASIASI6N3YBFXP2QBUOB/20200217/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=7d29495422d72375c65f7bd253562971be4004dc20fa64cba3cd9d5fb610d6a7
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20200217T151911Z
X-Amz-Security-Token: FwoGZXIvYXdzEBkaDLe5KidENOuef6EFhiK3AdS7YHdK4zamVzyIeUcJv4lUT2RfAcE/wT9/DUB1oxPstEaQs8GkD1BvaCAkpIjbfPNS3xTYiTJf2l0XJTC9DkTNSBTeyJziqXLsvPHW9NR9KWstaiNkkKDtYDolr9wyBI0pBazQgc/WlxalYRaqEncBH4HV/1TrAKboD9luzSwJX6DAOCvGs/lrB5vnGYsuPRk4yb/cLv5s3MBcmY0c87RbsSq60zJLE0v2yTnFzAq1K9tser9DMyjv3aryBTItG2AaUFKL3ymPsQI+fiADAb+klqkrFlKvc/6fZsXDpi+Ldz8WwmVmFMjoR+vc
Accept-Encoding: gzip
-----------------------------------------------------
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] DEBUG: Response s3/ListObjects Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Mon, 17 Feb 2020 15:19:12 GMT
Server: AmazonS3
X-Amz-Bucket-Region: us-east-1
X-Amz-Id-2: eS/QT9UmWBgfALBjwhuoGT3rdzsk2SNlUcrNaRZRDtfKfU3rnWlie0vSM+UruufzzPceMV1yEPA=
X-Amz-Request-Id: 5C0F8516B34C8B90
-----------------------------------------------------
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>fortitude-central-terraformstate-us-east-1</Name><Prefix>admin_aviatrix/</Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>admin_aviatrix/development/admin_aviatrix/terraform.state</Key><LastModified>2020-02-17T14:52:16.000Z</LastModified><ETag>&quot;22028b6ce2faa5cfc81356cba5812bd5&quot;</ETag><Size>157</Size><Owner><ID>d7af1d3c1fc1ed281f3ee608356cfb5521d2464cbac8209c79a27f6fe2008c85</ID><DisplayName>CloudServices-AWS-Accounts-094</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>admin_aviatrix/production/admin_aviatrix/terraform.state</Key><LastModified>2020-02-17T14:52:24.000Z</LastModified><ETag>&quot;82684f72f79fc544d80d55a8e5730c67&quot;</ETag><Size>157</Size><Owner><ID>d7af1d3c1fc1ed281f3ee608356cfb5521d2464cbac8209c79a27f6fe2008c85</ID><DisplayName>CloudServices-AWS-Accounts-094</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] DEBUG: Request s3/GetObject Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /admin_aviatrix/terraform.state HTTP/1.1
Host: fortitude-central-terraformstate-us-east-1.s3.amazonaws.com
User-Agent: aws-sdk-go/1.25.3 (go1.12.13; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.20
Authorization: AWS4-HMAC-SHA256 Credential=ASIASI6N3YBFXP2QBUOB/20200217/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=99588a1fec715db57932d501bb5c346bb524e039882156c846987686cf397083
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20200217T151912Z
X-Amz-Security-Token: FwoGZXIvYXdzEBkaDLe5KidENOuef6EFhiK3AdS7YHdK4zamVzyIeUcJv4lUT2RfAcE/wT9/DUB1oxPstEaQs8GkD1BvaCAkpIjbfPNS3xTYiTJf2l0XJTC9DkTNSBTeyJziqXLsvPHW9NR9KWstaiNkkKDtYDolr9wyBI0pBazQgc/WlxalYRaqEncBH4HV/1TrAKboD9luzSwJX6DAOCvGs/lrB5vnGYsuPRk4yb/cLv5s3MBcmY0c87RbsSq60zJLE0v2yTnFzAq1K9tser9DMyjv3aryBTItG2AaUFKL3ymPsQI+fiADAb+klqkrFlKvc/6fZsXDpi+Ldz8WwmVmFMjoR+vc
Accept-Encoding: gzip
-----------------------------------------------------
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] DEBUG: Response s3/GetObject Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 404 Not Found
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Mon, 17 Feb 2020 15:19:11 GMT
Server: AmazonS3
X-Amz-Id-2: h7CIUkznwTIv8tkZqUYYAley8X7YWOmz+cIbekFoVK7qjSaKqiRe3oQjQO7Ex6dZl1MU1zd1ml0=
X-Amz-Request-Id: B3D46ACAF89898D7
-----------------------------------------------------
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>admin_aviatrix/terraform.state</Key><RequestId>B3D46ACAF89898D7</RequestId><HostId>h7CIUkznwTIv8tkZqUYYAley8X7YWOmz+cIbekFoVK7qjSaKqiRe3oQjQO7Ex6dZl1MU1zd1ml0=</HostId></Error>
2020/02/17 15:19:12 [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/GetObject failed, attempt 0/5, error NoSuchKey: The specified key does not exist.
status code: 404, request id: B3D46ACAF89898D7, host id: h7CIUkznwTIv8tkZqUYYAley8X7YWOmz+cIbekFoVK7qjSaKqiRe3oQjQO7Ex6dZl1MU1zd1ml0=
2020/02/17 15:19:12 [DEBUG] checking for provider in "."
2020/02/17 15:19:12 [DEBUG] checking for provider in "/usr/local/bin"
2020/02/17 15:19:12 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:12 [DEBUG] found provider "terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:12 [DEBUG] found plugin override in .terraformrc: "aviatrix", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
2020/02/17 15:19:12 [DEBUG] found valid plugin: "aws", "2.49.0", "/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:12 [DEBUG] found valid plugin: "aviatrix", "0.0.0", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
Initializing provider plugins...
2020/02/17 15:19:12 [DEBUG] plugin requirements: "aws"=""
2020/02/17 15:19:12 [DEBUG] plugin requirements: "aviatrix"="2.7.0"
- Checking for available provider plugins...
2020/02/17 15:19:12 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/02/17 15:19:12 [DEBUG] fetching provider versions from "https://registry.terraform.io/v1/providers/-/aviatrix/versions"
2020/02/17 15:19:12 [DEBUG] fetching provider location from "https://registry.terraform.io/v1/providers/terraform-providers/aviatrix/2.7.0/download/linux/amd64"
2020/02/17 15:19:12 [DEBUG] verified GPG signature with key from HashiCorp Security <[email protected]>
- Downloading plugin for provider "aviatrix" (terraform-providers/aviatrix) 2.7.0...
2020/02/17 15:19:12 [DEBUG] getting provider "aviatrix" (terraform-providers/aviatrix) version "2.7.0"
2020/02/17 15:19:12 [DEBUG] plugin cache is disabled, so downloading aviatrix 2.7.0 from https://releases.hashicorp.com/terraform-provider-aviatrix/2.7.0/terraform-provider-aviatrix_2.7.0_linux_amd64.zip?checksum=sha256:e9bc8e79ec1642e293cf96614135957620cb5a29db2a06769e8315dac1416463
2020/02/17 15:19:12 [DEBUG] looking for the aviatrix 2.7.0 plugin we just installed
2020/02/17 15:19:12 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:12 [DEBUG] found provider "terraform-provider-aviatrix_v2.7.0_x4"
2020/02/17 15:19:12 [DEBUG] found provider "terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:12 [DEBUG] all plugins found discovery.PluginMetaSet{discovery.PluginMeta{Name:"aviatrix", Version:"2.7.0", Path:"/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aviatrix_v2.7.0_x4"}:struct {}{}, discovery.PluginMeta{Name:"aws", Version:"2.49.0", Path:"/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.49.0_x4"}:struct {}{}}
2020/02/17 15:19:12 [DEBUG] filtered plugins discovery.PluginMetaSet{discovery.PluginMeta{Name:"aviatrix", Version:"2.7.0", Path:"/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aviatrix_v2.7.0_x4"}:struct {}{}}
2020/02/17 15:19:12 [DEBUG] checking for provider in "."
2020/02/17 15:19:12 [DEBUG] checking for provider in "/usr/local/bin"
2020/02/17 15:19:12 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:12 [DEBUG] found provider "terraform-provider-aviatrix_v2.7.0_x4"
2020/02/17 15:19:12 [DEBUG] found provider "terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:12 [DEBUG] found plugin override in .terraformrc: "aviatrix", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
2020/02/17 15:19:12 [DEBUG] found valid plugin: "aviatrix", "0.0.0", "/home/ec2-user/go/bin/terraform-provider-aviatrix"
2020/02/17 15:19:12 [DEBUG] found valid plugin: "aws", "2.49.0", "/home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:13 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/02/17 15:19:13 [DEBUG] found provider "terraform-provider-aviatrix_v2.7.0_x4"
2020/02/17 15:19:13 [DEBUG] found provider "terraform-provider-aws_v2.49.0_x4"
2020/02/17 15:19:13 [DEBUG] Purged unused aviatrix plugin /home/ec2-user/environment/admin_aviatrix/infrastructure/.terraform/plugins/linux_amd64/terraform-provider-aviatrix_v2.7.0_x4
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.aws: version = "~> 2.49"
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment