You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("invalid queue ID format for dead-letter queue: %s (expected region/project-id/queue-name or arn:scw:sqs:region:project-id:queue-name)", queueID)
250
+
}
251
+
default:
252
+
scwARN=queueID
253
+
}
254
+
255
+
// Create RedrivePolicy JSON
256
+
redrivePolicy:=map[string]any{
257
+
"deadLetterTargetArn": scwARN,
258
+
"maxReceiveCount": maxReceiveCount,
259
+
}
260
+
261
+
jsonData, err:=json.Marshal(redrivePolicy)
262
+
iferr!=nil {
263
+
returnfmt.Errorf("failed to marshal redrive policy: %w", err)
264
+
}
265
+
266
+
s=string(jsonData)
267
+
}
268
+
} else {
269
+
returnfmt.Errorf("unsupported list type for %s", resourcePath)
270
+
}
227
271
default:
228
272
returnfmt.Errorf("unsupported type %s for %s", resourceSchema.Type, resourcePath)
229
273
}
@@ -265,14 +309,47 @@ func awsAttributeToResourceData(values map[string]any, value string, resourcePat
265
309
setResourceValue(values, resourcePath, i, resourceSchemas)
Description: "The maximum size of a message. Should be in bytes.",
108
108
},
109
+
"dead_letter_queue": {
110
+
Type: schema.TypeList,
111
+
Optional: true,
112
+
MaxItems: 1,
113
+
Description: "Configuration for the dead-letter queue",
114
+
Elem: &schema.Resource{
115
+
Schema: map[string]*schema.Schema{
116
+
"id": {
117
+
Type: schema.TypeString,
118
+
Required: true,
119
+
Description: "The ID or ARN of the dead-letter queue where messages are sent after the maximum receive count is exceeded.",
120
+
},
121
+
"max_receive_count": {
122
+
Type: schema.TypeInt,
123
+
Required: true,
124
+
ValidateFunc: validation.IntBetween(1, 1000),
125
+
Description: "The number of times a message is delivered to the source queue before being sent to the dead-letter queue. Must be between 1 and 1,000.",
0 commit comments