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

Update eventhub_namespace for ZoneRedundant property #7534

Merged
merged 6 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func dataSourceEventHubNamespace() *schema.Resource {
Computed: true,
},

"zone_redundant": {
Type: schema.TypeBool,
Computed: true,
},

"capacity": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -141,6 +146,7 @@ func dataSourceEventHubNamespaceRead(d *schema.ResourceData, meta interface{}) e
d.Set("auto_inflate_enabled", props.IsAutoInflateEnabled)
d.Set("kafka_enabled", props.KafkaEnabled)
d.Set("maximum_throughput_units", int(*props.MaximumThroughputUnits))
d.Set("zone_redundant", props.ZoneRedundant)
}

return tags.FlattenAndSet(d, resp.Tags)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ func resourceArmEventHubNamespace() *schema.Resource {
Default: false,
},

"zone_redundant": {
favoretti marked this conversation as resolved.
Show resolved Hide resolved
Type: schema.TypeBool,
Optional: true,
Default: false,
favoretti marked this conversation as resolved.
Show resolved Hide resolved
},

"maximum_throughput_units": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -226,6 +232,7 @@ func resourceArmEventHubNamespaceCreateUpdate(d *schema.ResourceData, meta inter
capacity := int32(d.Get("capacity").(int))
t := d.Get("tags").(map[string]interface{})
autoInflateEnabled := d.Get("auto_inflate_enabled").(bool)
zoneRedundant := d.Get("zone_redundant").(bool)

parameters := eventhub.EHNamespace{
Location: &location,
Expand All @@ -236,6 +243,7 @@ func resourceArmEventHubNamespaceCreateUpdate(d *schema.ResourceData, meta inter
},
EHNamespaceProperties: &eventhub.EHNamespaceProperties{
IsAutoInflateEnabled: utils.Bool(autoInflateEnabled),
ZoneRedundant: utils.Bool(zoneRedundant),
},
Tags: tags.Expand(t),
}
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/eventhub_namespace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ output "eventhub_namespace_id" {

* `maximum_throughput_units` - Specifies the maximum number of throughput units when Auto Inflate is Enabled.

* `zone_redundant` - Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.
favoretti marked this conversation as resolved.
Show resolved Hide resolved

* `tags` - A mapping of tags to assign to the EventHub Namespace.

The following attributes are exported only if there is an authorization rule named
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/eventhub_namespace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ The following arguments are supported:

* `maximum_throughput_units` - (Optional) Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `20`.

* `zone_redundant` - (Optional) Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.
favoretti marked this conversation as resolved.
Show resolved Hide resolved

* `tags` - (Optional) A mapping of tags to assign to the resource.

* `network_rulesets` - (Optional) A `network_rulesets` block as defined below.
Expand Down