Created
August 8, 2019 12:03
-
-
Save knl/fe92e317f0e707e77e7902a7667538a4 to your computer and use it in GitHub Desktop.
terraform-import-chomp-newlines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TF_LOG=debug terraform import secret_resource.newlines "$(cat file_ending_with_newline)" | |
2019/08/08 14:02:04 [INFO] Terraform version: 0.12.6 | |
2019/08/08 14:02:04 [INFO] Go runtime version: go1.12.7 | |
2019/08/08 14:02:04 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "secret_resource.newlines", "some\ntext"} | |
2019/08/08 14:02:04 [DEBUG] Attempting to open CLI config file: /Users/knl/.terraformrc | |
2019/08/08 14:02:04 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2019/08/08 14:02:04 [INFO] CLI command args: []string{"import", "secret_resource.newlines", "some\ntext"} | |
2019/08/08 14:02:04 [DEBUG] New state was assigned lineage "e3e0d021-6915-c30b-bca1-5fb5122e7814" | |
2019/08/08 14:02:04 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) | |
2019/08/08 14:02:04 [TRACE] Meta.Backend: instantiated backend of type <nil> | |
2019/08/08 14:02:04 [DEBUG] checking for provider in "." | |
2019/08/08 14:02:04 [DEBUG] checking for provider in "/usr/local/bin" | |
2019/08/08 14:02:04 [DEBUG] checking for provider in "terraform.d/plugins/darwin_amd64" | |
2019/08/08 14:02:04 [WARN] found legacy provider "terraform-provider-secret" | |
2019/08/08 14:02:04 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64" | |
2019/08/08 14:02:04 [DEBUG] found valid plugin: "secret", "0.0.0", "/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret" | |
2019/08/08 14:02:04 [DEBUG] checking for provisioner in "." | |
2019/08/08 14:02:04 [DEBUG] checking for provisioner in "/usr/local/bin" | |
2019/08/08 14:02:04 [DEBUG] checking for provisioner in "terraform.d/plugins/darwin_amd64" | |
2019/08/08 14:02:04 [DEBUG] checking for provisioner in ".terraform/plugins/darwin_amd64" | |
2019-08-08T14:02:04.660+0200 [INFO] plugin: configuring client automatic mTLS | |
2019-08-08T14:02:04.682+0200 [DEBUG] plugin: starting plugin: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret args=[/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret] | |
2019-08-08T14:02:04.684+0200 [DEBUG] plugin: plugin started: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret pid=21694 | |
2019-08-08T14:02:04.684+0200 [DEBUG] plugin: waiting for RPC address: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret | |
2019-08-08T14:02:04.702+0200 [INFO] plugin.terraform-provider-secret: configuring server automatic mTLS: timestamp=2019-08-08T14:02:04.702+0200 | |
2019-08-08T14:02:04.729+0200 [DEBUG] plugin: using plugin: version=5 | |
2019-08-08T14:02:04.729+0200 [DEBUG] plugin.terraform-provider-secret: plugin address: address=/var/folders/1s/pj0fjsyd6qgb3j166jczwcjh0000gn/T/plugin916898021 network=unix timestamp=2019-08-08T14:02:04.729+0200 | |
2019-08-08T14:02:04.780+0200 [DEBUG] plugin: plugin process exited: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret pid=21694 | |
2019-08-08T14:02:04.780+0200 [DEBUG] plugin: plugin exited | |
2019/08/08 14:02:04 [DEBUG] ReferenceTransformer: "secret_resource.newlines" references: [] | |
2019/08/08 14:02:04 [DEBUG] ReferenceTransformer: "secret_resource.newlines (import id \"some\\ntext\")" references: [] | |
2019/08/08 14:02:04 [DEBUG] ReferenceTransformer: "provider.secret" references: [] | |
2019/08/08 14:02:04 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes) | |
2019/08/08 14:02:04 [TRACE] Executing graph transform *terraform.CloseProviderTransformer | |
2019-08-08T14:02:04.781+0200 [INFO] plugin: configuring client automatic mTLS | |
2019-08-08T14:02:04.803+0200 [DEBUG] plugin: starting plugin: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret args=[/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret] | |
2019-08-08T14:02:04.807+0200 [DEBUG] plugin: plugin started: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret pid=21695 | |
2019-08-08T14:02:04.807+0200 [DEBUG] plugin: waiting for RPC address: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret | |
2019-08-08T14:02:04.822+0200 [INFO] plugin.terraform-provider-secret: configuring server automatic mTLS: timestamp=2019-08-08T14:02:04.821+0200 | |
2019-08-08T14:02:04.847+0200 [DEBUG] plugin: using plugin: version=5 | |
2019-08-08T14:02:04.847+0200 [DEBUG] plugin.terraform-provider-secret: plugin address: address=/var/folders/1s/pj0fjsyd6qgb3j166jczwcjh0000gn/T/plugin192189626 network=unix timestamp=2019-08-08T14:02:04.847+0200 | |
secret_resource.newlines: Importing from ID "some\ntext"... | |
secret_resource.newlines: Import prepared! | |
Prepared secret_resource for import | |
secret_resource.newlines: Refreshing state... [id=-] | |
2019-08-08T14:02:04.901+0200 [DEBUG] plugin: plugin process exited: path=/tmp/terraform-bug/terraform.d/plugins/darwin_amd64/terraform-provider-secret pid=21695 | |
2019-08-08T14:02:04.901+0200 [DEBUG] plugin: plugin exited | |
2019/08/08 14:02:04 [INFO] Writing state output to: | |
Import successful! | |
The resources that were imported are shown above. These resources are now in | |
your Terraform state and will henceforth be managed by Terraform. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment