Skip to content

Commit

Permalink
rename https_only to https_only_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed May 13, 2022
1 parent dfad45c commit c28bcbe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func resourceSpringCloudAPIPortal() *pluginsdk.Resource {
},
},

"https_only": {
"https_only_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
},
Expand Down Expand Up @@ -153,7 +153,7 @@ func resourceSpringCloudAPIPortalCreateUpdate(d *pluginsdk.ResourceData, meta in
apiPortalResource := appplatform.APIPortalResource{
Properties: &appplatform.APIPortalProperties{
GatewayIds: utils.ExpandStringSlice(d.Get("gateway_ids").(*pluginsdk.Set).List()),
HTTPSOnly: utils.Bool(d.Get("https_only").(bool)),
HTTPSOnly: utils.Bool(d.Get("https_only_enabled").(bool)),
Public: utils.Bool(d.Get("public_network_access_enabled").(bool)),
SsoProperties: expandAPIPortalSsoProperties(d.Get("sso").([]interface{})),
},
Expand Down Expand Up @@ -202,7 +202,7 @@ func resourceSpringCloudAPIPortalRead(d *pluginsdk.ResourceData, meta interface{
}
if props := resp.Properties; props != nil {
d.Set("gateway_ids", utils.FlattenStringSlice(props.GatewayIds))
d.Set("https_only", props.HTTPSOnly)
d.Set("https_only_enabled", props.HTTPSOnly)
d.Set("public_network_access_enabled", props.Public)
if err := d.Set("sso", flattenAPIPortalSsoProperties(props.SsoProperties, d.Get("sso").([]interface{}))); err != nil {
return fmt.Errorf("setting `sso`: %+v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ resource "azurerm_spring_cloud_api_portal" "test" {
name = "default"
spring_cloud_service_id = azurerm_spring_cloud_service.test.id
gateway_ids = [azurerm_spring_cloud_gateway.test.id]
https_only = false
https_only_enabled = false
public_network_access_enabled = true
instance_count = 2
instance_count = 1
sso {
client_id = "%s"
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/spring_cloud_api_portal.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ resource "azurerm_spring_cloud_api_portal" "example" {
name = "default"
spring_cloud_service_id = azurerm_spring_cloud_service.example.id
gateway_ids = [azurerm_spring_cloud_gateway.example.id]
https_only = false
https_only_enabled = false
public_network_access_enabled = true
instance_count = 2
instance_count = 1
sso {
client_id = "test"
client_secret = "secret"
Expand All @@ -62,7 +62,7 @@ The following arguments are supported:

* `gateway_ids` - (Optional) Specifies a list of Spring Cloud Gateway.

* `https_only` - (Optional) is only https is allowed?
* `https_only_enabled` - (Optional) is only https is allowed?

* `instance_count` - (Optional) Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.

Expand Down

0 comments on commit c28bcbe

Please sign in to comment.