Skip to content

Commit ff90f2e

Browse files
authored
Merge pull request #1270 from duplocloud/hotfix/0.11.30
Hotfix Release v0.11.30
2 parents ff6959e + 2186c95 commit ff90f2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1379
-166
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ NAMESPACE=duplocloud
88

99
NAME=duplocloud
1010
BINARY=terraform-provider-${NAME}
11-
VERSION=0.11.29
11+
VERSION=0.11.30
1212
#mac
1313
#OS_ARCH=darwin_amd64
1414
#OS_ARCH=linux_amd64

docs/data-sources/duplo_service_lbconfigs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ Read-Only:
5353
- `cloud_name` (String)
5454
- `custom_cidr` (List of String)
5555
- `dns_name` (String)
56-
- `eip_allocations` (List of String)
5756
- `external_port` (Number)
5857
- `external_traffic_policy` (String)
5958
- `extra_selector_label` (List of Object) (see [below for nested schema](#nestedobjatt--services--lbconfigs--extra_selector_label))

docs/data-sources/ecs_service.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ description: |-
2323
### Read-Only
2424

2525
- `capacity_provider_strategy` (List of Object) (see [below for nested schema](#nestedatt--capacity_provider_strategy))
26+
- `deployment_configuration` (List of Object) (see [below for nested schema](#nestedatt--deployment_configuration))
2627
- `dns_prfx` (String) The DNS prefix to assign to this service's load balancer.
2728
- `health_check_grace_period_seconds` (Number)
2829
- `id` (String) The ID of this resource.
2930
- `index` (Number) The index of the ecs service.
3031
- `is_target_group_only` (Boolean)
3132
- `load_balancer` (List of Object) Zero or more load balancer configurations to associate with this service. (see [below for nested schema](#nestedatt--load_balancer))
3233
- `old_task_definition_buffer_size` (Number) The number of older task definitions to retain in AWS.
34+
- `placement_constraint` (List of Object) Rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10` (see [below for nested schema](#nestedatt--placement_constraint))
35+
- `placement_strategy` (List of Object) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `placement_strategy` blocks is `5` (see [below for nested schema](#nestedatt--placement_strategy))
3336
- `replicas` (Number) The number of container replicas to create.
3437
- `target_group_arns` (Set of String)
3538
- `task_definition` (String) The ARN of the task definition to use.
@@ -45,6 +48,28 @@ Read-Only:
4548
- `weight` (Number)
4649

4750

51+
<a id="nestedatt--deployment_configuration"></a>
52+
### Nested Schema for `deployment_configuration`
53+
54+
Read-Only:
55+
56+
- `alarms` (List of Object) (see [below for nested schema](#nestedobjatt--deployment_configuration--alarms))
57+
- `enable_circuit_breaker` (Boolean)
58+
- `maximum_percent` (Number)
59+
- `minimum_healthy_percent` (Number)
60+
- `rollback_circuit_breaker` (Boolean)
61+
62+
<a id="nestedobjatt--deployment_configuration--alarms"></a>
63+
### Nested Schema for `deployment_configuration.alarms`
64+
65+
Read-Only:
66+
67+
- `enable` (Boolean)
68+
- `names` (List of String)
69+
- `rollback` (Boolean)
70+
71+
72+
4873
<a id="nestedatt--load_balancer"></a>
4974
### Nested Schema for `load_balancer`
5075

@@ -82,3 +107,22 @@ Read-Only:
82107
- `healthy_threshold_count` (Number)
83108
- `http_success_code` (String)
84109
- `unhealthy_threshold_count` (Number)
110+
111+
112+
113+
<a id="nestedatt--placement_constraint"></a>
114+
### Nested Schema for `placement_constraint`
115+
116+
Read-Only:
117+
118+
- `expression` (String)
119+
- `type` (String)
120+
121+
122+
<a id="nestedatt--placement_strategy"></a>
123+
### Nested Schema for `placement_strategy`
124+
125+
Read-Only:
126+
127+
- `field` (String)
128+
- `type` (String)

docs/data-sources/ecs_services.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ description: |-
3030
Read-Only:
3131

3232
- `capacity_provider_strategy` (List of Object) (see [below for nested schema](#nestedobjatt--services--capacity_provider_strategy))
33+
- `deployment_configuration` (List of Object) (see [below for nested schema](#nestedobjatt--services--deployment_configuration))
3334
- `dns_prfx` (String)
3435
- `health_check_grace_period_seconds` (Number)
3536
- `index` (Number)
3637
- `is_target_group_only` (Boolean)
3738
- `load_balancer` (List of Object) (see [below for nested schema](#nestedobjatt--services--load_balancer))
3839
- `name` (String)
3940
- `old_task_definition_buffer_size` (Number)
41+
- `placement_constraint` (List of Object) (see [below for nested schema](#nestedobjatt--services--placement_constraint))
42+
- `placement_strategy` (List of Object) (see [below for nested schema](#nestedobjatt--services--placement_strategy))
4043
- `replicas` (Number)
4144
- `target_group_arns` (Set of String)
4245
- `task_definition` (String)
@@ -52,6 +55,28 @@ Read-Only:
5255
- `weight` (Number)
5356

5457

58+
<a id="nestedobjatt--services--deployment_configuration"></a>
59+
### Nested Schema for `services.deployment_configuration`
60+
61+
Read-Only:
62+
63+
- `alarms` (List of Object) (see [below for nested schema](#nestedobjatt--services--deployment_configuration--alarms))
64+
- `enable_circuit_breaker` (Boolean)
65+
- `maximum_percent` (Number)
66+
- `minimum_healthy_percent` (Number)
67+
- `rollback_circuit_breaker` (Boolean)
68+
69+
<a id="nestedobjatt--services--deployment_configuration--alarms"></a>
70+
### Nested Schema for `services.deployment_configuration.alarms`
71+
72+
Read-Only:
73+
74+
- `enable` (Boolean)
75+
- `names` (List of String)
76+
- `rollback` (Boolean)
77+
78+
79+
5580
<a id="nestedobjatt--services--load_balancer"></a>
5681
### Nested Schema for `services.load_balancer`
5782

@@ -89,3 +114,22 @@ Read-Only:
89114
- `healthy_threshold_count` (Number)
90115
- `http_success_code` (String)
91116
- `unhealthy_threshold_count` (Number)
117+
118+
119+
120+
<a id="nestedobjatt--services--placement_constraint"></a>
121+
### Nested Schema for `services.placement_constraint`
122+
123+
Read-Only:
124+
125+
- `expression` (String)
126+
- `type` (String)
127+
128+
129+
<a id="nestedobjatt--services--placement_strategy"></a>
130+
### Nested Schema for `services.placement_strategy`
131+
132+
Read-Only:
133+
134+
- `field` (String)
135+
- `type` (String)

docs/data-sources/native_host_image.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ description: |-
1010

1111
`duplocloud_native_host_image` retrieves details of a specific image for a given tenant.
1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
data "duplocloud_native_host_image" "img" {
17+
tenant_id = "f4bf01f0-5077-489e-aa51-95fb77049608"
18+
name = "EKS-Oregon-1.32"
19+
os = "AmazonLinux2023"
20+
k8s_version = "1.32"
21+
arch = "amd64"
22+
}
23+
```
1424

1525
<!-- schema generated by tfplugindocs -->
1626
## Schema
@@ -21,19 +31,19 @@ description: |-
2131

2232
### Optional
2333

24-
- `arch` (String)
25-
- `is_kubernetes` (Boolean)
26-
- `name` (String)
34+
- `arch` (String) Architecture of the native host
35+
- `is_kubernetes` (Boolean, Deprecated) This field is deprecated. Use k8s_version for precise filtering
36+
- `k8s_version` (String) K8 version of the native host
37+
- `name` (String) Name of the Duplocloud native host
38+
- `os` (String) OS of native host
39+
- `username` (String) username associated to native host
2740

2841
### Read-Only
2942

3043
- `id` (String) The ID of this resource.
3144
- `image_id` (String)
32-
- `k8s_version` (String)
33-
- `os` (String)
3445
- `region` (String)
3546
- `tags` (List of Object) (see [below for nested schema](#nestedatt--tags))
36-
- `username` (String)
3747

3848
<a id="nestedatt--tags"></a>
3949
### Nested Schema for `tags`

docs/resources/duplo_service_lbconfigs.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ Optional:
148148
- `backend_protocol_version` (String) Is used for communication between the load balancer and the target instances. This field is used to set protocol version for ALB load balancer. Only applicable when protocol is HTTP or HTTPS. The protocol version. Specify GRPC to send requests to targets using gRPC. Specify HTTP2 to send requests to targets using HTTP/2. The default is HTTP1, which sends requests to targets using HTTP/1.1
149149
- `certificate_arn` (String) The ARN of an ACM certificate to associate with this load balancer. Only applicable for HTTPS.
150150
- `custom_cidr` (List of String) Specify CIDR Values. This is applicable only for Network Load Balancer if `lb_type` is `6`.
151-
- `eip_allocations` (List of String) Allocate Elastic IP to load balancer, which is configured under plan configuration.
152-
153-
Note: This field can only be set for non internal lbtype NLB(6)
154151
- `external_port` (Number) The frontend port associated with this load balancer configuration. Required if `lb_type` is not `7`.
155152
- `external_traffic_policy` (String) Only for K8S Node Port (`lb_type = 4`) or load balancers in Kubernetes. Set the kubernetes service `externalTrafficPolicy` attribute.
156153
- `extra_selector_label` (Block List) Only for K8S services or load balancers in Kubernetes. Sets an additional selector label to narrow which pods can receive traffic. (see [below for nested schema](#nestedblock--lbconfigs--extra_selector_label))

docs/resources/ecs_service.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,55 @@ resource "duplocloud_ecs_service" "myservice" {
5353
capacity_provider = "<asg-fullname>"
5454
}
5555
}
56+
57+
58+
resource "duplocloud_ecs_service" "myservice" {
59+
tenant_id = duplocloud_tenant.myapp.tenant_id
60+
name = "myservice"
61+
task_definition = duplocloud_ecs_task_definition.myservice.arn
62+
replicas = 1
63+
capacity_provider_strategy {
64+
base = 0
65+
weight = 1
66+
capacity_provider = "<asg-fullname>"
67+
}
68+
deployment_configuration {
69+
minimum_healthy_percent = 20
70+
maximum_percent = 100
71+
enable_circuit_breaker = true
72+
rollback_circuit_breaker = true
73+
alarms {
74+
enable = true
75+
rollback = true
76+
names = ["<cloudwatch-alarm-name>"]
77+
}
78+
}
79+
}
80+
81+
resource "duplocloud_ecs_service" "myservice" {
82+
tenant_id = duplocloud_tenant.myapp.tenant_id
83+
name = "myservice"
84+
task_definition = duplocloud_ecs_task_definition.myservice.arn
85+
replicas = 1
86+
capacity_provider_strategy {
87+
base = 0
88+
weight = 1
89+
capacity_provider = "duploservices-sep8-forecs"
90+
}
91+
placement_strategy {
92+
type = "binpack"
93+
field = "cpu"
94+
}
95+
placement_strategy {
96+
type = "spread"
97+
field = "instanceId"
98+
}
99+
100+
placement_constraint {
101+
type = "memberOf"
102+
expression = "attribute:ecs.instance-type =~ t3.*"
103+
}
104+
}
56105
```
57106

58107
<!-- schema generated by tfplugindocs -->
@@ -68,11 +117,14 @@ resource "duplocloud_ecs_service" "myservice" {
68117
### Optional
69118

70119
- `capacity_provider_strategy` (Block List) (see [below for nested schema](#nestedblock--capacity_provider_strategy))
120+
- `deployment_configuration` (Block List, Max: 1) (see [below for nested schema](#nestedblock--deployment_configuration))
71121
- `dns_prfx` (String) The DNS prefix to assign to this service's load balancer.
72122
- `health_check_grace_period_seconds` (Number) Defaults to `0`.
73123
- `is_target_group_only` (Boolean) Defaults to `false`.
74124
- `load_balancer` (Block List) Zero or more load balancer configurations to associate with this service. (see [below for nested schema](#nestedblock--load_balancer))
75125
- `old_task_definition_buffer_size` (Number) The number of older task definitions to retain in AWS. Defaults to `10`.
126+
- `placement_constraint` (Block List, Max: 10) Rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10` (see [below for nested schema](#nestedblock--placement_constraint))
127+
- `placement_strategy` (Block List, Max: 5) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `placement_strategy` blocks is `5` (see [below for nested schema](#nestedblock--placement_strategy))
76128
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
77129
- `wait_until_targets_ready` (Boolean) Whether or not to wait until all target groups are created for ecs service, after creation. Defaults to `true`.
78130

@@ -98,6 +150,28 @@ Optional:
98150
- `weight` (Number) The relative percentage of the total number of launched tasks that should use the specified capacity provider.
99151

100152

153+
<a id="nestedblock--deployment_configuration"></a>
154+
### Nested Schema for `deployment_configuration`
155+
156+
Optional:
157+
158+
- `alarms` (Block List) (see [below for nested schema](#nestedblock--deployment_configuration--alarms))
159+
- `enable_circuit_breaker` (Boolean) Enables ECS deployment circuit breaker to stop deployments on failures. Defaults to `false`.
160+
- `maximum_percent` (Number) Specifies the maximum percentage of tasks that can run at once during a deployment.
161+
- `minimum_healthy_percent` (Number) Specifies the minimum percentage of tasks that must remain in the RUNNING state during a deployment
162+
- `rollback_circuit_breaker` (Boolean) Enables automatic rollback when the circuit breaker detects a failed deployment. Defaults to `false`.
163+
164+
<a id="nestedblock--deployment_configuration--alarms"></a>
165+
### Nested Schema for `deployment_configuration.alarms`
166+
167+
Optional:
168+
169+
- `enable` (Boolean) Enables or disables CloudWatch alarm monitoring during deployments. Defaults to `false`.
170+
- `names` (List of String) Names of CloudWatch alarms that ECS monitors during deployments.
171+
- `rollback` (Boolean) Automatically rolls back the deployment if any configured CloudWatch alarm enters ALARM state. Defaults to `false`.
172+
173+
174+
101175
<a id="nestedblock--load_balancer"></a>
102176
### Nested Schema for `load_balancer`
103177

@@ -149,6 +223,30 @@ Optional:
149223

150224

151225

226+
<a id="nestedblock--placement_constraint"></a>
227+
### Nested Schema for `placement_constraint`
228+
229+
Required:
230+
231+
- `type` (String) Type of constraint. The only valid values at this time are `memberOf` and `distinctInstance`
232+
233+
Optional:
234+
235+
- `expression` (String) Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
236+
237+
238+
<a id="nestedblock--placement_strategy"></a>
239+
### Nested Schema for `placement_strategy`
240+
241+
Required:
242+
243+
- `type` (String) Type of placement strategy. Must be one of: `binpack`, `random`, or `spread`
244+
245+
Optional:
246+
247+
- `field` (String) For the spread placement strategy, valid values are instanceId, or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see [PlacementStrategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html)
248+
249+
152250
<a id="nestedblock--timeouts"></a>
153251
### Nested Schema for `timeouts`
154252

docs/resources/k8_config_map.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ resource "duplocloud_k8_config_map" "myapp" {
2525
2626
data = jsonencode({ foo = "bar2" })
2727
labels = {
28-
ke1 = "val1"
29-
ke2 = "val3"
28+
ke1 = "val1"
29+
ke2 = "val3"
30+
"app.duplocloud.net/app-name" = "<appname>"
3031
}
3132
}
3233
```

docs/resources/k8_ingress.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ resource "duplocloud_duplo_service_lbconfigs" "echo_config" {
5454
protocol = "tcp"
5555
health_check_url = "/"
5656
}
57+
5758
}
5859
5960
resource "duplocloud_duplo_service" "echo2" {
@@ -118,6 +119,9 @@ resource "duplocloud_k8_ingress" "ingress" {
118119
service_name = duplocloud_duplo_service.echo2.name
119120
port = 5678
120121
}
122+
labels = {
123+
"app.duplocloud.net/app-name" = "tfapp"
124+
}
121125
122126
depends_on = [time_sleep.wait_45_seconds]
123127
}

docs/resources/k8_secret.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ resource "duplocloud_k8_secret" "myapp" {
2525
secret_type = "Opaque"
2626
secret_data = jsonencode({ foo = "bar2" })
2727
secret_labels = {
28-
KeyA = "ValueA"
29-
KeyB = "ValueB"
28+
KeyA = "ValueA"
29+
KeyB = "ValueB"
30+
"app.duplocloud.net/app-name" = "<appname>"
3031
}
3132
secret_annotations = {
3233
annotA = "ValueA"

0 commit comments

Comments
 (0)