-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource: azurerm_bot_channel_line #12746
Conversation
"line_registration": { | ||
Type: pluginsdk.TypeSet, | ||
Required: true, | ||
Elem: &pluginsdk.Resource{ | ||
Schema: map[string]*pluginsdk.Schema{ | ||
"channel_access_token": { | ||
Type: pluginsdk.TypeString, | ||
Required: true, | ||
Sensitive: true, | ||
ValidateFunc: validation.StringIsNotEmpty, | ||
}, | ||
|
||
"channel_secret": { | ||
Type: pluginsdk.TypeString, | ||
Required: true, | ||
Sensitive: true, | ||
ValidateFunc: validation.StringIsNotEmpty, | ||
}, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to put this in a block?
"line_registration": { | |
Type: pluginsdk.TypeSet, | |
Required: true, | |
Elem: &pluginsdk.Resource{ | |
Schema: map[string]*pluginsdk.Schema{ | |
"channel_access_token": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
"channel_secret": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
}, | |
}, | |
"line_channel_access_token": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
"line_channel_secret": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katbyte , Seems it has to be a block since I found it can configure multiple access tokens and secrets after tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry i missed that, how about we go with:
"line_registration": { | |
Type: pluginsdk.TypeSet, | |
Required: true, | |
Elem: &pluginsdk.Resource{ | |
Schema: map[string]*pluginsdk.Schema{ | |
"channel_access_token": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
"channel_secret": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
}, | |
}, | |
"line_channel": { | |
Type: pluginsdk.TypeSet, | |
Required: true, | |
Elem: &pluginsdk.Resource{ | |
Schema: map[string]*pluginsdk.Schema{ | |
"access_token": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
"secret": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
Sensitive: true, | |
ValidateFunc: validation.StringIsNotEmpty, | |
}, | |
}, | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@katbyte , thanks for your comment. I've updated code. Please have an another look. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THanks @neil-yechenwei - LGTM 🍰
This functionality has been released in v2.71.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Currently, TF doesn't support to create Bot Line Channel. So I submitted this PR to implement it.
With creating test data of Line Channel, please refer this doc.
--- PASS: TestAccBotChannelsRegistration/channel/lineComplete (238.88s)
--- PASS: TestAccBotChannelsRegistration/channel/lineUpdate (300.47s)
--- PASS: TestAccBotChannelsRegistration/channel/lineBasic (250.22s)
--- PASS: TestAccBotChannelsRegistration/channel/lineRequiresImport (226.83s)
API reference:
https://github.com/Azure/azure-rest-api-specs/blob/e3dbb827d99eaadf132075707373f6b4bda08fd9/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/botservice.json#L1903