-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3e1e2a
commit 0bf1ede
Showing
14 changed files
with
234 additions
and
9 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
13 changes: 13 additions & 0 deletions
13
src/mapping/azure/data/resourcegroups/azurerm_resource_group.json
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,13 @@ | ||
[ | ||
{ | ||
"apply": [], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [ | ||
"Microsoft.Resources/subscriptions/resourcegroups/read" | ||
] | ||
} | ||
] |
21 changes: 21 additions & 0 deletions
21
src/mapping/azure/resource/documentdb/azurerm_cosmosdb_account.json
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,21 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"Microsoft.Resources/subscriptions/resourcegroups/read", | ||
"Microsoft.DocumentDB/databaseAccounts/read", | ||
"Microsoft.DocumentDB/databaseAccounts/write", | ||
"Microsoft.DocumentDB/databaseAccounts/delete", | ||
"Microsoft.DocumentDB/databaseAccounts/listKeys/action", | ||
"Microsoft.DocumentDB/databaseAccounts/readonlykeys/action", | ||
"Microsoft.DocumentDB/databaseAccounts/listConnectionStrings/action" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"Microsoft.DocumentDB/databaseAccounts/delete" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
20 changes: 20 additions & 0 deletions
20
src/mapping/azure/resource/documentdb/azurerm_cosmosdb_table.json
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 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"Microsoft.Resources/subscriptions/resourcegroups/read", | ||
"Microsoft.DocumentDB/databaseAccounts/read", | ||
"Microsoft.DocumentDB/databaseAccounts/tables/read", | ||
"Microsoft.DocumentDB/databaseAccounts/tables/write", | ||
"Microsoft.DocumentDB/databaseAccounts/tables/delete", | ||
"Microsoft.DocumentDB/databaseAccounts/tables/throughputSettings/read" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"Microsoft.DocumentDB/databaseAccounts/tables/delete" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
18 changes: 18 additions & 0 deletions
18
src/mapping/azure/resource/keyvault/azurerm_key_vault.json
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,18 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"Microsoft.Resources/subscriptions/resourcegroups/read", | ||
"Microsoft.KeyVault/vaults/read", | ||
"Microsoft.KeyVault/vaults/write" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"Microsoft.KeyVault/vaults/delete", | ||
"Microsoft.KeyVault/locations/deletedVaults/read" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
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,43 @@ | ||
resource "azurerm_cosmosdb_account" "db" { | ||
name = "pike-cosmos-db" | ||
location = "uksouth" | ||
resource_group_name = "pike" | ||
offer_type = "Standard" | ||
kind = "MongoDB" | ||
|
||
enable_automatic_failover = true | ||
|
||
capabilities { | ||
name = "EnableAggregationPipeline" | ||
} | ||
|
||
capabilities { | ||
name = "mongoEnableDocLevelTTL" | ||
} | ||
|
||
capabilities { | ||
name = "MongoDBv3.4" | ||
} | ||
|
||
capabilities { | ||
name = "EnableMongo" | ||
} | ||
|
||
consistency_policy { | ||
consistency_level = "BoundedStaleness" | ||
max_interval_in_seconds = 350 | ||
max_staleness_prefix = 100000 | ||
} | ||
|
||
geo_location { | ||
location = "eastus" | ||
failover_priority = 1 | ||
} | ||
|
||
geo_location { | ||
location = "westus" | ||
failover_priority = 0 | ||
} | ||
//local_authentication_disabled = true | ||
public_network_access_enabled = false | ||
} |
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,35 @@ | ||
resource "azurerm_cosmosdb_table" "pike2" { | ||
name = "pike2" | ||
resource_group_name = "pike" | ||
account_name = "pike-table" | ||
autoscale_settings { | ||
max_throughput = 1000 | ||
} | ||
} | ||
|
||
|
||
resource "azurerm_cosmosdb_account" "pike-table" { | ||
name = "pike-table" | ||
location = "uksouth" | ||
resource_group_name = "pike" | ||
offer_type = "Standard" | ||
enable_free_tier = true | ||
consistency_policy { | ||
consistency_level = "BoundedStaleness" | ||
max_interval_in_seconds = 86400 | ||
max_staleness_prefix = 1000000 | ||
} | ||
|
||
geo_location { | ||
location = "uksouth" | ||
failover_priority = "0" | ||
zone_redundant = false | ||
} | ||
capabilities { | ||
name = "EnableTable" | ||
} | ||
tags = { | ||
"defaultExperience" = "Azure Table" | ||
"hidden-cosmos-mmspecial" = "" | ||
} | ||
} |
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,35 @@ | ||
resource "azurerm_key_vault" "example" { | ||
name = "pike" | ||
location = "uksouth" | ||
resource_group_name = "pike" | ||
tenant_id = "8e7f742a-4215-44a0-881b-209124f286b1" | ||
sku_name = "premium" | ||
soft_delete_retention_days = 7 | ||
access_policy { | ||
tenant_id = "8e7f742a-4215-44a0-881b-209124f286b1" | ||
object_id = "640b7b1e-da57-4518-a546-cbec8d9a9bce" | ||
|
||
key_permissions = [ | ||
"Create", | ||
"Get", | ||
"Purge", | ||
"Recover" | ||
] | ||
|
||
secret_permissions = [ | ||
"Set", | ||
] | ||
} | ||
purge_protection_enabled = true | ||
network_acls { | ||
default_action = "Deny" | ||
bypass = "AzureServices" | ||
} | ||
tags = { | ||
pike = "permissions" | ||
} | ||
} | ||
|
||
output "key_vault" { | ||
value = azurerm_key_vault.example | ||
} |
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,6 @@ | ||
|
||
data "azurerm_client_config" "current" {} | ||
|
||
output "config" { | ||
value = data.azurerm_client_config.current | ||
} |
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,8 @@ | ||
|
||
data "azurerm_resource_group" "pike" { | ||
name = "pike" | ||
} | ||
|
||
output "rg" { | ||
value = data.azurerm_resource_group.pike | ||
} |
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