Skip to content

Commit edb143f

Browse files
committed
tflint fix
1 parent d0b5d75 commit edb143f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

internal/services/eventgrid/eventgrid_domain_resource.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func resourceEventGridDomainCreate(d *pluginsdk.ResourceData, meta interface{})
251251
InputSchema: pointer.To(domains.InputSchema(d.Get("input_schema").(string))),
252252
InputSchemaMapping: expandDomainInputMapping(d),
253253
PublicNetworkAccess: pointer.To(publicNetworkAccess),
254-
MinimumTlsVersionAllowed: d.Get("minimum_tls_version").(*domains.TlsVersion),
254+
MinimumTlsVersionAllowed: pointer.To(domains.TlsVersion(d.Get("minimal_tls_version").(string))),
255255
},
256256
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
257257
}
@@ -416,9 +416,11 @@ func resourceEventGridDomainRead(d *pluginsdk.ResourceData, meta interface{}) er
416416
}
417417
d.Set("auto_create_topic_with_first_subscription", autoCreateTopicWithFirstSubscription)
418418

419+
minimumTlsVersion := string(domains.TlsVersionOnePointTwo)
419420
if props.MinimumTlsVersionAllowed != nil {
420-
d.Set("minimum_tls_version", props.MinimumTlsVersionAllowed)
421+
minimumTlsVersion = string(*props.MinimumTlsVersionAllowed)
421422
}
423+
d.Set("minimum_tls_version", minimumTlsVersion)
422424

423425
autoDeleteTopicWithLastSubscription := true
424426
if props.AutoDeleteTopicWithLastSubscription != nil {

internal/services/eventgrid/eventgrid_topic_resource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,11 @@ func resourceEventGridTopicRead(d *pluginsdk.ResourceData, meta interface{}) err
366366
}
367367
d.Set("public_network_access_enabled", publicNetworkAccessEnabled)
368368

369+
minimumTlsVersion := topics.TlsVersion(topics.TlsVersionOnePointTwo)
369370
if props.MinimumTlsVersionAllowed != nil {
370-
d.Set("minimum_tls_version", props.MinimumTlsVersionAllowed)
371+
minimumTlsVersion = topics.TlsVersion(*props.MinimumTlsVersionAllowed)
371372
}
373+
d.Set("minimum_tls_version", minimumTlsVersion)
372374

373375
inboundIPRules := flattenTopicInboundIPRules(props.InboundIPRules)
374376
if err := d.Set("inbound_ip_rule", inboundIPRules); err != nil {

website/docs/r/eventgrid_domain.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The following arguments are supported:
5858

5959
* `inbound_ip_rule` - (Optional) One or more `inbound_ip_rule` blocks as defined below.
6060

61-
* `minimum_tls_version` - (Optional) The minimum TLS version that clients can use. Possible values are `1.0`, `1.1`, `1.2`. Default is `1.2`.
61+
* `minimum_tls_version` - (Optional) The minimum TLS version that clients can use. Possible values are `1.0`, `1.1`, `1.2`. Default is `1.2`.
6262

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

0 commit comments

Comments
 (0)