gavinbunney / terraform-provider-bitbucketserver

Terraform provider for Bitbucket Server Management
https://registry.terraform.io/providers/gavinbunney/bitbucketserver/latest
Mozilla Public License 2.0
29 stars 33 forks source link

terraform plan fails for bitbucketserver_plugin_config & bitbucketserver_plugin when plugin is uninstalled using bitbucket UI #59

Open rvnyk opened 1 year ago

rvnyk commented 1 year ago

Steps to reproduce the bug :

Issue :

Following are the resource config :

resource "bitbucketserver_plugin" "my_auth_plugin" {
  count   = local.my_resource_count
  key     = "com.my.oauth.bitbucket-oauth"
  version = var.my_auth_plugin_version
  license = replace(var.my_auth_plugin_license, "\n", "\r\n")

  depends_on = [
    null_resource.bitbucket_validate, # validate if the bitbucket server is running
  ]
} 

resource "bitbucketserver_plugin_config" "my_pluginconfig" {
  config_endpoint = "/plugins/servlet/oauth/configure"
  values          = local.my_sso_config
  depends_on = [
   bitbucketserver_plugin.my_auth_plugin,
   null_resource.wait_for_mo_auth_plugin_endpoint # wait for the plugin to be installed
  ]
}