-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
action :create should delete and re-create binding if app_guid or hash do not match #306
Comments
What if the currently bound guid is a valid binding? I could imagine scenarios where a cookbook author binds an app to 443 inadvertantly not realizing another app is already bound (I have personally done this before). I'd think we'd want to raise the error here. |
I wanted to just setup a simple binding using the included (on ec2 anyway) rdp self-signed cert. If I specify the hash and port and ip_address, then I am bascially requesting that that specific certificate be bound to that port. Currently I have to have a removal first that doesn't write up very cleanly. windows_certificate_binding 'Unbind any non-matching certs' do
action :delete
name node.chef_provisioning.reference.winrm_ssl_thumbprint
name_kind :hash
address '0.0.0.0'
guard_interpreter :powershell_script
not_if <<-EOF
Import-Module WebAdministration
$x = Git-Item IIS:\SslBindings\0.0.0.0!443
$x.Thumbprint.CompareTo("#{node.chef_provisioning.reference.winrm_ssl_thumbprint}")
EOF
end
windows_certificate_binding 'Reuse RDP and WINRM self-signed cert for IIS' do
action :create
name_kind :hash
name node.chef_provisioning.reference.winrm_ssl_thumbprint
address '0.0.0.0'
end |
I think having an explicit deletion is the right thing to do for long lived infrastructure. Especially on web servers that host multiple sites, it would be too easy to inadvertently take down a web site. |
The text was updated successfully, but these errors were encountered: