-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TF import GCP backend_service #6786
Comments
@robertrockjr can you verify the name of the backend-services? What do you see |
Hey, Edward.
Thanks for the quick response. Here is the result of gcloud compute
backend-services list
NAME BACKENDS
PROTOCOL
rstudio-connect-tcp-ilb us-central1-a/instanceGroups/connect-uig
TCP
Here is the json from the same command:
[
{
"backends": [
{
"balancingMode": "CONNECTION",
"description": "",
"failover": false,
"group": "
https://www.googleapis.com/compute/v1/projects/asc-ahnat-rstudio-team-prd/zones/us-central1-a/instanceGroups/connect-uig
"
}
],
"connectionDraining": {
"drainingTimeoutSec": 300
},
"creationTimestamp": "2020-07-09T08:56:25.227-07:00",
"description": "",
"fingerprint": "S3OlGfIjYi0=",
"healthChecks": [
"
https://www.googleapis.com/compute/v1/projects/asc-ahnat-rstudio-team-prd/global/healthChecks/rstudio-connect-tcp-ilb-hc
"
],
"id": "1848053231971369158",
"kind": "compute#backendService",
"loadBalancingScheme": "INTERNAL",
"name": "rstudio-connect-tcp-ilb",
"protocol": "TCP",
"region": "
https://www.googleapis.com/compute/v1/projects/asc-ahnat-rstudio-team-prd/regions/us-central1
",
"selfLink": "
https://www.googleapis.com/compute/v1/projects/asc-ahnat-rstudio-team-prd/regions/us-central1/backendServices/rstudio-connect-tcp-ilb
",
"sessionAffinity": "CLIENT_IP_PORT_PROTO",
"timeoutSec": 30
}
]
…On Mon, Jul 13, 2020 at 4:30 PM Edward Sun ***@***.***> wrote:
@robertrockjr
<https://clicktime.symantec.com/3G7f6jBJuFQqWpJZLQGSkA37Vc?u=https%3A%2F%2Fgit.luolix.top%2Frobertrockjr>
can you verify the name of the backend-services? What do you see gcloud
compute backend-services list?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://clicktime.symantec.com/32j5jA9X3q3FMRR7ye17Qus7Vc?u=https%3A%2F%2Fgit.luolix.top%2Fterraform-providers%2Fterraform-provider-google%2Fissues%2F6786%23issuecomment-657777353>,
or unsubscribe
<https://clicktime.symantec.com/32DtqcSA7omRfWXKXctEkKi7Vc?u=https%3A%2F%2Fgit.luolix.top%2Fnotifications%2Funsubscribe-auth%2FAQIV3EE5SLIP2L76U5DM4FDR3NVGLANCNFSM4OYYT5XQ>
.
--
PTO: 7/16 - 7/27
Warm Regards,
Robert (Bob) Rock
Cloud Strategy & Services - Cloud Engineer
Ascension Technologies
(989) 513-0772
CONFIDENTIALITY NOTICE: This email message and any accompanying data or files is confidential and may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately. Receipt by anyone other than the named recipient(s) is not a waiver of any attorney-client, work product, or other applicable privilege.
|
@robertrockjr Can you run |
$ terraform import google_compute_backend_service.default
us-central1-a/instanceGroups/connect-uig
google_compute_backend_service.default: Importing from ID
"us-central1-a/instanceGroups/connect-uig"...
google_compute_backend_service.default: Import prepared!
Prepared google_compute_backend_service for import
google_compute_backend_service.default: Refreshing state...
[id=projects/us-central1-a/global/backendServices/instanceGroups]
Error: Cannot import non-existent remote object
While attempting to import an existing object to
google_compute_backend_service.default, the provider detected that no object
exists with the given id. Only pre-existing objects can be imported; check
that the id is correct and that it is associated with the provider's
configured region or endpoint, or use "terraform apply" to create a new
remote
object for this resource.
…On Mon, Jul 13, 2020 at 4:40 PM Edward Sun ***@***.***> wrote:
@robertrockjr
<https://clicktime.symantec.com/35m6d8jajxo9mNjBmLRkpPm7Vc?u=https%3A%2F%2Fgit.luolix.top%2Frobertrockjr>
Can you run
$ terraform import google_compute_backend_service.default
us-central1-a/instanceGroups/connect-uig
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://clicktime.symantec.com/39mccG2ELcFVZzsQv1ysZvJ7Vc?u=https%3A%2F%2Fgit.luolix.top%2Fterraform-providers%2Fterraform-provider-google%2Fissues%2F6786%23issuecomment-657782307>,
or unsubscribe
<https://clicktime.symantec.com/3Mw86sYhgnHeDJBFxigY96R7Vc?u=https%3A%2F%2Fgit.luolix.top%2Fnotifications%2Funsubscribe-auth%2FAQIV3EFAJZRRSS77ZIPAB2LR3NWL7ANCNFSM4OYYT5XQ>
.
--
PTO: 7/16 - 7/27
Warm Regards,
Robert (Bob) Rock
Cloud Strategy & Services - Cloud Engineer
Ascension Technologies
(989) 513-0772
CONFIDENTIALITY NOTICE: This email message and any accompanying data or files is confidential and may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately. Receipt by anyone other than the named recipient(s) is not a waiver of any attorney-client, work product, or other applicable privilege.
|
Try this |
Same error.
…On Mon, Jul 13, 2020 at 6:08 PM Edward Sun ***@***.***> wrote:
Try this
'$ terraform import google_compute_backend_service.default
projects/asc-ahnat-rstudio-team-prd/regions/us-central1/backendServices/rstudio-connect-tcp-ilb'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://clicktime.symantec.com/346gw4mvUZTAYXBY5S4f2bu7Vc?u=https%3A%2F%2Fgit.luolix.top%2Fterraform-providers%2Fterraform-provider-google%2Fissues%2F6786%23issuecomment-657817723>,
or unsubscribe
<https://clicktime.symantec.com/3X4Bn8J3q2JFgbAYtRTqXR77Vc?u=https%3A%2F%2Fgit.luolix.top%2Fnotifications%2Funsubscribe-auth%2FAQIV3EFLIHVDSTTCH74E5ILR3OAVPANCNFSM4OYYT5XQ>
.
--
PTO: 7/16 - 7/27
Warm Regards,
Robert (Bob) Rock
Cloud Strategy & Services - Cloud Engineer
Ascension Technologies
(989) 513-0772
CONFIDENTIALITY NOTICE: This email message and any accompanying data or files is confidential and may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately. Receipt by anyone other than the named recipient(s) is not a waiver of any attorney-client, work product, or other applicable privilege.
|
You may use |
Great. I am glad it works for you. Closing the issue then |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.12.28
Affected Resource(s)
google_compute_backend_service
Terraform Configuration Files
Debug Output
$ tf import google_compute_backend_service.default 1848053231971369158
google_compute_backend_service.default: Importing from ID "rstudio-connect-tcp-ilb"...
google_compute_backend_service.default: Import prepared!
Prepared google_compute_backend_service for import
google_compute_backend_service.default: Refreshing state... [id=projects/asc-ahnat-rstudio-team-prd/global/backendServices/rstudio-connect-tcp-ilb]
Error: Cannot import non-existent remote object
While attempting to import an existing object to
google_compute_backend_service.default, the provider detected that no object
exists with the given id. Only pre-existing objects can be imported; check
that the id is correct and that it is associated with the provider's
configured region or endpoint, or use "terraform apply" to create a new remote
object for this resource.
Panic Output
Expected Behavior
I would expect the resource would be imported into the state file.
Actual Behavior
Error: Cannot import non-existent remote object
While attempting to import an existing object to
google_compute_backend_service.default, the provider detected that no object
exists with the given id. Only pre-existing objects can be imported; check
that the id is correct and that it is associated with the provider's
configured region or endpoint, or use "terraform apply" to create a new remote
object for this resource.
Steps to Reproduce
Important Factoids
References
$ terraform import google_compute_backend_service.default projects/{{project}}/global/backendServices/{{name}}
$ terraform import google_compute_backend_service.default {{project}}/{{name}}
$ terraform import google_compute_backend_service.default {{name}}
The text was updated successfully, but these errors were encountered: