• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      It would be great to have an official Terraform provider for Bitbucket cloud

            [BCLOUD-21102] Create offical Terraform provider

            Hi all,
             for all that are interested, I'm the creator of app https://marketplace.atlassian.com/apps/1235202/planapply-for-jira-cloud?hosting=cloud&tab=overview

            It is wrapping Atlassian Jira cloud API in Terraform provider. Also I've added a few features that helps to visualize the connections between the imported resources.

            I'm currently working on creation of Confluence and Bitbucket providers as well as corresponding apps soon, so it would be great to gather some feedback around this app and improve those the are upcoming.

            Marcin Olszewski added a comment - Hi all,  for all that are interested, I'm the creator of app https://marketplace.atlassian.com/apps/1235202/planapply-for-jira-cloud?hosting=cloud&tab=overview It is wrapping Atlassian Jira cloud API in Terraform provider. Also I've added a few features that helps to visualize the connections between the imported resources. I'm currently working on creation of Confluence and Bitbucket providers as well as corresponding apps soon, so it would be great to gather some feedback around this app and improve those the are upcoming.

            They can't do that because the API is truncated.  You can't create a user, you can't get any information about the user, etc.

            Konstantin Frank added a comment - They can't do that because the API is truncated.  You can't create a user, you can't get any information about the user, etc.

            John Kelly added a comment - - edited

            Per a previous comment we currently have to manually run a plan/apply using —target in order to get around this limitation.

            It looks like we’re using the following provider and we started using it a few months before Hashi archived the project. 😞 

            https://github.com/hashicorp/terraform-provider-bitbucket/blob/master/README.md

            We’d obviously prefer to move to an official Atlassian provider (as the other providers we use all have official providers), but would likely be happy with the DrFaust92 provider mentioned earlier since it seems to be well maintained. Unfortunately migrating to a different provider is likely to stay in the backburner since we’re likely to run into this rate limit there as well.

            (Also, forgive the double user. I try to open support tickets with my work account and forum requests/comments under my personal account. Kelly/Keippel are both me, though I seem to have crossed accounts at some point.)

             

            John Kelly added a comment - - edited Per a previous comment we currently have to manually run a plan/apply using —target in order to get around this limitation. It looks like we’re using the following provider and we started using it a few months before Hashi archived the project. 😞  https://github.com/hashicorp/terraform-provider-bitbucket/blob/master/README.md We’d obviously prefer to move to an official Atlassian provider (as the other providers we use all have official providers), but would likely be happy with the DrFaust92 provider mentioned earlier since it seems to be well maintained. Unfortunately migrating to a different provider is likely to stay in the backburner since we’re likely to run into this rate limit there as well. (Also, forgive the double user. I try to open support tickets with my work account and forum requests/comments under my personal account. Kelly/Keippel are both me, though I seem to have crossed accounts at some point.)  

            Sylvain T added a comment - - edited

            Hi @John Keippel III , can you name the provider you are using please?

            Sylvain T added a comment - - edited Hi @John Keippel III , can you name the provider you are using please?

            Yeah. It used to be that occasionally we would be rate limited, during larger changes where multiple plans were run to validate. Now it seems we can’t get through a single run. The refresh option does work as a one off, but because we can’t even get through our resources we would never be able to run a state refresh even if we wanted to without hitting the cap. I assume the min calls for us are 60 (repos) x 3 (core resource types we manage) = 180 which isn’t event 20% of the quota, but my guess is that the provider we use actually runs more than 3x commands.

            Our best bet is to probably decentralize the resources we have in state to be managed across multiple state files. 

            It’s a double bummer because I was hoping to experiment with Renovate as well but I’ve seen people hitting this limit with Renovate as well.

            Thanks for the suggestion!

            John Keippel III added a comment - Yeah. It used to be that occasionally we would be rate limited, during larger changes where multiple plans were run to validate. Now it seems we can’t get through a single run. The refresh option does work as a one off, but because we can’t even get through our resources we would never be able to run a state refresh even if we wanted to without hitting the cap. I assume the min calls for us are 60 (repos) x 3 (core resource types we manage) = 180 which isn’t event 20% of the quota, but my guess is that the provider we use actually runs more than 3x commands. Our best bet is to probably decentralize the resources we have in state to be managed across multiple state files.  It’s a double bummer because I was hoping to experiment with Renovate as well but I’ve seen people hitting this limit with Renovate as well. Thanks for the suggestion!

            @John Keippel III: You might be interested in disabling automatic state refresh with `-refresh=false` (see https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options#skipping-automatic-state-refresh) during normal configuration applications to reduce the number of API calls. Then run `-refresh-only` (see https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options#refresh-only-mode) periodically to catch state drift.

            Christoffer Sawicki added a comment - @John Keippel III: You might be interested in disabling automatic state refresh with `-refresh=false` (see https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options#skipping-automatic-state-refresh) during normal configuration applications to reduce the number of API calls. Then run `-refresh-only` (see https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options#refresh-only-mode ) periodically to catch state drift.

            An official provider would be great. That said, we're using an open source version that works pretty well, with one very recent exception. It seems Bitbucket rate limits repository API calls to 1000/hour. Between managing default reviewers, repositories, and hooks we have around 180 or so resources across 60ish repos currently managed. I assume the provider makes at least 1 call per resource per plan and apply and we're currently being 429 rate limited. I don't think we have much, anything?, else running against the Bitbucket API at this hour, and we only ran the plan twice, but here we are.

            So the second ask after an official provider, is for that provider to be more efficient with API calls or be permitted to break that quota.

            This has happened more recently so I think we hit some magic number for resources and may need to move away from Terraform for managing Bitbucket entirely. 😭

            John Keippel III added a comment - An official provider would be great. That said, we're using an open source version that works pretty well, with one very recent exception. It seems Bitbucket rate limits repository API calls to 1000/hour. Between managing default reviewers, repositories, and hooks we have around 180 or so resources across 60ish repos currently managed. I assume the provider makes at least 1 call per resource per plan and apply and we're currently being 429 rate limited. I don't think we have much, anything?, else running against the Bitbucket API at this hour, and we only ran the plan twice, but here we are. So the second ask after an official provider, is for that provider to be more efficient with API calls or be permitted to break that quota. This has happened more recently so I think we hit some magic number for resources and may need to move away from Terraform for managing Bitbucket entirely. 😭

            Jim Divine added a comment -

            I use @ilia's Terraform provider.  It is excellent, but it does of course lag on new features from time to time. Entirely expected as a volunteer-maintained project.  Seems like this would be a great foundation to build on.

            Jim Divine added a comment - I use @ilia's Terraform provider.  It is excellent, but it does of course lag on new features from time to time. Entirely expected as a volunteer-maintained project.  Seems like this would be a great foundation to build on.

            This issue has gathered enough interest to be moved automatically to Reviewing status, where it will be reviewed to someone in the relevant product development team and moved on to the appropriate status.

            Mike Howells added a comment - This issue has gathered enough interest to be moved automatically to Reviewing status, where it will be reviewed to someone in the relevant product development team and moved on to the appropriate status.

            Hi! Im the maintainer for https://github.com/DrFaust92/terraform-provider-bitbucket if Atlassian wants to reach out and help im more than happy to. I try to keep it as compatible to API changes as they occur (I generate a golang client based on the OpenAPI spec)

            Ilia Lazebnik added a comment - Hi! Im the maintainer for https://github.com/DrFaust92/terraform-provider-bitbucket if Atlassian wants to reach out and help im more than happy to. I try to keep it as compatible to API changes as they occur (I generate a golang client based on the OpenAPI spec)

              Unassigned Unassigned
              a9dba332858e antpaw
              Votes:
              229 Vote for this issue
              Watchers:
              103 Start watching this issue

                Created:
                Updated: