-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit provides integrations for Azure storage, with the newer Azure.Storage.Blobs, Azure.Storage.Queues and Azure.Storage.Files.Shares nuget packages. Closes #1156 Closes #1155
- Loading branch information
Showing
32 changed files
with
2,444 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "=2.46.0" | ||
} | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
data "azurerm_client_config" "current" { | ||
} | ||
|
||
resource "random_uuid" "variables" { | ||
} | ||
|
||
variable "resource_group" { | ||
type = string | ||
description = "The name of the resource group to create" | ||
} | ||
|
||
variable "location" { | ||
type = string | ||
description = "The Azure location in which to deploy resources" | ||
default = "westus" | ||
} | ||
|
||
variable "storage_account_name" { | ||
type = string | ||
description = "The name of the storage account to create" | ||
} | ||
|
||
|
||
resource "azurerm_resource_group" "storage_resource_group" { | ||
name = var.resource_group | ||
location = var.location | ||
} | ||
|
||
resource "azurerm_storage_account" "storage_account" { | ||
name = var.storage_account_name | ||
resource_group_name = azurerm_resource_group.storage_resource_group.name | ||
location = azurerm_resource_group.storage_resource_group.location | ||
account_tier = "Standard" | ||
account_replication_type = "LRS" | ||
enable_https_traffic_only = true | ||
} | ||
|
||
# random name to generate for the contributor role assignment | ||
resource "random_uuid" "contributor_role" { | ||
keepers = { | ||
client_id = data.azurerm_client_config.current.client_id | ||
} | ||
} | ||
|
||
resource "azurerm_role_assignment" "contributor_role" { | ||
name = random_uuid.contributor_role.result | ||
principal_id = data.azurerm_client_config.current.object_id | ||
role_definition_name = "Contributor" | ||
scope = azurerm_resource_group.storage_resource_group.id | ||
depends_on = [azurerm_storage_account.storage_account] | ||
} | ||
|
||
|
||
# following role assignment, there can be a delay of up to ~1 minute | ||
# for the assignments to propagate in Azure. You may need to introduce | ||
# a wait before using the Azure resources created. | ||
|
||
output "connection_string" { | ||
value = azurerm_storage_account.storage_account.primary_connection_string | ||
description = "The service bus primary connection string" | ||
sensitive = true | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.