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

Create resource to set repository allow list for organisation secret #882

Conversation

xun-guo-anzx
Copy link
Contributor

@xun-guo-anzx xun-guo-anzx commented Aug 18, 2021

Create resource to set repository allow list for organisation secret

  • Only applicable when secret access is "selected"
  • Not recommended to use along with existing github_actions_organization_secret resource on the same secret
  • Create/update the resource will override secret's existing repository allowlist
  • Destroy the resource will clear secret's existing repository allowlist
  • Can be used when secret value is set externally
  • Update go-github version to v38.1.0, which is required by the destroy functionality of the new resource. Release info 1

API changes includes:

  • Add ListOptions required by GetCommit method. As described in change 2
  • Add followRedirects required by GetBranch method and set it to false as start point. As described in change 3

@patrickmarabeas
Copy link
Contributor

@jcudit this should be a straightforward feature add, let us know if this aligns.

@jcudit
Copy link
Contributor

jcudit commented Aug 31, 2021

Thanks for getting 1b9e53c published. We'd like to ship that separate from this PR and aim to do so in one of our upcoming releases.

As for 8989cf7, we'd need the following additions to ship:

  • updates to documentation (resource documentation, linking to the docs from website.erb)
  • the resource itself looks 👌🏾 but it seems to be missing plumbing to connect the new additions to ResourcesMap and DataSourcesMap in provider.go

Happy to run through testing once the above obstacles are cleared. 👍🏾 for getting this feature shipped when ready!

@jcudit jcudit added this to the v4.15.0 milestone Aug 31, 2021
@xun-guo-anzx
Copy link
Contributor Author

Thanks @jcudit - will let you know once I get those additional changes sorted out.

@xun-guo-anzx xun-guo-anzx force-pushed the resource-github-actions-organisation-secret-repository branch 2 times, most recently from 417c670 to e028503 Compare September 6, 2021 02:38
@xun-guo-anzx
Copy link
Contributor Author

xun-guo-anzx commented Sep 6, 2021

PR updated - replacing original commits with two new commits.

For 1b9e53c, it accidentally includes the addition of new resource in ResourceMap - so I removed it from this commit and make it purely for go-github version update. See 1891e8b

For 8989cf7, two new things are added in new commit e028503:

  • The addition of new resource in ResourceMap in provider.go
  • Resource documentation and links in website/github.erb

@jcudit
Copy link
Contributor

jcudit commented Sep 12, 2021

We've added the go-github version update over in #901. Can we get the conflicts removed on this one? Otherwise 👌🏾 with the changes so far.

* Only applicable when secret access is "selected"
* Create/update the resource will override secret's existing repository allowlist
* Destroy the resource will clear secret's existing repository allowlist
* Can be used when secret value is set externally
@xun-guo-anzx xun-guo-anzx force-pushed the resource-github-actions-organisation-secret-repository branch from e028503 to f05ae3f Compare September 12, 2021 23:43
@xun-guo-anzx
Copy link
Contributor Author

Thanks @jcudit , I've resolved the conflicts and limit the changes on this PR to only adding the new resource.

@jcudit jcudit merged commit d80ff81 into integrations:main Sep 13, 2021
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
…ntegrations#882)

* Only applicable when secret access is "selected"
* Create/update the resource will override secret's existing repository allowlist
* Destroy the resource will clear secret's existing repository allowlist
* Can be used when secret value is set externally
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.

3 participants