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

Feat: add data source for getting a list of Cloud Credentials #375

Merged
merged 2 commits into from
May 16, 2022

Conversation

TomerHeber
Copy link
Collaborator

Issue & Steps to Reproduce / Feature Request

resolves #358

Solution

Added the new data source.
Added acceptance tests.
Added integration tests.
Added example.

"credential_type": {
Type: schema.TypeString,
Description: "the type of cloud credential to filter by " + allowedCredentialTypesStr,
Optional: true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

setting to optional incases where someone (for some reason) wants to get all the credentials regardless of type.

Comment on lines +4 to +7
required_providers {
env0 = {
source = "terraform-registry.env0.com/env0/env0"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a new thing or am I wrong? I mean, shouldn't the integration tests use the local version and not the version from the public registry?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes. This is my bad.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yaronya - actually looking at it again. This is not new. All tests are like this.
I guess it's somehow working as expected...

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the real registry (terraform-registry.env0.com doesn't exist).
This is set up in buildFakeTerraformRegistry in harness.go

Copy link
Contributor

@avnerenv0 avnerenv0 left a comment

Choose a reason for hiding this comment

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

👍

@github-actions github-actions bot added ready to merge PR approved - can be merged once the PR owner is ready and removed pending final review labels May 16, 2022
@TomerHeber TomerHeber merged commit 3bbbc80 into main May 16, 2022
@TomerHeber TomerHeber deleted the feat-data-source-list-of-credentials-#358 branch May 16, 2022 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples feature integration-tests provider ready to merge PR approved - can be merged once the PR owner is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add data source for getting a list of Cloud Credentials
3 participants