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

add check for available service provider - azurerm_bot_connection #7279

Merged
merged 5 commits into from
Jun 11, 2020

Conversation

njuCZ
Copy link
Contributor

@njuCZ njuCZ commented Jun 10, 2020

fix #6873

the error message from the service is not user-friendly.

add check for available service provider

@ghost ghost added the size/XS label Jun 10, 2020
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.

hey @njuCZ

Thanks for this PR - I've taken a look through and left a couple of comments inline but this is looking good - if we can fix the two comments up then this should otherwise be good to merge 👍

Thanks!

azurerm/internal/services/bot/bot_connection_resource.go Outdated Show resolved Hide resolved
azurerm/internal/services/bot/bot_connection_resource.go Outdated Show resolved Hide resolved
@ghost ghost added size/S and removed size/XS labels Jun 10, 2020
@njuCZ
Copy link
Contributor Author

njuCZ commented Jun 10, 2020

@tombuildsstuff thanks for your suggestion, I have modified the PR. Please have a look again

@ghost ghost removed the waiting-response label Jun 10, 2020
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 👍

@tombuildsstuff
Copy link
Contributor

@njuCZ running the test for this, this fails:

=== RUN   TestAccAzureRMBotChannelsRegistration
=== RUN   TestAccAzureRMBotChannelsRegistration/connection
=== RUN   TestAccAzureRMBotChannelsRegistration/connection/basic
=== RUN   TestAccAzureRMBotChannelsRegistration/connection/complete
TestAccAzureRMBotChannelsRegistration/connection/complete: testing.go:640: Step 0 error: errors during apply:
Error: the Service Provider "Salesforce" was not found. The available service providers are wunderlist,google,pinterest,appFigures,facebook,SkypeForBusiness,outlook,SharePointOnline,Aadv2,linkedin,trello,SharepointServer,oauth2,slack,zendesk,DynamicsCrmOnline,Aad,smartsheet,flickr,Office365,onedrive,basecamp,instagram,mailchimp,Office365User,echosign,live,oauth2generic,spotify,tumblr,AWeber,marketo,dropbox,box,yammer,intuit,uservoice,salesforce,todoist,github,docusign,stripe,bitly,lithium,sugarcrm

can we update this to be a case-insensitive comparison?

@njuCZ
Copy link
Contributor Author

njuCZ commented Jun 10, 2020

Hi @tombuildsstuff sorry for the acctest. I made a change to send ServiceProviderID rather than ServiceProviderDisplayName, because I thought it might be more stable. Please have a look again

image

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 👍

@tombuildsstuff tombuildsstuff added this to the v2.15.0 milestone Jun 11, 2020
@tombuildsstuff
Copy link
Contributor

Tests pass:

Screenshot 2020-06-11 at 18 20 53

@tombuildsstuff tombuildsstuff merged commit 354e059 into hashicorp:master Jun 11, 2020
tombuildsstuff added a commit that referenced this pull request Jun 11, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

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

@ghost
Copy link

ghost commented Jul 12, 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 12, 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.

azurerm_bot_connection Azure Active Directory
2 participants