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_role_definition: ability to lookup by name #2798

Merged
merged 3 commits into from
Jan 30, 2019

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Jan 30, 2019

fixes #2784

Also deprecates azurerm_builtin_role_definition as azurerm_role_definition supersedes it.

@katbyte
Copy link
Collaborator Author

katbyte commented Jan 30, 2019

tests:

[16:02:23] kt@snowbook:~/hashi/..3../terraform-providers/terraform-provider-azurerm▸roledef/data_by_name$ testazure TestAccDataSourceAzureRMRoleDefinition
==> Fixing source code with gofmt...
# This logic should match the search logic in scripts/gofmtcheck.sh
gofmt -s -w `find . -name '*.go' | grep -v vendor`
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -test.run=TestAccDataSourceAzureRMRoleDefinition -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceAzureRMRoleDefinition_basic
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_basic
=== RUN   TestAccDataSourceAzureRMRoleDefinition_basicByName
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_basicByName
=== RUN   TestAccDataSourceAzureRMRoleDefinition_builtIn_contributor
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_builtIn_contributor
=== RUN   TestAccDataSourceAzureRMRoleDefinition_builtIn_owner
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_builtIn_owner
=== RUN   TestAccDataSourceAzureRMRoleDefinition_builtIn_reader
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_builtIn_reader
=== RUN   TestAccDataSourceAzureRMRoleDefinition_builtIn_virtualMachineContributor
=== PAUSE TestAccDataSourceAzureRMRoleDefinition_builtIn_virtualMachineContributor
=== CONT  TestAccDataSourceAzureRMRoleDefinition_basic
=== CONT  TestAccDataSourceAzureRMRoleDefinition_builtIn_reader
=== CONT  TestAccDataSourceAzureRMRoleDefinition_builtIn_contributor
=== CONT  TestAccDataSourceAzureRMRoleDefinition_builtIn_owner
=== CONT  TestAccDataSourceAzureRMRoleDefinition_basicByName
=== CONT  TestAccDataSourceAzureRMRoleDefinition_builtIn_virtualMachineContributor
--- PASS: TestAccDataSourceAzureRMRoleDefinition_builtIn_virtualMachineContributor (27.18s)
--- PASS: TestAccDataSourceAzureRMRoleDefinition_builtIn_contributor (27.25s)
--- PASS: TestAccDataSourceAzureRMRoleDefinition_builtIn_owner (27.51s)
--- PASS: TestAccDataSourceAzureRMRoleDefinition_builtIn_reader (27.90s)
--- PASS: TestAccDataSourceAzureRMRoleDefinition_basic (35.63s)
--- PASS: TestAccDataSourceAzureRMRoleDefinition_basicByName (36.10s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	36.146s
[16:03:18] kt@snowbook:~/hashi/..3../terraform-providers/terraform-provider-azurerm▸roledef/data_by_name$

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.

A couple of minor comments but this otherwise LGTM 👍

azurerm/data_source_builtin_role_definition.go Outdated Show resolved Hide resolved
azurerm/data_source_builtin_role_definition.go Outdated Show resolved Hide resolved
azurerm/data_source_role_definition.go Show resolved Hide resolved
website/docs/d/role_definition.markdown Outdated Show resolved Hide resolved
@tombuildsstuff
Copy link
Contributor

(Pushed a commit to fix those minor comments)

@tombuildsstuff tombuildsstuff merged commit 3f5d9f1 into master Jan 30, 2019
@tombuildsstuff tombuildsstuff deleted the roledef/data_by_name branch January 30, 2019 10:30
tombuildsstuff added a commit that referenced this pull request Jan 30, 2019
@ghost
Copy link

ghost commented Mar 5, 2019

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 Mar 5, 2019
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.

Data Source azurerm_role_definition: Lookup custom role definition by name
2 participants