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
variable "data_disks" { | |
default = [ | |
{ | |
lun = 0 | |
size = 32 | |
}, | |
{ | |
lun = 1 | |
size = 128 | |
}, |
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
resource "azurerm_virtual_machine" "myvm" { | |
name = "myvm0" | |
resource_group_name = "my-rg" | |
vm_size = "Standard_A2_v2" | |
location = "centralus" | |
network_interface_ids = ["${azurerm_network_interface.myvm.id}"] | |
storage_image_reference { | |
publisher = "MicrosoftWindowsServer" | |
offer = "WindowsServer" |
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
data "azurerm_subscription" "primary" {} | |
resource "random_string" "password" { | |
length = 32 | |
special = true | |
} | |
locals { | |
spn_name = "tfexample" | |
spn_expire = "2020-01-01T00:00:00Z" |
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
resource "azurerm_resource_group" "main" { | |
name = "cardinal-rg" | |
location = "centralus" | |
} | |
resource "azurerm_management_lock" "resource-group-level" { | |
name = "resource-group-level" | |
scope = "${azurerm_resource_group.main.id}" | |
lock_level = "ReadOnly" | |
notes = "This Resource Group is Read-Only" |
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
data "template_file" "requiredTag_policy_rule" { | |
template = <<POLICY_RULE | |
{ | |
"if": { | |
"field": "[concat('tags[', parameters('tagName'), ']')]", | |
"exists": "false" | |
}, | |
"then": { | |
"effect": "audit" | |
} |
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
2018/03/17 16:34:20 [INFO] Terraform version: 0.11.4 7878d66b386e5474102b5047722c2de2b3237278 | |
2018/03/17 16:34:20 [INFO] Go runtime version: go1.10 | |
2018/03/17 16:34:20 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/0.6.0/versions/0.11.4/terraform", "apply", "--auto-approve"} | |
2018/03/17 16:34:20 [DEBUG] Attempting to open CLI config file: /Users/REDACTED/.terraformrc | |
2018/03/17 16:34:20 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2018/03/17 16:34:20 [INFO] CLI command args: []string{"apply", "--auto-approve"} | |
2018/03/17 16:34:20 [INFO] command: empty terraform config, returning nil | |
2018/03/17 16:34:20 [DEBUG] command: no data state file found for backend config | |
2018/03/17 16:34:20 [DEBUG] New state was assigned lineage "a2f5e219-9ab1-393f-192e-0e4c8efe354d" | |
2018/03/17 16:34:20 [INFO] command: backend initialized: <nil> |
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
public class DataInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
var isProd = ConfigurationManager.AppSettings["IsProduction"] == "True"; | |
container.Register(Component.For<ExceptionAspect>()); | |
container.Register(Component.For<TimingAspect>()); | |
var iProjData = Component.For<IProjectData>().ImplementedBy<ProjectDataLocal>(); | |
iProjData.Interceptors(typeof(ExceptionAspect)); |
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
[ExceptionAspect] | |
[TimingAspect] | |
public List<ProjectItem> GetAllItems() | |
{ | |
return _masterList; | |
} |
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
public class DataInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.Register(Component.For<ExceptionAspect>()); | |
container.Register(Component.For<TimingAspect>()); | |
container.Register(Component.For<IProjectData>() | |
.ImplementedBy<ProjectDataLocal>() | |
.Interceptors( |
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
public class TimingAspect : Aspect | |
{ | |
public override void ProcessInvocation(IInvocation invocation) | |
{ | |
var sw = Stopwatch.StartNew(); | |
invocation.Proceed(); | |
sw.Stop(); | |
Console.WriteLine("({0})Elapsed: {1}", invocation.MethodInvocationTarget.Name, sw.Elapsed); | |
} | |
} |