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 17, 2024
1 parent c4cb74f commit 2d33953
Show file tree
Hide file tree
Showing 9 changed files with 255 additions and 210 deletions.
5 changes: 5 additions & 0 deletions docs/resources/volterra_dns_zone_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,8 @@ Attribute Reference
-------------------

- `id` - This is the id of the configured dns_zone_record.

Limitation
-------------------

To add a resource record set to a DNS domain, we first need to add a resource record set from F5XC conxole, first navigate to the `Resource Record Sets` tile. Then, enable `Show Advanced Fields` and add the resource record set in the `Additional Resource Record Sets` section.
6 changes: 3 additions & 3 deletions docs/resources/volterra_http_loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ More options like header manipulation, compression etc..

`cookies_to_modify` - (Optional) List of cookies to be modified from the HTTP response being sent towards downstream.. See [More Option Cookies To Modify ](#more-option-cookies-to-modify) below for details.(Deprecated)

`custom_errors` - (Optional) matches for a request. (`String`).
`custom_errors` - (Optional) Map of integer error codes as keys and string values that can be used to provide custom http pages for each error code. Key of the map can be either response code class or HTTP Error code. Response code classes for key is configured as follows 3 -- for 3xx response code class 4 -- for 4xx response code class 5 -- for 5xx response code class Value of the map is string which represents custom HTTP responses. Specific response code takes preference when both response code and response code class matches for a request. (String).

`disable_default_error_pages` - (Optional) Disable the use of default F5XC error pages. (`Bool`).

Expand Down 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 2d33953

Please sign in to comment.