Closed joachimBurket closed 6 months ago
Hello @joachimBurket
Thanks for raising this issue.
As for as I can see, ntpsync
and ntpserver
, does not allow parallel execution. But if there is no dependency terraform tries to execute resources parallely. So, it is recommended to create dependencies among them.
For Example:
resource "citrixadc_ntpsync" "tf_ntpsync" {
state = "ENABLED"
}
resource "citrixadc_ntpserver" "ntpserver1" {
serverip = "172.20.12.12"
minpoll = 6
maxpoll = 10
depends_on = [citrixadc_ntpsync.tf_ntpsync]
}
resource "citrixadc_ntpserver" "ntpserver2" {
serverip = "172.20.12.13"
minpoll = 6
maxpoll = 10
depends_on = [citrixadc_ntpserver.ntpserver1]
}
resource "citrixadc_ntpserver" "ntpserver3" {
serverip = "172.20.12.14"
minpoll = 6
maxpoll = 10
depends_on = [citrixadc_ntpserver.ntpserver2]
}
resource "citrixadc_ntpserver" "ntpserver4" {
serverip = "172.20.12.15"
minpoll = 6
maxpoll = 10
depends_on = [citrixadc_ntpserver.ntpserver3]
}
Hi @rohit-myali,
Thanks a lot for your answer, it did the trick! :)
Maybe adding a note to the ntpsync
and ntpserver
documentation indicating this trick could help other terraform beginners in the future 😄
Sure @joachimBurket
We will make a note if this to update our docs.!!
Terraform Core Version
v1.6.2
citrixadc Provider Version
v1.38.0
Operating system
RHEL 9.3 (Plow)
Affected Resource(s)
Equivalent NetScaler CLI Command
add ntp-server
Expected Behavior
When multiple
citrixadc_ntpserver
resources are specified in the.tf
file, they are all created in the NetscalerActual Behavior
Only the first NTP server gets created, and the Terraform apply command fails
Relevant Error/Panic Output Snippet
Steps to Reproduce
Launch
terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
terraform apply
command is launched multiple times, thecitrixadc_ntpserver
resources can be created.References
No response