Skip to content

Add support for openstack provider (#1103) - #2040

Merged
nimrodkor merged 1 commit into
bridgecrewio:masterfrom
pascal-hofmann:feat/openstack
Dec 1, 2021
Merged

nimrodkor merged 1 commit into
bridgecrewio:masterfrom
pascal-hofmann:feat/openstack

Conversation

@pascal-hofmann

Copy link
Copy Markdown
Contributor

This PR adds support for openstack and closes #1103.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pascal-hofmann pascal-hofmann changed the title Add support for openstack provider (#1103) Draft: Add support for openstack provider (#1103) Dec 1, 2021
@pascal-hofmann pascal-hofmann changed the title Draft: Add support for openstack provider (#1103) Add support for openstack provider (#1103) Dec 1, 2021
@pascal-hofmann

Copy link
Copy Markdown
Contributor Author

There were some bogus / missing tests. These are fixed / added now. Ready for review.

@gruebel gruebel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the great addition 🚀, I just found some minor things

Comment thread checkov/terraform/checks/provider/openstack/credentials.py Outdated
@nimrodkor
nimrodkor merged commit 265fecb into bridgecrewio:master Dec 1, 2021
@nimrodkor

Copy link
Copy Markdown
Contributor

thanks @pascal-hofmann !!

@pascal-hofmann

pascal-hofmann commented Dec 1, 2021 •

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review/merge!

@pascal-hofmann
pascal-hofmann deleted the feat/openstack branch December 1, 2021 13:59
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2021
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2021
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2021
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2021
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2021
@MindTooth

Copy link
Copy Markdown

It's great to see OpenStack support, but saying that no hardcoded value is somewhat lacking and then not provide the best approach.

My use case is that I use a variable that's exported via an environment variable or a terraform.tfvars. Meaning, no hardcoded value exists. application_credential_secret = var.os_application_credential_secret is not hardcoded, IMHO. If this is not enough, I'm eager to learn why.


I want to be absolutely clear, I love that OpenStack is supported. I work with OS almost daily. Thank you. 👍🏻

@gruebel

gruebel commented Dec 13, 2021

Copy link
Copy Markdown
Contributor

@MindTooth great question, you can expose them through plain old environment variables and don't need to reference them in the provider

  • token -> OS_TOKEN or OS_AUTH_TOKEN
  • password -> OS_PASSWORD
  • application_credential_secret -> OS_APPLICATION_CREDENTIAL_SECRET fun fact this is not documented in the Terraform provider, but I took a look into source code 😄

I hope that helps 🙂

@MindTooth

Copy link
Copy Markdown

Just wanted to drop by and let you know that the following works great:

  • OS_AUTH_TYPE=v3applicationcredential
  • OS_AUTH_URL=
  • OS_APPLICATION_CREDENTIAL_ID=
  • OS_APPLICATION_CREDENTIAL_SECRET=

I've converted almost all my projects to use only these. Note! Important that no other OS_ variables are set. As application credentials are scoped, they only work for one project. Also, this removes the need for a provider "openstack" {} block.

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

Successfully merging this pull request may close these issues.

Terraform scan - OpenStack provider ?

5 participants