Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

secured bitbucket_repository_variable always updated in-place #55

Open
@caleb-gosnell

Description

@caleb-gosnell

Terraform Version

Terraform v0.12.24

  • provider.aws v2.59.0
  • provider.bitbucket v1.2.0

Affected Resource(s)

  • bitbucket_repository_variable
    when secured = true

Terraform Configuration Files

resource "bitbucket_repository_variable" "foo" {
  repository = bitbucket_repository.test.id
  key        = "foo"
  value      = "bar" 
 secured    = true
}

Expected Behavior

I only expect the value to be updated if it is changed, not on every apply.

Actual Behavior

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # bitbucket_repository_variable.foo will be updated in-place
  ~ resource "bitbucket_repository_variable" "foo" {
        id         = "foo"
        key        = "foo"
        repository = "baz/buzz"
        secured    = true
        uuid       = "{7948f751-9ab7-4b24-ab33-d80fbd99f9f5}"
      + value      = "bar"
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. terraform plan

Current Workaround

Avoid ever resetting the value, (opens the user up to a stale value):

resource "bitbucket_repository_variable" "foo" {
  repository = bitbucket_repository.test.id
  key        = "foo"
  value      = "bar" 
 secured    = true
  lifecycle {
    ignore_changes = [value]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions