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

Support for certificate attributes - azurerm_key_vault_certificate #7387

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

njuCZ
Copy link
Contributor

@njuCZ njuCZ commented Jun 18, 2020

fix #7343

add export fields: certificate_attribute

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hi @njuCZ

I've run the tests for this but they fail due to the assertion being incorrect:

------- Stdout: -------
=== RUN   TestAccAzureRMKeyVaultCertificate_basicGenerate
=== PAUSE TestAccAzureRMKeyVaultCertificate_basicGenerate
=== CONT  TestAccAzureRMKeyVaultCertificate_basicGenerate
TestAccAzureRMKeyVaultCertificate_basicGenerate: testing.go:640: Step 0 error: Check failed: Check 5/5 error: azurerm_key_vault_certificate.test: Attribute 'certificate_attribute' expected to be set
--- FAIL: TestAccAzureRMKeyVaultCertificate_basicGenerate (274.74s)
FAIL

Would you be able to update the assertion here?

Thanks!

@@ -112,6 +112,7 @@ func TestAccAzureRMKeyVaultCertificate_basicGenerate(t *testing.T) {
resource.TestCheckResourceAttrSet(data.ResourceName, "secret_id"),
resource.TestCheckResourceAttrSet(data.ResourceName, "certificate_data"),
resource.TestCheckResourceAttrSet(data.ResourceName, "thumbprint"),
resource.TestCheckResourceAttrSet(data.ResourceName, "certificate_attribute"),
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is a nested block this needs to check fields within it:

Suggested change
resource.TestCheckResourceAttrSet(data.ResourceName, "certificate_attribute"),
resource.TestCheckResourceAttrSet(data.ResourceName, "certificate_attribute.0. created"),

@njuCZ
Copy link
Contributor Author

njuCZ commented Jun 28, 2020

@tombuildsstuff I have updated the test case, please have a look again.

@ghost ghost removed the waiting-response label Jun 28, 2020
@tombuildsstuff
Copy link
Contributor

Tests pass:

Screenshot 2020-07-01 at 11 16 54

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this @njuCZ

@tombuildsstuff tombuildsstuff merged commit e7cfff5 into hashicorp:master Jul 1, 2020
@ghost
Copy link

ghost commented Jul 3, 2020

This has been released in version 2.17.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.17.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 31, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 31, 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.

Support for certificate attributes in Key Vault Certificate exported attributes
3 participants