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

bitbucket_deploy_key does not import key #217

Open
gojanpaolo opened this issue Aug 31, 2024 · 0 comments
Open

bitbucket_deploy_key does not import key #217

gojanpaolo opened this issue Aug 31, 2024 · 0 comments

Comments

@gojanpaolo
Copy link

Terraform Version

$ terraform -v
Terraform v1.9.5
on windows_amd64
+ provider registry.terraform.io/drfaust92/bitbucket v2.42.0
+ provider registry.terraform.io/hashicorp/google v6.0.1
+ provider registry.terraform.io/hashicorp/http v3.4.4

Affected Resource(s)

  • bitbucket_deploy_key

Expected Behavior

bitbucket_deploy_key imports key

Actual Behavior

bitbucket_deploy_key does not import key

Steps to Reproduce

  1. Define resource block
resource "bitbucket_deploy_key" "foo" {
  workspace  = local.bitbucket_workspace
  repository = local.terraform_repo
  label      = "foo"
  key        = "ssh-rsa REDACTED"
}

  1. terraform apply

  2. terraform state rm bitbucket_deploy_key.foo

  3. Get the key id curl "$bitbucket_url/repositories/$bitbucket_workspace/$terraform_repo/deploy-keys"

  4. terraform import $bitbucket_workspace/$terraform_repo/$key_id

  5. Check issue

    a. Check terraform state and see that key is not imported

    b. Run terrafrom plan and see that bitbucket_deploy_key must be replaced because key forces replacement. Expected behavior is that there are no changes because we did not change the key in the resource block.

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

1 participant