I am trying to deploy Event Hub with Namespace.
Here is what I have done
Deploy Primary Namespace Then Secondary Namespace Then Disaster Recovery Config Output alias connection string using Primary Namespace
I am trying to output
However, this outputs “”… An empty string
I checked the state file and noticed that
default_primary_connection_string_alias is ""
if I run terraform apply again then all of this works fine, and alias connection string is returned correctly (Probably because it does a refresh for all states at the beginning.
so, it seems to me when I first create the primary namespace this state is set and not updated when disaster recovery config has completed.
I tried to google if there is anything that can be added after DR completes and before output to refresh the state of primary namespace.
or if there is even anything like ListKeys for terraform like there is for ARM, but no luck.
If anybody knows a fix/workaround for this (except running terraform apply again) or if I am doing something wrong, please let me know.