Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
myc2h6o committed Feb 17, 2022
1 parent a914e13 commit 6c77b99
Showing 1 changed file with 50 additions and 4 deletions.
54 changes: 50 additions & 4 deletions website/docs/r/iothub_file_upload.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,56 @@ Manages a IotHub File Upload.
## Example Usage

```hcl
resource "azurerm_iothub_file_upload" "example" {
connection_string = "TODO"
container_name = "example"
iothub_id = "TODO"
resource "azurerm_resource_group" "test" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_storage_account" "test" {
name = "examplestorage"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_storage_container" "test" {
name = "examplecontainer"
storage_account_name = azurerm_storage_account.test.name
container_access_type = "private"
}
resource "azurerm_iothub" "test" {
name = "example-iothub"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
sku {
name = "S1"
capacity = "1"
}
identity {
type = "SystemAssigned"
}
}
resource "azurerm_role_assignment" "test_storage_blob_data_contrib" {
role_definition_name = "Storage Blob Data Contributor"
scope = azurerm_storage_account.test.id
principal_id = azurerm_iothub.test.identity[0].principal_id
}
resource "azurerm_iothub_file_upload" "test" {
iothub_id = azurerm_iothub.test.id
container_name = azurerm_storage_container.test.name
connection_string = azurerm_storage_account.test.primary_blob_connection_string
authentication_type = "identityBased"
depends_on = [
azurerm_role_assignment.test_storage_blob_data_contrib,
]
}
```

Expand Down

0 comments on commit 6c77b99

Please sign in to comment.