This file contains hidden or 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
## Clueless about what your Powershell DSC Configuration is doing? No problem! You can find the log files in json format in this location: | |
## This is especially useful when you configure Reboots and there are DSC Resources that depend on that reboot. The log file will display what happened during the whole execution of the configuration pre and post-reboot | |
C:\Windows\System32\Configuration\ConfigurationStatus | |
#Troubleshooting Microsoft Link | |
# https://docs.microsoft.com/en-us/powershell/scripting/dsc/troubleshooting/troubleshooting?view=powershell-7 |
This file contains hidden or 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 "http" "myip" { | |
url = "http://ipv4.icanhazip.com" | |
} | |
resource "aws_security_group_rule" "ingress_with_cidr_blocks" { | |
... | |
ingress { | |
from_port = 5432 | |
to_port = 5432 | |
protocol = "tcp" |
This file contains hidden or 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
#Install Chocolatey | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
#Install Packages | |
choco install terraform -y | |
choco install awscli -y | |
#Refresh Environment Variables | |
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") |
This file contains hidden or 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
rackspace-public output will be in this color. | |
==> rackspace-public: Loading flavor: 8 | |
rackspace-public: Verified flavor. ID: 8 | |
==> rackspace-public: Pausing after run of step 'StepLoadFlavor'. Press enter to continue. | |
==> rackspace-public: Creating temporary keypair: packer_5b315e41-1c18-ff98-a141-d1c6ed53371a ... | |
==> rackspace-public: Created temporary keypair: packer_5b315e41-1c18-ff98-a141-d1c6ed53371a | |
==> rackspace-public: Successfully converted BER encoded SSH key to DER encoding. | |
rackspace-public: Saving key for debug purposes: os_rackspace-public.pem | |
==> rackspace-public: Pausing after run of step 'StepKeyPair'. Press enter to continue. |
This file contains hidden or 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
<powershell> | |
write-output "Running User Data Script" | |
write-host "(host) Running User Data Script" | |
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore | |
# Don't set this before Set-ExecutionPolicy as it throws an error | |
$ErrorActionPreference = "stop" |
This file contains hidden or 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
{ | |
"builders": [{ | |
"type": "openstack", | |
"name": "rackspace-public", | |
"region": "DFW", | |
"username": "USERNAME", | |
"password": "PASSWORD", | |
"openstack_provider": "rackspace", | |
"identity_endpoint": "https://identity.api.rackspacecloud.com/v2.0", |