Skip to content

Commit

Permalink
Merge remote-tracking branch 'local-from/develop' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
CI (Automated) committed Feb 2, 2018
2 parents aaf7cdf + 11d64bc commit 8e28bdd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions bosh-psmodules/modules/BOSH.CFCell/BOSH.CFCell.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,26 @@ function set-firewall {
check-firewall "private"
check-firewall "domain"
Write-Log "Finished setting firewall rules"

$MetadataServerAllowRules = Get-NetFirewallRule -Enabled True -Direction Outbound | Get-NetFirewallAddressFilter | Where-Object -FilterScript { $_.RemoteAddress -Eq '169.254.169.254' }
If ($MetadataServerAllowRules -Ne $null) {
Write-Log "Removing firewall rule that allows access to metadata server"
$MetadataServerAllowRules | Remove-NetFirewallRule
New-NetFirewallRule `
-Name "Allow-GCEAgent-Metadata-Server" `
-DisplayName "Allow GCEAgent to reach the GCP metadata server" `
-Direction Outbound `
-Action Allow `
-RemoteAddress "169.254.169.254" `
-Service "GCEAgent"
New-NetFirewallRule `
-Name "Allow-BOSH-Agent-Metadata-Server" `
-DisplayName "Allow BOSH Agent to reach the GCP metadata server" `
-Direction Outbound `
-Action Allow `
-RemoteAddress "169.254.169.254" `
-Service "bosh-agent"
}
}

function get-firewall {
Expand Down
2 changes: 1 addition & 1 deletion lib/packer/config/aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def provisioners
private
def instance_type
if @os == 'windows2016'
return 't2.large'
return 'm5.large'
end

return 'm4.xlarge'
Expand Down
2 changes: 1 addition & 1 deletion spec/packer/config/aws_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'secret_key' => 'secretkey',
'region' => 'region1',
'source_ami' => 'baseami1',
'instance_type' => 't2.large',
'instance_type' => 'm5.large',
'vpc_id' => 'vpc1',
'subnet_id' => 'subnet1',
'associate_public_ip_address' => true,
Expand Down

0 comments on commit 8e28bdd

Please sign in to comment.