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

r/project: ensuring that all fields are set #77

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tombuildsstuff
Copy link
Contributor

This PR ensures that all fields within the teamcity_project resource have a value - which is required in Terraform 0.12.

There's a couple of other changes in here too, since I was passing through it felt worth making them everywhere at once, I hope you don't mind:

  • all resources now support detecting when they've been deleted - this allows Terraform to detect when a resource has been deleted outside of Terraform and thus requires recreation when running terraform plan
  • reusing the Create/Update function for VCS Root (since create was calling directly out to update anyway)
  • removing the implied d.MarkNewResource - when Terraform calls into a Create function, the "isNew" field in the resource (which is what MarkNewResource sets) is set to true - so this call is superfluous and can be removed

This is required as of Terraform 0.12, else these are omitted from the state
When Terraform invokes a provider via the Create method, the 'isNew' attribute
will be set - so these calls are superflurious
This makes the drift-detection consistent across all resources, so that
Terraform is able to detect when these resources have been deleted outside
of Terraform and require recreation.
@cvbarros cvbarros added this to the 1.1 milestone Apr 24, 2020
@cvbarros cvbarros modified the milestones: 1.1, 1.2 Jun 11, 2020
@cvbarros cvbarros self-assigned this Jun 11, 2020
Copy link
Owner

@cvbarros cvbarros left a comment

Choose a reason for hiding this comment

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

Greatly appreciated these PRs that make the codebase nicer!

@cvbarros
Copy link
Owner

A rebase here with solving the conflicts and this will be merged 🚀

@cvbarros
Copy link
Owner

This should resolve #92
@tombuildsstuff any plans on moving this forward? Thanks!

@cvbarros cvbarros modified the milestones: 1.2, 1.1 Oct 13, 2020
@fatmcgav fatmcgav mentioned this pull request Oct 28, 2020
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