Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Bitbucket Deployment and Deployment Variable Configuration in Terraform #219

Open
lakmal-ya opened this issue Oct 13, 2024 · 1 comment

Comments

@lakmal-ya
Copy link

Hi there,

I'm encountering an issue while configuring the bitbucket_deployment and bitbucket_deployment_variable resources in Terraform. Below is the code snippet I'm using:

Terraform Configuration Files

resource "bitbucket_deployment" "test" {
  repository = bitbucket_repository.devops-testing-repo.uuid
  name       = "test"
  stage      = "Test"
}
resource "bitbucket_deployment_variable" "test" {
  deployment = bitbucket_deployment.test.id
  key        = "COUNTRY"
  value      = "Kenya"
  secured    = false
}

Debug Output

bitbucket_project.devops-testing: Creating...
bitbucket_project.devops-testing: Creation complete after 1s [id=abc/DEVOPS]
bitbucket_repository.devops-testing-repo: Creating...

│ Error: Provider produced inconsistent result after apply

│ When applying changes to bitbucket_repository.devops-testing-repo, provider "provider["registry.terraform.io/drfaust92/bitbucket"]" produced an
│ unexpected new value: Root resource was present, but now absent.

│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

I'm also encountering a separate error that states: ERROR] vertex error: API Error: 400 repositories environments bitbucket.

Could you please help me identify if I'm making a mistake, or if this is an issue with the provider? Thank you!

@rquadling
Copy link

NOT AN EXPERT BUT ...

The following things are different for my setup.

  1. The repository name in the bitbucket_deployment resource is the name and not the UUID (in the format of workspace/project).
  2. I have a depends_on for the bitbucket_deployment_variable, so try :
  depends_on = [bitbucket_deployment.test]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants