Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to display sensitive data output variables in terraform

The following code snippet is my terraform configuration to create an Azure SignalR Service:

output "signalrserviceconnstring" {
  value = azurerm_signalr_service.mysignalrservice.primary_connection_string
  description = "signalR service's primary connection string"
  sensitive = true
}

I got an error when sensitive = true is not included but I still do not see the output results on the console. What's the solution or workaround for this problem?

like image 508
Arash Avatar asked Dec 03 '22 09:12

Arash


1 Answers

The entire point of sensitive = true is to prevent the values from being displayed on the console every time you run terraform apply. You have to output the sensitive value explicitly, like this:

terraform output signalrserviceconnstring

I highly suggest reading the documentation.

like image 160
Mark B Avatar answered Dec 20 '22 18:12

Mark B