-
Notifications
You must be signed in to change notification settings - Fork 709
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 #755 from aztfmod/patch.5.4.6
Patch 5.4.6
- Loading branch information
Showing
80 changed files
with
1,609 additions
and
165 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
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
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,43 @@ | ||
##### database_migration_services | ||
module "database_migration_services" { | ||
source = "./modules/databases/database_migration_service" | ||
|
||
for_each = local.database.database_migration_services | ||
|
||
client_config = local.client_config | ||
location = lookup(each.value, "region", null) == null ? local.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region] | ||
resource_group_name = local.resource_groups[each.value.resource_group_key].name | ||
settings = each.value | ||
global_settings = local.global_settings | ||
base_tags = try(local.global_settings.inherit_tags, false) ? local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].tags : {} | ||
|
||
remote_objects = { | ||
vnets = local.combined_objects_networking | ||
} | ||
} | ||
|
||
output "database_migration_services" { | ||
value = module.database_migration_services | ||
} | ||
|
||
##### database_migration_projects | ||
module "database_migration_projects" { | ||
source = "./modules/databases/database_migration_project" | ||
|
||
for_each = local.database.database_migration_projects | ||
|
||
client_config = local.client_config | ||
location = lookup(each.value, "region", null) == null ? local.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region] | ||
resource_group_name = local.resource_groups[each.value.resource_group_key].name | ||
database_migration_services = local.combined_objects_database_migration_services | ||
settings = each.value | ||
global_settings = local.global_settings | ||
base_tags = try(local.global_settings.inherit_tags, false) ? local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].tags : {} | ||
remote_objects = { | ||
vnets = local.combined_objects_networking | ||
} | ||
} | ||
|
||
output "database_migration_projects" { | ||
value = module.database_migration_projects | ||
} |
68 changes: 68 additions & 0 deletions
68
examples/database_migration_services/100-dms/configuration.tfvars
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,68 @@ | ||
# | ||
# Global settings | ||
# | ||
global_settings = { | ||
default_region = "region1" | ||
regions = { | ||
region1 = "southeastasia" | ||
} | ||
} | ||
|
||
# | ||
# Resource groups to be created | ||
# | ||
resource_groups = { | ||
dms = { | ||
name = "database-migration-re1" | ||
region = "region1" | ||
} | ||
} | ||
|
||
|
||
vnets = { | ||
vnet_region1 = { | ||
resource_group_key = "dms" | ||
vnet = { | ||
name = "virtual_machines" | ||
address_space = ["10.100.100.0/24"] | ||
} | ||
specialsubnets = {} | ||
subnets = { | ||
example = { | ||
name = "examples" | ||
cidr = ["10.100.100.0/29"] | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
database_migration_services = { | ||
dmstest = { | ||
name = "test-dms" | ||
resource_group_key = "dms" | ||
region = "region1" | ||
sku_name = "Premium_4vCores" | ||
subnet = { | ||
vnet_key = "vnet_region1" | ||
subnet_key = "example" | ||
#lz_key | ||
#subnet_id | ||
} | ||
} | ||
} | ||
|
||
database_migration_projects = { | ||
project1 = { | ||
name = "project1" | ||
resource_group_key = "dms" | ||
region = "region1" | ||
service = { | ||
key = "dmstest" | ||
#name | ||
#lz_key | ||
} | ||
source_platform = "SQL" | ||
target_platform = "SQLDB" | ||
} | ||
} |
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,55 @@ | ||
# Azure Database Migration Services and Projects | ||
|
||
This module is part of Cloud Adoption Framework landing zones for Azure on Terraform. | ||
|
||
For an overview of the service, please refer to [Azure documentation](https://azure.microsoft.com/en-us/services/database-migration/#overview) | ||
|
||
## Example scenarios | ||
|
||
The following examples are available: | ||
|
||
| Scenario | Description | | ||
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ||
| [100-dms](./100-dms) | Simple example to create a database migration service and an associated projects. | | ||
|
||
You can instantiate this directly using the following parameters: | ||
|
||
```hcl | ||
module "caf" { | ||
source = "aztfmod/caf/azurerm" | ||
version = "5.4.3" | ||
#pass the required variables | ||
} | ||
``` | ||
|
||
## Run this example | ||
|
||
You can run this example directly using Terraform or via rover: | ||
|
||
### With Terraform | ||
|
||
```bash | ||
#Login to your Azure subscription | ||
az login | ||
|
||
#Run the example | ||
cd /tf/caf/examples | ||
|
||
terraform init | ||
|
||
terraform [plan | apply | destroy] \ | ||
-var-file ../modules/databases/database_migration_service/examples/100-dms/configuration.tfvars | ||
``` | ||
|
||
### With rover | ||
|
||
To test this deployment in the example landingzone, make sure the launchpad has been deployed first, then run the following command: | ||
|
||
```bash | ||
rover \ | ||
-lz /tf/caf/examples \ | ||
-var-folder ../modules/databases/database_migration_service/examples/100-dms \ | ||
-level level1 \ | ||
-a [plan | apply | destroy] | ||
``` |
Oops, something went wrong.