Reputation: 4721
I am trying to create a bitbucket repo using terraform using example provided here : https://www.terraform.io/docs/providers/bitbucket/index.html . To make it simple, I hardcoded all values like username,pass,repo name etc... I am able to run terraform plan which says 1 resource to create but when i apply the plan it throws error :
Error applying plan:
2017/04/03 16:54:26 [DEBUG] plugin: waiting for all plugin processes to complete...
1 error(s) occurred:
bitbucket_repository.bbrepo: 1 error(s) occurred:
bitbucket_repository.bbrepo: EOF
2017/04/03 16:54:26 [DEBUG] plugin: terraform: bitbucket-provider (internal) 2017/04/03 16:54:26 [DEBUG] plugin: waiting for all plugin processes to complete...
tf file:
# Configure the Bitbucket Provider
provider "bitbucket" {
username = "<BITBUCKET LOGIN EMAIL>"
password = "<BITBUCKET PASSWORD>"
}
# Manage your repository
resource "bitbucket_repository" "bbrepo" {
owner = "<OWNER USER ID>"
name = "<REPO NAME TO CREATE>"
}
Also how to provide bitbucket url if I have internal hosted bitbucket ? Terraform version - 0.9.2
Thanks
Upvotes: 1
Views: 2204
Reputation: 1240
The bitbucket provider embedded in terraform only supports bitbucket cloud.
For self-hosted (aka bitbucket server), I have a community provider available to handle exactly these types of use cases: https://gavinbunney.github.io/terraform-provider-bitbucketserver
Upvotes: 1