hashicorp / terraform-provider-bitbucket

This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://registry.terraform.io
Mozilla Public License 2.0
31 stars 106 forks source link

Feature request: Pipelines settings and repository variables #38

Closed KimSamba closed 4 years ago

KimSamba commented 5 years ago

Hi there,

It would be nice to be able to set pipelines for a bunch of projects (pretty useful when a lot of repo needs AWS keys, npm token etc...).

It would be awesome because currently, this must be done manually, and could be nicely automated with Terraform (AWS SSM to inject into BP, integration test where i need to configure the endpoint, which could be easily used updated from terraform output etc.)

Terraform Version

v0.12.2

hronix commented 4 years ago

Yes, please

tdi commented 4 years ago

Hi - I am working on a PR for this but bitbucket API has not offered this functionality (yeah hard to believe right?). However, according to this issue https://jira.atlassian.com/browse/BCLOUD-18164 - somebody has discovered some hidden endpoint for it. I will investingate this over the following weeks and try to get back here.

KimSamba commented 4 years ago

How about this endpoint? https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/environments/ This is for environment variables

tdi commented 4 years ago

Environment variables I have ready. Same for ssh keys. Give me some time to prepare a PR for env only.

tdi commented 4 years ago

hi see #41 . I added repository variables and enabling pipelines in repo.

tdi commented 4 years ago

Unfortunatelly I used the wrong API endpoint that at the time of writing the software worked. https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/ and https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-workspaces/