Skip to content

scalair/terraform-azure-automation-certificate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-azure-automation-certificate

Terraform module to manage an Automation Account certificate.

Terraform Version Terraform Version

Usage

  source = "github.com/scalair/terraform-azure-automation-certificate"

  name                      = "AzureRunAsCertificate"
  resource_group_name       = "rg-project1-francecentral"
  automation_account_name   = "aa-ssl-1cd709"

  base64 = "/home/foo/cert.pfx"

Limitations

PFX certificate must NOT have password

Because the azurerm_automation_certificate terraform resource does not support PFX certifiate with password, you have to use a PFX certificate that does not have a password.

If you try to import a pfx that has a password, you'll get this kind of errror : Certificate base64Value is invalid.

Here is how to create a password-less pfx from your pfx :

openssl pkcs12 -in cert_with_pwd.pfx -clcerts -nokeys -out cert.crt
openssl pkcs12 -in cert_with_pwd.pfx -nocerts -out cert_encrypted.key
openssl rsa -in cert_encrypted.key -out cert.key
openssl pkcs12 -export -out cert_nopwd.pfx -inkey cert_encrypted.key -in cert.crt -passout pass:

Then you can use the newly created cert_nopwd.pfx file within the code.

About

Terraform module to manage an `Automation Account` certificate.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages