-
Notifications
You must be signed in to change notification settings - Fork 288
[Bug Fix] - azuredevops_serviceendpoint_azurerm
- Fix bug with serviceendpoint_azurerm when shared projectid gets mutil…
#1351
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
base: main
Are you sure you want to change the base?
Conversation
azuredevops_serviceendpoint_azurerm
- Fix bug with serviceendpoint_azurerm when shared projectid gets mutil…
@leasley199 Currently the |
weird I can see the validateServiceEndpoint on my local branch untouched. noted on the read/create operation. |
… fix projectID bug when SC is shared
alright new commit(s) should address the prior comment. I also added a parameter to the resource that cause the initial bug in the first place. When service connection is shared project Id was getting clobbered, now projectID will validate as well if the serv connection is shared with other projects this can be managed via tf now. If not included serv connection would remove shared projects from resource. staged in common.go so that it can be used by other service connection but not doing the leg work for that at the moment due to scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leasley199 Please help resolve the whitespace encoding issue. And can you help add the AccTest to cover the new changes(shared_project_ids
) ?
bug with serviceendpoint_azurerm when shared projectID gets clobbered/mutilated.
All Submissions:
What about the current behavior has changed?
Currently there is a bug with the serviceendpoint_azurerm resource when the service connection gets shared to another project the projectid gets clobbered. this is because the value for the projectID is hardcoded to [0] and the object that this id is read from the order or IDs can change and thus break the resource.
if the shared projectID is alphabetically/numerically greater than the initial projectID this will cause a mismatch and thus the resource is broken. The fix takes the field, matches the specified projected of the resource and continues if successful/else fail if not match (obviously ha ha).
This is probably an issue in all serviceendpoints that have the projectID hardcoded as [0] but in the effort of do no harm I am only targeting this resource.
The changes 'should' be able to lift and shift however if true.
Issue Number: NA
Does this introduce a change to
go.mod
,go.sum
orvendor/
?Does this introduce a breaking change?
Any relevant logs, error output, etc?
current error tries to delete and recreate resource since projectID changes. This is undesired since it breaks the shared service connection resource and state becomes undesirable/falsified.
Test locally, but more eyes and insight never hurt many thanks :)