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 to retrieve repo environment public key #2369

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tiberium
Copy link

Resolves: Lack of a data source delivering a Public Key of a Repo's Environment


Before the change?

Not possible to retrieve the Public Key of a Environment in a Repository.

After the change?

Brand new data source delivering a Public Key created automatically by GitHub when a new Environment is created in a Repository.

  • Retrieving the organization public key, repository public key, user public key, dependabot public key and codespaces public key are already implemented. This PR brings the lacking Environment Public Key.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

No breaking changes introduced.

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

In addition to the trivially fixed failing check, I'm getting an error when running the introduced integration test:

  | Error running apply: exit status 1
  | 
  | Error: Incorrect attribute value type
  | 
  |   on terraform_plugin_test.tf line 14, in data "github_actions_environment_public_key" "test":
  |   14: \t\t\t\trepository_id\t= github_repository.test.id
  |     ├────────────────
  |     │ github_repository.test.id is "tf-acc-test-36mpg"
  | 
  | Inappropriate value for attribute "repository_id": a number is required.

Can you reproduce that?

@tiberium
Copy link
Author

tiberium commented Sep 5, 2024

Hi @kfcampbell ,
sorry for the failing test, should work now. I added 2 new commits: one for the typo in docs, second one addressing the failing test. Should I squash everything into one commit and force-push here?

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.

2 participants