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
support alias connection strings for eventhub resources #6708
Changes from 6 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 |
---|---|---|
|
@@ -34,12 +34,19 @@ func dataSourceEventHubNamespaceAuthorizationRule() *schema.Resource { | |
|
||
"resource_group_name": azure.SchemaResourceGroupNameForDataSource(), | ||
|
||
"listen": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
"primary_connection_string_alias": { | ||
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. these are not ordered correctly? |
||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"send": { | ||
"secondary_connection_string_alias": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"listen": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
}, | ||
|
@@ -49,29 +56,34 @@ func dataSourceEventHubNamespaceAuthorizationRule() *schema.Resource { | |
Computed: true, | ||
}, | ||
|
||
"primary_key": { | ||
"primary_connection_string": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"primary_connection_string": { | ||
"primary_key": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"secondary_key": { | ||
"secondary_connection_string": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"secondary_connection_string": { | ||
"secondary_key": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"send": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
}, | ||
}, | ||
} | ||
} | ||
|
@@ -118,6 +130,8 @@ func dataSourceEventHubNamespaceAuthorizationRuleRead(d *schema.ResourceData, me | |
d.Set("secondary_key", keysResp.SecondaryKey) | ||
d.Set("primary_connection_string", keysResp.PrimaryConnectionString) | ||
d.Set("secondary_connection_string", keysResp.SecondaryConnectionString) | ||
d.Set("primary_connection_string_alias", keysResp.AliasPrimaryConnectionString) | ||
d.Set("secondary_connection_string_alias", keysResp.AliasSecondaryConnectionString) | ||
|
||
return nil | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,13 +158,19 @@ func resourceArmEventHubNamespace() *schema.Resource { | |
}, | ||
}, | ||
|
||
"default_primary_connection_string": { | ||
"alias_default_primary_connection_string": { | ||
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. I think you missed on here? |
||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"default_secondary_connection_string": { | ||
"alias_default_secondary_connection_string": { | ||
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. I think you missed on here? |
||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"default_primary_connection_string": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
|
@@ -176,6 +182,12 @@ func resourceArmEventHubNamespace() *schema.Resource { | |
Sensitive: true, | ||
}, | ||
|
||
"default_secondary_connection_string": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Sensitive: true, | ||
}, | ||
|
||
"default_secondary_key": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
|
@@ -326,6 +338,8 @@ func resourceArmEventHubNamespaceRead(d *schema.ResourceData, meta interface{}) | |
if err != nil { | ||
log.Printf("[WARN] Unable to List default keys for EventHub Namespace %q: %+v", name, err) | ||
} else { | ||
d.Set("alias_default_primary_connection_string", keys.AliasPrimaryConnectionString) | ||
d.Set("alias_default_secondary_connection_string", keys.AliasSecondaryConnectionString) | ||
d.Set("default_primary_connection_string", keys.PrimaryConnectionString) | ||
d.Set("default_secondary_connection_string", keys.SecondaryConnectionString) | ||
d.Set("default_primary_key", keys.PrimaryKey) | ||
|
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.
these are not ordered correctly?