Skip to content

Commit

Permalink
fix: change internal lb parsing on k8s env
Browse files Browse the repository at this point in the history
  • Loading branch information
ianaya89 committed Dec 5, 2023
1 parent 1d9b688 commit 0cd00fd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 49 deletions.
10 changes: 2 additions & 8 deletions docs/data-sources/env_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `cross_zone` (Boolean) `true` indicates that traffic should be distributed across all specified availability zones, `false` otherwise. (default `true`).
Expand All @@ -113,19 +109,17 @@ Optional:

Examples:
- "arn:aws:iam::$account_id:root"
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).


<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `cross_zone` (Boolean) `true` indicates that traffic should be distributed across all specified availability zones, `false` otherwise. (default `true`).
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).



Expand Down
10 changes: 2 additions & 8 deletions docs/data-sources/env_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,19 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).


<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).



Expand Down
10 changes: 2 additions & 8 deletions docs/data-sources/env_k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,11 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `annotations` (Attributes List) List of annotations for the load balancer (see [below for nested schema](#nestedatt--load_balancers--internal--annotations))
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

<a id="nestedatt--load_balancers--internal--annotations"></a>
### Nested Schema for `load_balancers.internal.annotations`
Expand All @@ -113,14 +110,11 @@ Required:
<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `annotations` (Attributes List) List of annotations for the load balancer (see [below for nested schema](#nestedatt--load_balancers--public--annotations))
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

<a id="nestedatt--load_balancers--public--annotations"></a>
### Nested Schema for `load_balancers.public.annotations`
Expand Down
10 changes: 2 additions & 8 deletions docs/resources/env_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `cross_zone` (Boolean) `true` indicates that traffic should be distributed across all specified availability zones, `false` otherwise. (default `true`).
Expand All @@ -298,19 +294,17 @@ Optional:

Examples:
- "arn:aws:iam::$account_id:root"
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).


<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `cross_zone` (Boolean) `true` indicates that traffic should be distributed across all specified availability zones, `false` otherwise. (default `true`).
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).



Expand Down
10 changes: 2 additions & 8 deletions docs/resources/env_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,25 +158,19 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).


<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).



Expand Down
10 changes: 2 additions & 8 deletions docs/resources/env_k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,11 @@ Optional:
<a id="nestedatt--load_balancers--internal"></a>
### Nested Schema for `load_balancers.internal`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `annotations` (Attributes List) List of annotations for the load balancer (see [below for nested schema](#nestedatt--load_balancers--internal--annotations))
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

<a id="nestedatt--load_balancers--internal--annotations"></a>
### Nested Schema for `load_balancers.internal.annotations`
Expand All @@ -238,14 +235,11 @@ Required:
<a id="nestedatt--load_balancers--public"></a>
### Nested Schema for `load_balancers.public`

Required:

- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

Optional:

- `annotations` (Attributes List) List of annotations for the load balancer (see [below for nested schema](#nestedatt--load_balancers--public--annotations))
- `enabled` (Boolean) Set to `true` if load balancer is enabled, `false` otherwise. (default `false`)
- `source_ip_ranges` (List of String) IP addresses/blocks to allow traffic from (default `"0.0.0.0/0"`).

<a id="nestedatt--load_balancers--public--annotations"></a>
### Nested Schema for `load_balancers.public.annotations`
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/env/k8s/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func loadBalancersToSDK(loadBalancers *LoadBalancersModel) *client.K8SEnvLoadBal

if loadBalancers.Internal != nil {
internal = &client.K8SEnvLoadBalancerInternalSpecInput{
Enabled: loadBalancers.Public.Enabled.ValueBoolPointer(),
Enabled: loadBalancers.Internal.Enabled.ValueBoolPointer(),
Annotations: common.KeyValueToSDK(loadBalancers.Internal.Annotations),
SourceIPRanges: common.ListStringToSDK(loadBalancers.Internal.SourceIPRanges),
}
Expand Down

0 comments on commit 0cd00fd

Please sign in to comment.