You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the file_upload block of an azurerm_iothub resource, I expect that the connection_string property will only be flagged to change upon modification of the connection string value.
Actual Behaviour
However, the connection_string is always flagged for modification. This seems to be because the state file stores the connection string without the account key. This seems like it is an error, because the state file is known to store sensitive values, including connection strings and access keys.
Note that the AccountKey=**** is literally taken from the state file, and not modified to protect the key for reporting this github issue. Because the AccountKey is stored in state as a literal value of ****, the modification always occurs.
This operation, while unnecessary, is benign, but always gives me heart palpitations nonetheless when I see it perform effectively a no-op on my iot hub which services thousands of devices in production.
Steps to Reproduce
Create an azurerm_storage_account
Create an azurerm_iothub resource, and set the file_upload block to reference the azurerm_storage_account
terraform apply
terraform apply again
Expected: 2nd apply will have no changes
Actual: Apply wants to change the connection string
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_iothub
Terraform Configuration Files
Expected Behaviour
When setting the
file_upload
block of anazurerm_iothub
resource, I expect that theconnection_string
property will only be flagged to change upon modification of the connection string value.Actual Behaviour
However, the
connection_string
is always flagged for modification. This seems to be because the state file stores the connection string without the account key. This seems like it is an error, because the state file is known to store sensitive values, including connection strings and access keys.Example of the state file:
Note that the
AccountKey=****
is literally taken from the state file, and not modified to protect the key for reporting this github issue. Because the AccountKey is stored in state as a literal value of****
, the modification always occurs.This operation, while unnecessary, is benign, but always gives me heart palpitations nonetheless when I see it perform effectively a no-op on my iot hub which services thousands of devices in production.
Steps to Reproduce
azurerm_storage_account
azurerm_iothub
resource, and set thefile_upload
block to reference theazurerm_storage_account
terraform apply
terraform apply
againExpected: 2nd apply will have no changes
Actual: Apply wants to change the connection string
The text was updated successfully, but these errors were encountered: