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

Unable to setup FLINT cloud on GCP #105

Open
Namyalg opened this issue May 3, 2022 · 12 comments
Open

Unable to setup FLINT cloud on GCP #105

Namyalg opened this issue May 3, 2022 · 12 comments
Assignees
Labels

Comments

@Namyalg
Copy link
Member

Namyalg commented May 3, 2022

I am following the steps to setup FLINT cloud on GCP. I have :

In step 3 : In main.tf, change the project variable to your project ID. Change any other variables if necessary.

What are the other variables needed to be changed ?
Error might be due to this

Variation 1

  1. Created a service account with Owner permissions
  2. Replace the project id with my project id
  3. Run terraform apply

The following is the result:

  1. The Storage and Pub/Sub resources are created as expected
google_cloud_run_service.fc-ingress: Still creating... [19m10s elapsed]
google_cloud_run_service.fc-cr-processor: Still creating... [19m20s elapsed]
google_cloud_run_service.fc-ingress: Still creating... [19m20s elapsed]
google_cloud_run_service.fc-cr-processor: Still creating... [19m30s elapsed]
google_cloud_run_service.fc-ingress: Still creating... [19m30s elapsed]
google_cloud_run_service.fc-cr-processor: Still creating... [19m40s elapsed]
google_cloud_run_service.fc-ingress: Still creating... [19m40s elapsed]
google_cloud_run_service.fc-cr-processor: Still creating... [19m50s elapsed]
google_cloud_run_service.fc-ingress: Still creating... [19m50s elapsed]

│ Error: Error creating Service: googleapi: Error 409: Resource 'fc-ingress' already exists.
│
│   with google_cloud_run_service.fc-ingress,
│   on main.tf line 133, in resource "google_cloud_run_service" "fc-ingress":
│  133: resource "google_cloud_run_service" "fc-ingress" {
│
╵
╷
│ Error: Error creating Service: googleapi: Error 409: Resource 'fc-cr-processor' already exists.
│
│   with google_cloud_run_service.fc-cr-processor,
│   on main.tf line 190, in resource "google_cloud_run_service" "fc-cr-processor":
│  190: resource "google_cloud_run_service" "fc-cr-processor" {
│
╵
╷
│ Error: Error creating Subscription: googleapi: Error 409: Resource already exists in the project (resource=large-simulations-sub).
│
│   with google_pubsub_subscription.large-simulations-sub,
│   on main.tf line 268, in resource "google_pubsub_subscription" "large-simulations-sub":
│  268: resource "google_pubsub_subscription" "large-simulations-sub" { 

Variation 2

  1. Created a service account with Owner permissions
  2. Replace the project id with my project id
  3. Replace the account id of the newly created service account
  4. Run terraform apply
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.ResourceInfo",
│     "resourceName": "projects/moja-global/serviceAccounts/[email protected]"
│   }
│ ]
│ , alreadyExists
│
│   with google_service_account.fc-sa,
│   on main.tf line 81, in resource "google_service_account" "fc-sa":
│   81: resource "google_service_account" "fc-sa" {
│
╵
╷
│ Error: Error creating Subscription: googleapi: Error 409: Resource already exists in the project (resource=large-simulations-sub).
│
│   with google_pubsub_subscription.large-simulations-sub,
│   on main.tf line 268, in resource "google_pubsub_subscription" "large-simulations-sub":
│  268: resource "google_pubsub_subscription" "large-simulations-sub" {
@arnav-t
Copy link
Member

arnav-t commented May 3, 2022

These errors seem to be because the resources are already created. Did you maybe create them yourself or terminate the "terraform apply" command previously while it was processing?
I would try "terraform destroy" a few times to remove these resources first, if that doesn't fix the issue than manually destroying these resources surely will.

@Namyalg
Copy link
Member Author

Namyalg commented May 3, 2022

Yes, I have destroyed the resources
Do I have to follow method 1 or 2 ?

@arnav-t
Copy link
Member

arnav-t commented May 3, 2022

Use the first method.
The "flint-cloud-sa" service account is meant to be internal, completely managed by terraform. Make sure you named your project owner service account something else.

@Namyalg
Copy link
Member Author

Namyalg commented May 3, 2022

okay, I'll try it again
The resources allocated are

  • Storage
  • Pub/Sub
  • service account

Am I missing anything ?

@arnav-t
Copy link
Member

arnav-t commented May 3, 2022

There could be more not showing up in the error but you can start by getting rid of those first.

@Namyalg
Copy link
Member Author

Namyalg commented May 3, 2022

I'm unable to identify which resources these point to

Error: Error creating Service: googleapi: Error 409: Resource 'fc-ingress' already exists.
│
│   with google_cloud_run_service.fc-ingress,
│   on main.tf line 133, in resource "google_cloud_run_service" "fc-ingress":
│  133: resource "google_cloud_run_service" "fc-ingress" {
│
╵
╷
│ Error: Error creating Service: googleapi: Error 409: Resource 'fc-cr-processor' already exists.
│
│   with google_cloud_run_service.fc-cr-processor,
│   on main.tf line 190, in resource "google_cloud_run_service" "fc-cr-processor":
│  190: resource "google_cloud_run_service" "fc-cr-processor" {```

This has been deleted prior terraform apply, but still throws an error

╷
│ Error: Error creating Subscription: googleapi: Error 409: Resource already exists in the project (resource=large-simulations-sub).
│
│   with google_pubsub_subscription.large-simulations-sub,
│   on main.tf line 268, in resource "google_pubsub_subscription" "large-simulations-sub":
│  268: resource "google_pubsub_subscription" "large-simulations-sub" {```

@arnav-t
Copy link
Member

arnav-t commented May 5, 2022

Delete the pubsub subscription "large-simulations-sub" as well.

@Namyalg
Copy link
Member Author

Namyalg commented May 6, 2022

I have ensured the storage bucket simulation_data_flint-cloud, pub-sub resources small-simulations and large-simulations, and the service account flint-cloud-sa are deleted, but still face the same error.

@arnav-t
Copy link
Member

arnav-t commented May 6, 2022

simulation_data_flint-cloud bucket? That was supposed to have been phased out by fixing #38
I see the PR for it still hasn't been merged yet. That must be the cause for the issue you're facing. A temporary fix to check if this is indeed the root cause would be to destroy the resources in @iamrajiv 's GCP project and then try again. However, ideally we'd want his PR to be tested and merged ultimately.

@Namyalg
Copy link
Member Author

Namyalg commented May 6, 2022

Alright.
Are you referring to @iamrajiv 's fork ?

@arnav-t
Copy link
Member

arnav-t commented May 6, 2022

I'm talking about his GCP project. I believe he made one while working on the aforementioned PR.

@Namyalg
Copy link
Member Author

Namyalg commented May 6, 2022

Okay 👍🏻

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

No branches or pull requests

5 participants