-
eldorado77 and
Baki Onur Okutucu are now friends 2 years, 4 months ago
-
eldorado77 commented on
PowerShell Desired State Configuration (DSC) – Part 1: Introduction 3 years, 6 months ago
Hello!
I've got a trouble:
Deploying Azure VM's with Terraform and DSC, there are two Network interfaces on each VM with DHCP assigned IP addresses, and should be two sites on each VM's – "Site1" and "Site2", all is ok except one thing – here is a part of DSC template:
xWebSite Site1Site { DependsOn = @("[xWebAppPool]Site1AppPool","[File]Site1Folder","[File]AutoRedirect","[File]SeattleHTML") Ensure = "Present" Name = "Site1" State = "Started" BindingInfo = @( MSFT_xWebBindingInformation { MSFT_xWebBindingInformation { Protocol = "HTTPS" Port = 443 CertificateThumbprint = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" IPAddress = "*" } ) ........................................... Name = "Site2" State = "Started" BindingInfo = @( MSFT_xWebBindingInformation { MSFT_xWebBindingInformation { Protocol = "HTTPS" Port = 443 CertificateThumbprint = "yyyyyyyyyyyyyyyyyyyyyy" IPAddress = "*" } .......................................... So, this DSC never can be executed properly due to duplicate binding for port 433 - IPAddress = "*" how to get next, to be executed inside DSC template (something like that or other with same result): #for Site1 IPAddress = (gip).IPv4Address.IPAddress[0] #getting first Network adapter IP address #and for Site2 IPAddress = (gip).IPv4Address.IPAddress[1] #getting second Network adapter IP address
inside binding section..
-