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

provider/bitbucket fork_policy not updated correctly #1

Open hashibot opened 7 years ago

hashibot commented 7 years ago

This issue was originally opened by @ksatirli as hashicorp/terraform#9529. It was migrated here as part of the provider split. The original body of the issue is below.


Hi there,

I'm running into a problem with the bitbucket_repository resource. It seems remote fields are not correctly updated, even though they are stored in the tfstate file.

This ticket is specific to fork_policy, but I've noticed similar issues with is_private and language.

Terraform Version

Terraform v0.7.7

Affected Resource(s)

resource "bitbucket_repository" "test-repository" {
  owner = "${var.bitbucket_username}"
  name = "test-repository-3kjh4asdkj"
  is_private = "true"
  language = "other"
  fork_policy = "no_forks"
}

Note: in the above example, bitbucket_username is just the same username used to configure the provider itself.

Panic Output

no panic

Expected Behavior

The fork_policy should be set on an initial run and then only show up as changed when it actually has changed

Actual Behavior

The fork_policy shows as changed on every run.

Steps to Reproduce

  1. terraform apply
  2. inspect initial output:
+ bitbucket_repository.test-repository
    clone_https: "<computed>"
    clone_ssh:   "<computed>"
    fork_policy: "no_forks"
    has_issues:  "false"
    has_wiki:    "false"
    is_private:  "true"
    language:    "other"
    name:        "test-repository-3kjh4asdkj"
    owner:       "my-bitbucket-username"
    scm:         "git"
  1. Another terraform apply will then show that the resource has been updated, again. This shows up as changed resource on every run.

    Important Factoids

n/a