-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from SazniMohamed/main
Add Modules for DNS Zone, DNS A Record, User Assigned Identity and Update AKS-Firewall module
- Loading branch information
Showing
19 changed files
with
279 additions
and
69 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
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,19 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
resource "azurerm_dns_a_record" "dns_a_record" { | ||
name = var.record_name | ||
zone_name = var.dns_zone_name | ||
resource_group_name = var.resource_group_name | ||
ttl = var.ttl | ||
records = var.records | ||
tags = var.tags | ||
} |
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,40 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
variable "record_name" { | ||
description = "The name of the CNAME record." | ||
type = string | ||
} | ||
|
||
variable "dns_zone_name" { | ||
description = "The name of the DNS zone in which the record should be created." | ||
type = string | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "The name of the resource group in which the DNS zone exists." | ||
type = string | ||
} | ||
|
||
variable "ttl" { | ||
description = "The Time To Live (TTL) of the DNS record in seconds." | ||
type = number | ||
} | ||
|
||
variable "records" { | ||
description = "The value of the CNAME records." | ||
type = list(string) | ||
} | ||
|
||
variable "tags" { | ||
description = "A mapping of tags to assign to the resource." | ||
type = map(string) | ||
} |
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,20 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.52.0" | ||
} | ||
} | ||
} |
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,15 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
resource "azurerm_dns_zone" "dns_zone" { | ||
name = var.dns_zone_name | ||
resource_group_name = var.resource_group_name | ||
} |
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,15 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
output "dns_zone_id" { | ||
depends_on = [azurerm_dns_zone.dns_zone] | ||
value = azurerm_dns_zone.dns_zone.id | ||
} |
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,20 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
variable "dns_zone_name" { | ||
description = "The name of the DNS zone." | ||
type = string | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "The name of the resource group." | ||
type = string | ||
} |
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,20 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.52.0" | ||
} | ||
} | ||
} |
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,20 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
output "azurerm_user_assigned_identity_id" { | ||
depends_on = [azurerm_user_assigned_identity.user_assigned_identity] | ||
value = azurerm_user_assigned_identity.user_assigned_identity.id | ||
} | ||
|
||
output "azurerm_user_assigned_identity_principal_id" { | ||
depends_on = [azurerm_user_assigned_identity.user_assigned_identity] | ||
value = azurerm_user_assigned_identity.user_assigned_identity.principal_id | ||
} |
16 changes: 16 additions & 0 deletions
16
modules/azurerm/User-Assigned-Identity/user_assigned_identity.tf
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,16 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
resource "azurerm_user_assigned_identity" "user_assigned_identity" { | ||
name = var.name | ||
resource_group_name = var.resource_group_name | ||
location = var.location | ||
} |
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,25 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
variable "name" { | ||
description = "Name of the user assigned identity" | ||
type = string | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "Resource group name" | ||
type = string | ||
} | ||
|
||
variable "location" { | ||
description = "Azure region" | ||
type = string | ||
} |
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,20 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
# | ||
# This software is the property of WSO2 LLC. and its suppliers, if any. | ||
# Dissemination of any information or reproduction of any material contained | ||
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
# You may not alter or remove any copyright or other notice from copies of this content. | ||
# | ||
# -------------------------------------------------------------------------------------- | ||
|
||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.52.0" | ||
} | ||
} | ||
} |
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.