Skip to content

Commit

Permalink
Merge pull request #253 from volterraedge/fixIssue
Browse files Browse the repository at this point in the history
made required segment  field to optional and added code for dns_zone_record
  • Loading branch information
abhinavgrover15 authored Jun 19, 2024
2 parents c4cb74f + bada509 commit bfce72c
Show file tree
Hide file tree
Showing 9 changed files with 283 additions and 210 deletions.
33 changes: 33 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,36 @@ Attribute Reference
-------------------

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

Known Limitation
-------------------

Adding Resource Record Sets to DNS Zones

`Description:`

Currently, there is a limitation when adding individual resource record sets to a DNS domain through the provider resource. To successfully add a resource record set, an initial setup must be performed through the F5XC console.

`Steps to Reproduce:`

Attempt to add a resource record set directly through the provider resource without prior setup in the F5XC console.

`Observed Behavior:`

The addition of the resource record set fails due to the absence of prior configuration.

`Workaround:`

To add a resource record set to a DNS domain, follow these steps:

* Navigate to the `Resource Record Sets` tile in the F5XC console.

* Enable the `Show Advanced Fields` option.

* In the `Additional Resource Record Sets` section, add the desired resource record set.

Once the initial setup is complete, you can add individual resource records to the DNS zone through the provider resource without encountering this limitation.

`Upcoming Fix:`

We are aware of this limitation and are actively working on a fix. This issue will be resolved in the next release, allowing for the direct addition of individual resource record sets to DNS zones without the need for prior configuration through the F5XC console.
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 bfce72c

Please sign in to comment.