Basic Disk module
Terraform module -
It’s 100% Open Source and licensed under the APACHE2.
This is just a very basic example.
Include module.disk.tf this repository as a module in your existing terraform code:
module "disk" {
source = "JamesWoolfenden/disk/azurerm"
common_tags = var.common_tags
resource_group_name = var.resource_group_name
disk_name = var.disk_name
}
No requirements.
Name | Version |
---|---|
azurerm | n/a |
No modules.
Name | Type |
---|---|
azurerm_managed_disk.example | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
common_tags | This is to help you add tags to your cloud objects | map(any) |
n/a | yes |
disk_encryption_set_id | set id of managed disk encryption set | string |
n/a | yes |
disk_name | n/a | string |
n/a | yes |
disk_size_gb | n/a | number |
10 |
no |
location | n/a | string |
n/a | yes |
network_access_policy | n/a | string |
"DenyAll" |
no |
resource_group_name | n/a | string |
n/a | yes |
storage_account_type | n/a | string |
"Standard_LRS" |
no |
Name | Description |
---|---|
disk | n/a |
This is the policy required to build this project:
The Terraform resource required is:
resource "azurerm_role_definition" "terraform_pike" {
role_definition_id = local.uuid
name = "terraform_pike"
scope = data.azurerm_subscription.primary.id
permissions {
actions = [
"Microsoft.Compute/disks/delete",
"Microsoft.Compute/disks/read",
"Microsoft.Compute/disks/write",
"Microsoft.Resources/subscriptions/resourcegroups/read"]
not_actions = []
}
assignable_scopes = [
data.azurerm_subscription.primary.id,
]
}
locals {
uuid = uuid()
}
data "azurerm_subscription" "primary" {
}
Check out these related projects.
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2019-2023 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
“License”); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.