Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplateContent key is used when linked template is not a relative path LinkedTemplateContent = "template_content" // ParametersContent key is used to store parameter overrides for linked templates LinkedParametersContent = "parameters_content" // TemplateRelativePath key is used when linked template is not a uri or direct template LinkedTemplateRelativePath = "relativePath" )
Consts for linked templates
View Source
const ( AzureRMKeyVaultSecret = "azurerm_key_vault_secret" AzureRMKeyVault = "azurerm_key_vault" AzureRMKeyVaultKey = "azurerm_key_vault_key" AzureRMApplicationGateway = "azurerm_application_gateway" AzureRMMonitorDiagnosticSetting = "azurerm_monitor_diagnostic_setting" AzureRMKubernetesCluster = "azurerm_kubernetes_cluster" AzureRMManagedDisk = "azurerm_managed_disk" AzureRMCosmosDBAccount = "azurerm_cosmosdb_account" AzureRMContainerRegistry = "azurerm_container_registry" AzureRMManagementLock = "azurerm_management_lock" AzureRMRoleAssignment = "azurerm_role_assignment" AzureRMMSSQLServer = "azurerm_mssql_server" AzureRMMySQLServer = "azurerm_mysql_server" AzureRMNetworkWatcherFlowLog = "azurerm_network_watcher_flow_log" AzureRMResourceGroup = "azurerm_resource_group" AzureRMSecurityCenterContact = "azurerm_security_center_contact" AzureRMSecurityCenterSubscriptionPricing = "azurerm_security_center_subscription_pricing" AzureRMSQLActiveDirectoryAdministrator = "azurerm_sql_active_directory_administrator" AzureRMNetworkSecurityRule = "azurerm_network_security_rule" AzureRMPostgreSQLConfiguration = "azurerm_postgresql_configuration" AzureRMPostgreSQLServers = "azurerm_postgresql_server" AzureRMRedisCache = "azurerm_redis_cache" AzureRMRedisFirewallRule = "azurerm_redis_firewall_rule" AzureRMStorageAccount = "azurerm_storage_account" AzureRMSQLFirewallRule = "azurerm_sql_firewall_rule" AzureRMStorageContainer = "azurerm_storage_container" AzureRMVirtualMachine = "azurerm_virtual_machine" AzureRMVirtualNetwork = "azurerm_virtual_network" AzureRMMSSQLDBAuditingPolicy = "extended_auditing_policy" AzureRMPatchSchedule = "patch_schedule" AzureRMDeployments = "azurerm_resource_group_template_deployment" )
ARM equivalent TF resource types
Variables ¶
View Source
var ResourceTypes = map[string]string{ "Microsoft.KeyVault/vaults": AzureRMKeyVault, "Microsoft.KeyVault/vaults/keys": AzureRMKeyVaultKey, "Microsoft.KeyVault/vaults/secrets": AzureRMKeyVaultSecret, "Microsoft.Network/applicationGateways": AzureRMApplicationGateway, "Microsoft.Insights/diagnosticsettings": AzureRMMonitorDiagnosticSetting, "Microsoft.ContainerService/managedClusters": AzureRMKubernetesCluster, "Microsoft.Compute/disks": AzureRMManagedDisk, "Microsoft.DocumentDB/databaseAccounts": AzureRMCosmosDBAccount, "Microsoft.ContainerRegistry/registries": AzureRMContainerRegistry, "Microsoft.Authorization/locks": AzureRMManagementLock, "Microsoft.Authorization/roleAssignments": AzureRMRoleAssignment, "Microsoft.Sql/servers": AzureRMMSSQLServer, "Microsoft.DBforMySQL/servers": AzureRMMySQLServer, "Microsoft.Network/networkWatchers/flowLogs": AzureRMNetworkWatcherFlowLog, "Microsoft.Resources/resourceGroups": AzureRMResourceGroup, "Microsoft.Security/securityContacts": AzureRMSecurityCenterContact, "Microsoft.Security/pricings": AzureRMSecurityCenterSubscriptionPricing, "Microsoft.Sql/servers/administrators": AzureRMSQLActiveDirectoryAdministrator, "Microsoft.Network/networkSecurityGroups/securityRules": AzureRMNetworkSecurityRule, "Microsoft.DBforPostgreSQL/servers/configurations": AzureRMPostgreSQLConfiguration, "Microsoft.DBforPostgreSQL/servers": AzureRMPostgreSQLServers, "Microsoft.Cache/redis": AzureRMRedisCache, "Microsoft.Cache/redis/firewallRules": AzureRMRedisFirewallRule, "Microsoft.Storage/storageAccounts": AzureRMStorageAccount, "Microsoft.Sql/servers/firewallRules": AzureRMSQLFirewallRule, "Microsoft.Storage/storageAccounts/blobServices/containers": AzureRMStorageContainer, "Microsoft.Compute/virtualMachines": AzureRMVirtualMachine, "Microsoft.Network/virtualNetworks": AzureRMVirtualNetwork, "Microsoft.Sql/servers/auditingSettings": AzureRMMSSQLDBAuditingPolicy, "Microsoft.Cache/redis/patchSchedules": AzureRMPatchSchedule, "Microsoft.Resources/deployments": AzureRMDeployments, }
ResourceTypes holds mapping for ARM resource types to TF types
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { // Description of a parameter. Description string `json:"description"` }
Metadata for a parameter.
type Parameter ¶
type Parameter struct { // Type of parameter value. Type string `json:"type"` // Default value of parameter. DefaultValue interface{} `json:"defaultValue"` // Array of allowed values. AllowedValues []interface{} `json:"allowedValues"` // Minimum value for int. MinValue int `json:"minValue"` // Maximum value for int. MaxValue int `json:"maxValue"` // Minimum length for string or array parameter. MinLength int `json:"minLength"` // Maximum length for string or array parameter. MaxLength int `json:"maxLength"` // Metadata for parameter. Metadata Metadata `json:"metadata"` }
Parameter defines the values that are provided to customize a resource deployment.
type Resource ¶
type Resource struct { // Resource type. Type string `json:"type"` // The API Version of the resource. APIVersion string `json:"apiVersion"` // Resource name. Name string `json:"name"` // Resource location. Location string `json:"location"` // Resource tags. Tags map[string]interface{} `json:"tags"` // The SKU of the resource. SKU SKU `json:"sku"` // The kind of the resource. Kind string `json:"kind"` // The resource properties. Properties map[string]interface{} `json:"properties"` // Resource dependencies. DependsOn []string `json:"dependsOn"` // Used for specifying a scope different than the deployment scope. Scope string `json:"scope"` // Nested resources. Resources []Resource `json:"resources"` }
Resource represents an Azure resource in an ARM template.
type SKU ¶
type SKU struct { // Name of this SKU. Name string `json:"name"` // The tier of this SKU. Tier string `json:"tier"` }
SKU of the namespace.
type Template ¶
type Template struct { // Template schema. Schema string `json:"$schema"` // Version of the template content. ContentVersion string `json:"contentVersion"` // Template parameters. Parameters map[string]Parameter `json:"parameters"` // Template variables. Variables map[string]interface{} `json:"variables"` // A collection of Azure resources. Resources []Resource `json:"resources"` // Template output. Outputs interface{} `json:"outputs"` }
Template represents the base structure of an ARM template.
Click to show internal directories.
Click to hide internal directories.