terraform-provider-looker icon indicating copy to clipboard operation
terraform-provider-looker copied to clipboard

WIP: Implement looker_project and more

Open lukas-at-harren opened this issue 3 years ago • 11 comments

I added the following resources:

  • looker_project
  • looker_project_git_deploy_key
  • looker_project_git_repository

Those allow to setup Looker projects and git configuration. In order for them to work properly, I had to fix the looker SDK (See also: https://github.com/looker-open-source/sdk-codegen/pull/912).

Please only merge after:

  • [ ] Looker SDK has merged my fix upstream
  • [ ] This provider is updated to the latest SDK
  • [ ] The additions have been reviewed and tested by more people than me

––

Of course adding projects via Terraform is not without issues. Besides the bug in the golang looker API client, there are some issues with the Looker API itself.

One is, that the API does not support deleting projects. => I solved this by issuing a warning to the user of the resource.

Another is, that the API client session must be forced into "dev"-mode in order to create projects. => That I am currently still testing. => One suggestion I have, if this turns out to be a major hassle, is to allow for a "workspace_id" configuration at the provider level. That way, the user could configure two looker providers, one per workspace_id (production, dev) and this problem would also be solved.

Adding a git-repository to a Looker project is a major hassle. => I attempt to solve this by having separate resources dealing with the git deploy key and the git repository configuration of a project. This way, a user of the resources can create a proper dependency graph creating a deploy key and assigning the deploy key to a Github project via the terraform github provider.

lukas-at-harren avatar Nov 24 '21 23:11 lukas-at-harren