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

Added new datasource for keyvault access policies #423

Merged
merged 2 commits into from
Oct 16, 2017

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented Oct 12, 2017

This PR adds keyvault access policies for the templates found on the Azure web portal

make testacc TEST=./azurerm TESTARGS="-run=TestAccDataSourceAzureRMKeyVaultAccessPolicy"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run=TestAccDataSourceAzureRMKeyVaultAccessPolicy -timeout 120m
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_key
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_key (6.17s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_secret
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_secret (5.34s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_certificate
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_certificate (4.50s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_keySecret
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_keySecret (4.69s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_keyCertificate
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_keyCertificate (4.65s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_secretCertificate
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_secretCertificate (4.89s)
=== RUN   TestAccDataSourceAzureRMKeyVaultAccessPolicy_keySecretCertificate
--- PASS: TestAccDataSourceAzureRMKeyVaultAccessPolicy_keySecretCertificate (4.90s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	35.173s

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.

otherwise LGTM - thanks for this!

"Key & Secret Management",
"Key & Certificate Management",
"Secret & Certificate Management",
"Key, Secret, & Certificate Management",
Copy link
Contributor

Choose a reason for hiding this comment

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

minor does the Portal have the second comma?

}
if strings.Contains(name, "Certificate") {
d.Set("certificate_permissions", templateManagementPermissions["certificate"])
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 do we need to set an empty list for each of these values if it's not present?

Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(dataSourceName, "key_permissions.#", "9"),
resource.TestCheckNoResourceAttr(dataSourceName, "secret_permissions"),
resource.TestCheckNoResourceAttr(dataSourceName, "certificate_permissions"),
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 should we be checking there's 0 here?

@tombuildsstuff
Copy link
Contributor

Fixes #415

@tombuildsstuff tombuildsstuff merged commit 5fe72b4 into master Oct 16, 2017
@tombuildsstuff tombuildsstuff deleted the f-add-datasource-access-policies branch October 16, 2017 07:48
tombuildsstuff added a commit that referenced this pull request Oct 16, 2017
@ghost
Copy link

ghost commented Apr 1, 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!

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

2 participants