Skip to content

Commit 81f2ae5

Browse files
author
radomarina
committed
feat: bump 1.2.0 - fix naming module
1 parent 8c76c72 commit 81f2ae5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

eventdriven.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resource "azurerm_resource_group" "current" {
22
count = var.eventdriven_enabled && var.existing_resource_group_name == "" ? 1 : 0
33
location = var.location
4-
name = "${var.prefix}${module.naming.resource_group}firefly${var.suffix}"
4+
name = "${module.naming.resource_group.name}-${var.prefix}firefly${var.suffix}"
55
tags = local.tags
66
}
77

@@ -11,14 +11,14 @@ resource "azurerm_storage_account" "current" {
1111
cross_tenant_replication_enabled = false
1212
account_tier = "Standard"
1313
location = var.location
14-
name = "${var.prefix != "" ? regex("\\w+", var.prefix) : ""}${module.naming.storage_account}firefly${var.suffix != "" ? regex("\\w+", var.suffix) : ""}"
14+
name = "${module.naming.storage_account.name}${var.prefix != "" ? regex("\\w+", var.prefix) : ""}firefly${var.suffix != "" ? regex("\\w+", var.suffix) : ""}"
1515
resource_group_name = local.resource_group_name
1616
tags = local.tags
1717
}
1818

1919
resource "azurerm_eventgrid_system_topic" "current" {
2020
count = var.eventdriven_enabled && var.existing_eventgrid_topic_name == "" ? 1 : 0
21-
name = "${var.prefix}${module.naming.eventgrid_topic}firefly${var.suffix}"
21+
name = "${module.naming.eventgrid_topic.name}-${var.prefix}firefly${var.suffix}"
2222
location = var.location
2323
resource_group_name = local.resource_group_name
2424
source_arm_resource_id = local.storage_account_id
@@ -28,7 +28,7 @@ resource "azurerm_eventgrid_system_topic" "current" {
2828

2929
resource "azurerm_eventgrid_system_topic_event_subscription" "current" {
3030
count = var.eventdriven_enabled && var.existing_eventgrid_topic_name == "" ? 1 : 0
31-
name = "${var.prefix}${module.naming.eventgrid_event_subscription}firefly${var.suffix}"
31+
name = "${module.naming.eventgrid_event_subscription.name}-${var.prefix}firefly${var.suffix}"
3232
resource_group_name = local.resource_group_name
3333
system_topic = local.eventgrid_system_topic_name
3434
included_event_types = ["Microsoft.Storage.BlobCreated"]
@@ -46,7 +46,7 @@ resource "azurerm_eventgrid_system_topic_event_subscription" "current" {
4646

4747
resource "azurerm_role_definition" "FireflyStorageAccountBlobReader" {
4848
count = var.eventdriven_enabled ? 1 : 0
49-
name = "${var.prefix}${module.naming.role_definition}FireflyStorageAccountBlobReader-${var.subscription_id}${var.suffix}"
49+
name = "${module.naming.role_definition.name}-${var.prefix}FireflyStorageAccountBlobReader-${var.subscription_id}${var.suffix}"
5050
scope = "/subscriptions/${var.subscription_id}"
5151
description = "Firefly's requested permissions"
5252

@@ -86,7 +86,7 @@ EOT
8686

8787
resource "azurerm_monitor_diagnostic_setting" "current" {
8888
for_each = var.eventdriven_enabled ? local.kv_filtered_subscriptions : {}
89-
name = "${var.prefix}${module.naming.monitor_diagnostic_setting}firefly${each.key}${var.suffix}"
89+
name = "${module.naming.monitor_diagnostic_setting.name}-${var.prefix}firefly${each.key}${var.suffix}"
9090
target_resource_id = "/subscriptions/${each.key}"
9191
storage_account_id = local.storage_account_id
9292
enabled_log {

permission.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
}
55

66
resource "azuread_application_registration" "current" {
7-
display_name = "${var.prefix}firefly${var.suffix}"
7+
display_name = "spn-${var.prefix}firefly${var.suffix}"
88
}
99

1010
resource "azuread_service_principal" "current" {
@@ -41,7 +41,7 @@ resource "azurerm_role_assignment" "SecurityReader" {
4141
}
4242

4343
resource "azurerm_role_definition" "Firefly" {
44-
name = "${var.prefix}${module.naming.role_definition}Firefly${var.suffix}"
44+
name = "${module.naming.role_definition.name}-${var.prefix}Firefly${var.suffix}"
4545
scope = local.scope
4646
description = "Firefly's requested permissions"
4747

0 commit comments

Comments
 (0)