hashicorp / terraform-provider-bitbucket

This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://registry.terraform.io
Mozilla Public License 2.0
32 stars 105 forks source link

repository variables failing to create #53

Closed ghost closed 4 years ago

ghost commented 4 years ago

Creating a bitbucket_repository_variable fails with API 403 error. Plan works fine

# module.test.bitbucket_repository_variable.test will be created

Terraform Version

Terraform v0.12.21

Affected Resource(s)

bitbucket_repository_variable

Terraform Configuration Files

provider "bitbucket" { username = "xxxxxx" password = var.password }

resource "bitbucket_repository_variable" "test" { key = "test" value = "test" repository = bitbucket_repository.test.id secured = false }

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Expected Behavior

bitbucket repository variable created

Actual Behavior

Error: API Error: 403 2.0/repositories/xxxxxx/test/pipelines_config/variables/ Your credentials lack one or more required privilege scopes.

User has admin permissions to the repo and to the organization

w0ut0 commented 4 years ago

Hi @rupertohpen, I had a similar issue and problem was that I didn't assign the correct permissions when creating the app password (the user was an admin, but the app password I was using had limited permissions). Hope this helps!

ghost commented 4 years ago

@w0ut0 thanks for the hint - i thought I checked that but I'll double check

ghost commented 4 years ago

@w0ut0 was correct