terraform-provider-bitbucket
terraform-provider-bitbucket copied to clipboard
provider/bitbucket fork_policy not updated correctly
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)
- bitbucket_repository
Terraform Configuration Files
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
-
terraform apply
- 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"
- 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