-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CDN] Fixes #12152: Add custom domain BYOC support. #12648
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,6 +135,33 @@ def load_arguments(self, _): | |
| with self.argument_context('cdn custom-domain create') as c: | ||
| c.argument('location', validator=get_default_location_from_resource_group) | ||
|
|
||
| with self.argument_context('cdn custom-domain enable-https') as c: | ||
| c.argument('profile_name', id_part=None, help='Name of the parent profile.') | ||
| c.argument('endpoint_name', help='Name of the parent endpoint.') | ||
| c.argument('custom_domain_name', name_arg_type, help='Name of the custom domain.') | ||
| c.argument('min_tls_version', | ||
| help='The minimum TLS version required for the custom domain.', | ||
| arg_type=get_enum_type(['none', '1.0', '1.2'])) | ||
| c.argument('user_cert_protocol_type', | ||
|
fore5fire marked this conversation as resolved.
Outdated
|
||
| arg_group='Bring Your Own Certificate', | ||
| help='The protocol type of the certificate.', | ||
| arg_type=get_enum_type(['sni', 'ip'])) | ||
| c.argument('user_cert_subscription_id', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to support one secret id argument?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a non-trivial request, as we would need to add extra logic to retrieve the correct resource group name for the secret, which is not included in the secret id because it doesn't use a standard Azure resource id. We would also have to correctly handle permissions issues where the user may not have permission to perform that lookup even though they do have permission to reference the key through CDN. Can we include this later as a separate PR if customers request it? |
||
| arg_group='Bring Your Own Certificate', | ||
| help='The subscription id of the KeyVault certificate') | ||
| c.argument('user_cert_group_name', | ||
| arg_group='Bring Your Own Certificate', | ||
| help='The resource group of the KeyVault certificate') | ||
| c.argument('user_cert_vault_name', | ||
| arg_group='Bring Your Own Certificate', | ||
| help='The vault name of the KeyVault certificate') | ||
| c.argument('user_cert_secret_name', | ||
| arg_group='Bring Your Own Certificate', | ||
| help='The secret name of the KeyVault certificate') | ||
| c.argument('user_cert_secret_version', | ||
| arg_group='Bring Your Own Certificate', | ||
| help='The secret version of the KeyVault certificate') | ||
|
|
||
| # Origin # | ||
| with self.argument_context('cdn origin') as c: | ||
| c.argument('origin_name', name_arg_type, id_part='name') | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Prefer ['--name', '-n' ]
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.
The name_arg_type parameter to the argument custom_domain_name already makes the parameter use --name, -n as requested. See the example for
cdn custom-domain enable-https