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

Policy vcs_repo can't be updated #140

Closed
etopeter opened this issue Feb 28, 2020 · 2 comments
Closed

Policy vcs_repo can't be updated #140

etopeter opened this issue Feb 28, 2020 · 2 comments

Comments

@etopeter
Copy link
Contributor

etopeter commented Feb 28, 2020

tfe_policy_set can create vcs_repo configuration but it's not able to make changes. Plan shows changes to be made and apply says it changed resources but running plan again shows changes were not applied.

How to reproduce:
First create policy set:

resource "tfe_policy_set" "foo" {
  name = "foo"
  vcs_repo {
    identifier = "github-repo"
    oauth_token_id = "token-id"
  }
}

Next update let's add ingress_submodules attribute:

resource "tfe_policy_set" "foo" {
  name = "foo"
  vcs_repo {
    identifier = "github-repo"
    ingress_submodules = true
    oauth_token_id = "token-id"
  }
}

Possible solution:
I don't see anywhere in update section of the code to check vcs_repo changes. There is for Create and Read but for Update is missing.
https://github.com/terraform-providers/terraform-provider-tfe/blob/master/tfe/resource_tfe_policy_set.go#L227

@etopeter
Copy link
Contributor Author

etopeter commented Mar 3, 2020

After some investigation it turns out go-tfe is not supporting updating VCSRepo nor PoliciesPath. This have to wait until is implemented in go-tfe module.
I created Issue for module go-tfe Issue 105

@hcrhall
Copy link
Contributor

hcrhall commented Jun 17, 2020

@etopeter just to let you know that we have resolved this issue in the following pull request #185

The v0.19.0 release includes the new functionality so closing out this issue. Thanks for bringing it to our attention.

@hcrhall hcrhall closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants