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

GCP Support #2

Open
asyd opened this issue Mar 6, 2020 · 3 comments
Open

GCP Support #2

asyd opened this issue Mar 6, 2020 · 3 comments

Comments

@asyd
Copy link

asyd commented Mar 6, 2020

Hello Jan-Christoph, it's me again :)

Have you planned to support others providers than aws, like GCP by chance?

Cheers

@jckuester jckuester changed the title GCE Support GCP Support Mar 6, 2020
@jckuester
Copy link
Owner

jckuester commented Mar 6, 2020

Hi @asyd.

I am happy to support GCP, but I'd appreciate some information about the GCP provider from you, since I haven't used GCP yet really:

  1. I have seen there is google and google-beta (https://www.terraform.io/docs/providers/google/index.html), do you need both?

  2. What parameters (credentials, region, etc) are required to configure the GCP provider? I'd like to make those configurable via environment variables for now (for AWS those environment variables are, as mentioned in the README, for example, AWS_PROFILE, AWS_DEFAULT_REGION, etc.

@asyd
Copy link
Author

asyd commented Mar 7, 2020

  1. At this moment google will be enough for me
  2. A project_id (can be an environment variable), and a credentials file (usually a JSON one)

Thanks @jckuester

@jckuester
Copy link
Owner

jckuester commented Mar 9, 2020

FYI, I opened PR #3, but it's not working for me, yet.

When I run GOOGLE_REGION=us-central1 GOOGLE_CREDENTIALS=some-credentials.json terradozer -debug terraform.tfstate, I get

   • READING STATE    
      • using state                                        file=test/test-fixtures/single-resource-gcp/terraform.tfstate
      • providers found in state                           addresses=[provider.google]
      • downloaded and installed provider                  name=google version=3.11.0
      • configured provider                                name=google version=3.11.0
      • looked up resource instance address                absolute_address=google_compute_network.vpc_network
   • SHOWING RESOURCES THAT WOULD BE DELETED (DRY RUN)
      • start distributing resources to workers for this run
      • worker starts deleting resource                    id=projects/terradozer-acc-test/global/networks/terraform-network type=google_compute_network worker_id=10
      • unable to delete resource                          error=failed to read current state of resource: Error reading ComputeNetwork "projects/terradozer-acc-test/global/networks/terraform-network": Get projects/terradozer-acc-test/global/networks/terraform-network?alt=json: unsupported protocol scheme "" id=projects/terradozer-acc-test/global/networks/terraform-network type=google_compute_network
   • ALL RESOURCES HAVE ALREADY BEEN DELETED

Not sure what's missing yet...

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

No branches or pull requests

2 participants