Skip to content
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

azurerm_service_fabric_cluster - support for Client Certificate by common names (#4528) #6097

Merged

Conversation

JSchenken
Copy link
Contributor

Addressing #4528

Added support in azurerm_service_fabric_cluster for client_certificate_common_name block. Example block:

client_certificate_common_name {
  certificate_common_name = "CertificateCommonName"
  is_admin   = true
  certificate_issuer_thumbprint = "3341DB6CF2AF72C611DF3BE3721A653AF1D43ECD50F584F828793DBE9103C3EE"
}

Change also required updating unit tests for Cluster Code Version (previous was no longer supported) as well as updating thumbprints from "33:41:DB:6C:F2:AF:72:C6:11:DF:3B:E3:72:1A:65:3A:F1:D4:3E:CD:50:F5:84:F8:28:79:3D:BE:91:03:C3:EE"
to
"3341DB6CF2AF72C611DF3BE3721A653AF1D43ECD50F584F828793DBE9103C3EE"
to fix error of

Error: Error creating Service Fabric Cluster "acctest-200312100109887030" (Resource Group "acctestRG-200312100109887030"): servicefabric.ClustersClient#Create: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidCertificateThumbprint" Message="Certificate thumbprint '33:41:DB:6C:F2:AF:72:C6:11:DF:3B:E3:72:1A:65:3A:F1:D4:3E:CD:50:F5:84:F8:28:79:3D:BE:91:03:C3:EE' is invalid." Details=[]

@JSchenken JSchenken changed the title Add suport for specifying cluster Client Certificate by common name Address 4528: Add support for specifying cluster Client Certificate by common name Mar 12, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the enhancement @JSchenken! overall this looks good to me except for changing a couple names.

Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"certificate_issuer_thumbprint": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop the certificate

Suggested change
"certificate_issuer_thumbprint": {
"issuer_thumbprint": {

Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"certificate_common_name": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can make this

Suggested change
"certificate_common_name": {
"common_name": {

@katbyte katbyte added this to the v2.3.0 milestone Mar 25, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JSchenken,

hope you don't mind but i pushed the required changes tos get this merged 🙂 LGTM now 👍

@katbyte katbyte changed the title Address 4528: Add support for specifying cluster Client Certificate by common name azurerm_service_fabric_cluster - support for Client Certificate by common names (#4528) Mar 25, 2020
@katbyte katbyte merged commit 9e47779 into hashicorp:master Mar 25, 2020
katbyte added a commit that referenced this pull request Mar 25, 2020
@ghost
Copy link

ghost commented Mar 27, 2020

This has been released in version 2.3.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.3.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 24, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants