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

Projects data source e2e tests #2154

Merged

Conversation

dibaskar-google
Copy link
Contributor


Checklist

I applicable, I acknowledge that I have:

  • [X ] Read the contributing guide
  • [X ] Ran terraform fmt on all modified files
  • [ X] Regenerated the relevant README.md files using tools/tfdoc.py
  • [ X] Made sure all relevant tests pass

@wiktorn
Copy link
Collaborator

wiktorn commented Mar 15, 2024

Thanks Dinesh, all tests fail due to Cloud Asset API not enabled:

E   tftest.TerraformTestError: ('Error running command apply: 1 module.my-org.data.google_cloud_asset_resources_search_all.projects: Reading...
 
Error: Error searching resources: googleapi: Error 403: Cloud Asset API has not been used in project *** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudasset.googleapis.com/overview?project=*** then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.Help",
    "links": [
      {
        "description": "Google developers console API activation",
        "url": "https://console.developers.google.com/apis/api/cloudasset.googleapis.com/overview?project=***"
      }
    ]
  },
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/***",
      "service": "cloudasset.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }

Can you add this service to setup module?

@dibaskar-google
Copy link
Contributor Author

Thanks again Wiktor for reviewing this one. I got rid of this error in my lab by enabling cloud asset api for the quota project not the one which are created by tests.

FYI, i fixed only e2e tests for this module as it uses data source.

@wiktorn
Copy link
Collaborator

wiktorn commented Mar 15, 2024

Thanks again Wiktor for reviewing this one. I got rid of this error in my lab by enabling cloud asset api for the quota project not the one which are created by tests.

Ah, good catch, let me rerun with API enabled in quota project.

@wiktorn wiktorn merged commit 11b9319 into GoogleCloudPlatform:master Mar 15, 2024
9 checks passed
@ludoo ludoo added the on:tools New or changed tool label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on:tools New or changed tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants