Clarify examples and read me

This commit is contained in:
Dennis Eikelenboom 2021-08-18 10:36:04 -07:00
parent 3cb80cebe4
commit 79449910c3
7 changed files with 47 additions and 27 deletions

View File

@ -1,6 +1,16 @@
terraform {
required_version = ">=0.15.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.56.0"
}
}
}
provider "azurerm" {
version = "~>2.0"
features {}
features {}
}
data "azurerm_client_config" "current" {}

View File

@ -27,13 +27,7 @@ This template describes the minimal set of resources you require to get started
## Usage
```bash
terraform plan \
-var 'name=azureml999' \
-var 'environment=dev' \
-var 'location=East US' \
-out demo.tfplan
terraform plan -var name=azureml567 -out demo.tfplan
terraform apply demo.tfplan
terraform apply "demo.tfplan"
```
\* Example shown with [Bash](https://www.gnu.org/software/bash/). For [Powershell](https://docs.microsoft.com/en-us/powershell/) replace backslashes with backticks.

View File

@ -1,6 +1,16 @@
terraform {
required_version = ">=0.15.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.72.0"
}
}
}
provider "azurerm" {
version = "~>2.0"
features {}
features {}
}
data "azurerm_client_config" "current" {}
@ -8,4 +18,4 @@ data "azurerm_client_config" "current" {}
resource "azurerm_resource_group" "default" {
name = "${var.name}-${var.environment}-rgp"
location = "${var.location}"
}
}

View File

@ -1,7 +1,7 @@
# Virtual Network resources
# Virtual Network
resource "azurerm_virtual_network" "default" {
name = "${var.name}-${var.environment}-vnet"
address_space = ["10.0.0.0/16"]
address_space = var.vnet_address_space
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
}
@ -10,11 +10,11 @@ resource "azurerm_subnet" "mlsubnet" {
name = "mlsubnet"
resource_group_name = azurerm_resource_group.default.name
virtual_network_name = azurerm_virtual_network.default.name
address_prefixes = ["10.0.1.0/24"]
address_prefixes = var.subnet_address_space
enforce_private_link_endpoint_network_policies = true
}
# DNS zones
# Private DNS Zones
resource "azurerm_private_dns_zone" "dnsvault" {
name = "privatelink.vaultcore.azure.net"
resource_group_name = azurerm_resource_group.default.name

View File

@ -38,13 +38,7 @@ To learn more about security configurations in Azure Machine Learning, see [Ente
## Usage
```bash
terraform plan \
-var 'name=azureml999' \
-var 'environment=dev' \
-var 'location=East US' \
-out demo.tfplan
terraform plan -var name=azureml567 -out demo.tfplan
terraform apply demo.tfplan
terraform apply "demo.tfplan"
```
\* Example shown with [Bash](https://www.gnu.org/software/bash/). For [Powershell](https://docs.microsoft.com/en-us/powershell/) replace backslashes with backticks.

View File

@ -1,7 +1,7 @@
variable "name" {
type = string
description = "Name of the deployment"
default = "mlple999"
default = "azureml568"
}
variable "environment" {
@ -14,4 +14,16 @@ variable "location" {
type = string
description = "Location of the resources"
default = "East US"
}
variable "vnet_address_space" {
type = list(string)
description = "Address space of the subnet"
default = ["10.0.0.0/16"]
}
variable "subnet_address_space" {
type = list(string)
description = "Address space of the subnet"
default = ["10.0.0.0/24"]
}

View File

@ -1,4 +1,4 @@
# Dependent resources for Azure Machine Learning
# Dependent resources for the workspace
resource "azurerm_application_insights" "default" {
name = "${var.name}-${var.environment}-ain"
location = azurerm_resource_group.default.location