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

Reset trigger prefixes for workspace resources when removed from the config #138

Merged

Conversation

nicsnet
Copy link
Member

@nicsnet nicsnet commented Feb 21, 2020

Description

Fixes a bug for tfe_workspace resource updates. Previously when creating a tfe_workspace resource with a trigger_prefixes configuration, this option remained even when the trigger_prefixes config option was removed during subsequent updates to this resource. terraform plan would continue outputting this change, but it would not take effect.

Testing plan

 # tfe_workspace.pleng_staging_us_west_2 will be updated in-place
  ~ resource "tfe_workspace" "pleng_staging_us_west_2" {
        auto_apply            = false
        external_id           = "ws-6YmtKxQffbqJpVE6"
        file_triggers_enabled = true
        id                    = "chavo4/pleng-staging-us-west-2"
        name                  = "pleng-staging-us-west-2"
        operations            = true
        organization          = "chavo4"
        queue_all_runs        = true
        terraform_version     = "0.12.12"
      ~ trigger_prefixes      = [
          - "567694625192/us-west-2",
        ]
        working_directory     = "567694625192/us-west-3"

        vcs_repo {
            identifier         = "nicsnet/terraform-provider-nics"
            ingress_submodules = false
            oauth_token_id     = "#######"
        }
    }

Output from acceptance tests

Please run the full suite of acceptance tests locally and include the output here.

$ make testacc

...

@ghost ghost added the size/M label Feb 21, 2020
@nicsnet nicsnet marked this pull request as ready for review February 21, 2020 22:25
@stasquatch
Copy link

Everything looks good on my end, I just have one question. Is it within scope to allow working_directory to be reset? It can't be cleared once it's been set via the provider, similar to the trigger_prefixes.

@nicsnet
Copy link
Member Author

nicsnet commented Mar 4, 2020

The working_directory fix is part of this #137

Copy link

@stasquatch stasquatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicsnet nicsnet force-pushed the nicsnet/bugfix-cleanup-trigger-prefixes-for-workspaces branch from f1a9818 to 487bec8 Compare March 4, 2020 16:25
@nicsnet nicsnet merged commit d6a785b into master Mar 4, 2020
@nicsnet nicsnet deleted the nicsnet/bugfix-cleanup-trigger-prefixes-for-workspaces branch March 4, 2020 17:43
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

Successfully merging this pull request may close these issues.

2 participants