Open aadamovich opened 1 year ago
I'm not sure what is causing the error (workspace exists, project is created without problem, but repo gives 404):
[ERROR] provider.terraform-provider-bitbucket_v2.33.0.exe:
Response contains error diagnostic:
diagnostic_severity=ERROR diagnostic_summary="404 Not Found: Not found"
tf_resource_type=bitbucket_repository
@caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55
@module=sdk.proto
diagnostic_detail=
tf_proto_version=5.3
tf_provider_addr=DrFaust92/bitbucket
tf_req_id=cf1248d7-9155-4590-c3b9-b8f2d46ae4a7
tf_rpc=ApplyResourceChange
timestamp=2023-06-24T12:16:40.620+0300
Tried with 2.33.0, 2.32.0, 2.31.0, 2.30.2, 2.28.0. Same result.
It started to work after I went to the created repo and manually enabled the pipelines:
Now it works with repo resource creation/deletion. Weird.
The way I found it was about the pipelines: I tried provider version 2.16 and when running terraform apply it showed me extra error message:
bitbucket_repository.setup: Creating...
╷
│ Error: error enabling pipeline for repository (setup): 404 Not Found
│
│ with bitbucket_repository.setup,
│ on 20_repos.tf line 9, in resource "bitbucket_repository" "setup":
│ 9: resource "bitbucket_repository" "setup" {
│
╵
Regardless of pipelines_enabled value it still showed the above error.
This was a completely new workspace. I guess the initial error is related to the expectations of the provider that the workspace is initialized with some default settings and certain URLs just work.
Another observation, setting pipelines_enabled attribute to true - enables the pipelines as expected, but setting it to false, does not actually disable it.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Repository is created and no error is thrown.
Actual Behavior
Repository is created, but terraform throws 404
Steps to Reproduce
terraform apply