Open archmangler opened 1 year ago
Terraform trace debug output seems to indicate the provider might be unstable:
(NOTE: enable_pipelines tested with both true
and false
with same result)
2023-07-28T00:57:54.751+0800 [TRACE] provider.terraform-provider-bitbucket_v1.6.0: Served request: @module=sdk.proto tf_resource_type=bitbucket_repository tf_rpc=PlanResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:796 tf_proto_version=5.3 tf_provider_addr=provider tf_req_id=4412fc07-e17a-5c11-b16b-8188421ed50f timestamp=2023-07-28T00:57:54.751+0800
2023-07-28T00:57:54.751+0800 [WARN] Provider "registry.terraform.io/zahiar/bitbucket" produced an invalid plan for bitbucket_repository.orion, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .fork_policy: planned value cty.StringVal("no_forks") for a non-computed attribute
- .is_private: planned value cty.True for a non-computed attribute
- .has_wiki: planned value cty.False for a non-computed attribute
2023-07-28T00:57:54.751+0800 [TRACE] plan: bitbucket_repository.orion treating Create change as DeleteThenCreate change to match with earlier plan
2023-07-28T00:57:54.751+0800 [TRACE] checkPlannedChange: Verifying that actual change (action DeleteThenCreate) matches planned change (action DeleteThenCreate)
2023-07-28T00:57:54.751+0800 [TRACE] reducePlan: bitbucket_repository.orion change simplified from DeleteThenCreate to Create for apply node
bitbucket_repository.orion: Creating...
2023-07-28T00:57:54.751+0800 [INFO] Starting apply for bitbucket_repository.orion
2023-07-28T00:57:54.751+0800 [DEBUG] bitbucket_repository.orion: applying the planned Create change
.
.
.
2023-07-28T00:57:56.452+0800 [TRACE] provider.terraform-provider-bitbucket_v1.6.0: Received downstream response: tf_req_duration_ms=1700 tf_resource_type=bitbucket_repository tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/tf5serverlogging/downstream_request.go:37 @module=sdk.proto diagnostic_warning_count=0 tf_proto_version=5.3 tf_provider_addr=provider tf_req_id=325f4d5c-1725-caec-67e2-b949b4dc89d0 diagnostic_error_count=1 timestamp=2023-07-28T00:57:56.452+0800
2023-07-28T00:57:56.452+0800 [ERROR] provider.terraform-provider-bitbucket_v1.6.0: Response contains error diagnostic: diagnostic_severity=ERROR tf_proto_version=5.3 tf_provider_addr=provider tf_resource_type=bitbucket_repository @caller=github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/diag/diagnostics.go:55 diagnostic_detail= diagnostic_summary="unable to enable pipelines for repository with error: 404 Not Found" tf_req_id=325f4d5c-1725-caec-67e2-b949b4dc89d0 tf_rpc=ApplyResourceChange @module=sdk.proto timestamp=2023-07-28T00:57:56.452+0800
2023-07-28T00:57:56.452+0800 [TRACE] provider.terraform-provider-bitbucket_v1.6.0: Served request: tf_req_id=325f4d5c-1725-caec-67e2-b949b4dc89d0 tf_resource_type=bitbucket_repository tf_rpc=ApplyResourceChange @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider @caller=github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:831 timestamp=2023-07-28T00:57:56.452+0800
2023-07-28T00:57:56.453+0800 [TRACE] maybeTainted: bitbucket_repository.orion encountered an error during creation, so it is now marked as tainted
2023-07-28T00:57:56.453+0800 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for bitbucket_repository.orion
2023-07-28T00:57:56.453+0800 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: writing state object for bitbucket_repository.orion
2023-07-28T00:57:56.453+0800 [TRACE] evalApplyProvisioners: bitbucket_repository.orion is tainted, so skipping provisioning
2023-07-28T00:57:56.453+0800 [TRACE] maybeTainted: bitbucket_repository.orion was already tainted, so nothing to do
2023-07-28T00:57:56.453+0800 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for bitbucket_repository.orion
2023-07-28T00:57:56.453+0800 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: writing state object for bitbucket_repository.orion
2023-07-28T00:57:56.453+0800 [TRACE] statemgr.Filesystem: have already backed up original terraform.tfstate to terraform.tfstate.backup on a previous write
2023-07-28T00:57:56.453+0800 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 10
2023-07-28T00:57:56.453+0800 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2023-07-28T00:57:56.474+0800 [ERROR] vertex "bitbucket_repository.orion" error: unable to enable pipelines for repository with error: 404 Not Found
2023-07-28T00:57:56.474+0800 [TRACE] vertex "bitbucket_repository.orion": visit complete, with errors
2023-07-28T00:57:56.474+0800 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/zahiar/bitbucket\"] (close)" errored, so skipping
2023-07-28T00:57:56.474+0800 [TRACE] dag/walk: upstream of "root" errored, so skipping
2023-07-28T00:57:56.474+0800 [TRACE] statemgr.Filesystem: have already backed up original terraform.tfstate to terraform.tfstate.backup on a previous write
2023-07-28T00:57:56.474+0800 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 11
2023-07-28T00:57:56.475+0800 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
I'm running a basic create repo test with
resource "bitbucket_repository"
. The terraform apply fails, even though the repo is created in bitbucket:Note: This is even though
enable_pipeline=false
... which suggests thefalse
parameter is being ignored in the provider Note: the App Password created for authentication has been granted permissions to enable and create pipelines in BB settings.Is there a workaround or solution for this?
Note: Destroy is clean: