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
32 stars 105 forks source link

Repository owner not changed succesfully #14

Open m3gg3r opened 6 years ago

m3gg3r commented 6 years ago

Hi,

I think there is a problem with changing the owner of an repository!

Terraform Version

0.11.1

Affected Resource(s)

Terraform Configuration Files

before

resource "bitbucket_repository" "testrepository" {
  owner      = "${var.repository_owner}"
  name       = "testrepository"
  slug       = "testrepository"
}
variable "repository_owner" {
  type = "string"
  default = "m3gg3r"
}

https://i.imgur.com/ERoF5Q6.png https://i.imgur.com/AeVMfhq.png "Tobias Lückel" equals "m3gg3r"

after

resource "bitbucket_repository" "testrepository" {
  owner      = "${var.repository_owner}"
  name       = "testrepository"
  slug       = "testrepository"
}
variable "repository_owner" {
  type = "string"
  default = "meggertestteam"
}
Terraform will perform the following actions:

  ~ bitbucket_repository.testrepository
      owner: "m3gg3r" => "meggertestteam"

Plan: 0 to add, 1 to change, 0 to destroy.

https://i.imgur.com/8Smf8is.png

Expected Behavior

The owner of the repository should be changed from 'm3gg3r' to 'meggertestteam'

Actual Behavior

Terraform adds a second repository owned by 'meggertestteam' instead of changing the owner https://i.imgur.com/PHs5qZZ.png

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply with configuration 'before'
  2. terraform apply with configuration 'after'
cwood commented 6 years ago

Im not sure our API allows you to actully change the owner through the API. Normally there is a transfer policy that has to happen when you move a repo to a different team.