Skip to content

Commit

Permalink
made required field to optional and added code for dns_zone_record
Browse files Browse the repository at this point in the history
  • Loading branch information
sanj.kumar committed Jun 14, 2024
1 parent c4cb74f commit ec97097
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 209 deletions.
4 changes: 2 additions & 2 deletions docs/resources/volterra_http_loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ Specify origin server with private or public IP address and site information.

`outside_network` - (Optional) Outside network on the site (`Bool`).

`segment` - (Required) Segment where this origin server is located. See [ref](#ref) below for details.
`segment` - (Optional) Segment where this origin server is located. See [ref](#ref) below for details.

###### One of the arguments from this list "ip, ipv6" must be set

Expand All @@ -1632,7 +1632,7 @@ Specify origin server with private or public DNS name and site information.

`outside_network` - (Optional) Outside network on the site (`Bool`).

`segment` - (Required) Segment where this origin server is located. See [ref](#ref) below for details.
`segment` - (Optional) Segment where this origin server is located. See [ref](#ref) below for details.

`refresh_interval` - (Optional) Max value is 7 days as per https://datatracker.ietf.org/doc/html/rfc8767 (`Int`).

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/volterra_origin_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Specify origin server with private or public IP address and site information.

`outside_network` - (Optional) Outside network on the site (`Bool`).

`segment` - (Required) Segment where this origin server is located. See [ref](#ref) below for details.
`segment` - (Optional) Segment where this origin server is located. See [ref](#ref) below for details.

###### One of the arguments from this list "ipv6, ip" must be set

Expand All @@ -282,7 +282,7 @@ Specify origin server with private or public DNS name and site information.

`outside_network` - (Optional) Outside network on the site (`Bool`).

`segment` - (Required) Segment where this origin server is located. See [ref](#ref) below for details.
`segment` - (Optional) Segment where this origin server is located. See [ref](#ref) below for details.

`refresh_interval` - (Optional) Max value is 7 days as per https://datatracker.ietf.org/doc/html/rfc8767 (`Int`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2869,6 +2869,7 @@ func FlattenPrivateName(x *ves_io_schema_views_origin_pool.OriginServerPrivateNa
"dns_name": x.GetDnsName(),
"inside_network": isEmpty(x.GetInsideNetwork()),
"outside_network": isEmpty(x.GetOutsideNetwork()),
"segment": FlattenSegment(x.GetSegment()),
"refresh_interval": x.GetRefreshInterval(),
"site_locator": FlattenSiteLocator(x.GetSiteLocator()),
}
Expand All @@ -2883,6 +2884,7 @@ func FlattenPrivateIp(x *ves_io_schema_views_origin_pool.OriginServerPrivateIP)
piVal := map[string]interface{}{
"inside_network": isEmpty(x.GetInsideNetwork()),
"outside_network": isEmpty(x.GetOutsideNetwork()),
"segment": FlattenSegment(x.GetSegment()),
"ip": x.GetIp(),
"ipv6": x.GetIpv6(),
"site_locator": FlattenSiteLocator(x.GetSiteLocator()),
Expand All @@ -2892,6 +2894,19 @@ func FlattenPrivateIp(x *ves_io_schema_views_origin_pool.OriginServerPrivateIP)
return piValue
}

func FlattenSegment(x *ves_io_schema_views.ObjectRefType) []interface{} {
rslt := make([]interface{}, 0)
if x != nil {
value := map[string]interface{}{
"name": x.GetName(),
"namespace": x.GetNamespace(),
"tenant": x.GetTenant(),
}
rslt = append(rslt, value)
}
return rslt
}

func FlattenK8sService(x *ves_io_schema_views_origin_pool.OriginServerK8SService) []interface{} {
k8sValue := make([]interface{}, 0)
if x != nil {
Expand Down
4 changes: 2 additions & 2 deletions volterra/resource_auto_volterra_http_loadbalancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions volterra/resource_auto_volterra_origin_pool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ec97097

Please sign in to comment.