Skip to content

Commit bc67997

Browse files
authored
Merge pull request #3864 from marcinczeczko/dynamodb-more-configs
DynamoDB configurations update
2 parents 3e01d6a + ae5db4c commit bc67997

31 files changed

+963
-736
lines changed

bom/runtime/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@
13831383
<artifactId>aesh</artifactId>
13841384
<version>${aesh.version}</version>
13851385
</dependency>
1386-
1386+
13871387
<dependency>
13881388
<groupId>com.oracle.substratevm</groupId>
13891389
<artifactId>svm</artifactId>

docs/src/main/asciidoc/dynamodb-guide.adoc

Lines changed: 11 additions & 311 deletions
Large diffs are not rendered by default.

extensions/amazon-dynamodb/deployment/src/main/java/io/quarkus/dynamodb/deployment/DynamodbProcessor.java

Lines changed: 142 additions & 60 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package io.quarkus.dynamodb.deployment;
2+
3+
import javax.inject.Inject;
4+
5+
import org.jboss.shrinkwrap.api.ShrinkWrap;
6+
import org.jboss.shrinkwrap.api.spec.JavaArchive;
7+
import org.junit.jupiter.api.Assertions;
8+
import org.junit.jupiter.api.Test;
9+
import org.junit.jupiter.api.extension.RegisterExtension;
10+
11+
import io.quarkus.deployment.configuration.ConfigurationError;
12+
import io.quarkus.test.QuarkusUnitTest;
13+
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient;
14+
15+
public class DynamodbAsyncClientBrokenProxyConfigTest {
16+
17+
@Inject
18+
DynamoDbAsyncClient client;
19+
20+
@RegisterExtension
21+
static final QuarkusUnitTest config = new QuarkusUnitTest()
22+
.setExpectedException(ConfigurationError.class)
23+
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
24+
.addAsResource("async-broken-proxy-config.properties", "application.properties"));
25+
26+
@Test
27+
public void test() {
28+
// should not be called, deployment exception should happen first.
29+
Assertions.fail();
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.quarkus.dynamodb.deployment;
2+
3+
import javax.inject.Inject;
4+
5+
import org.jboss.shrinkwrap.api.ShrinkWrap;
6+
import org.jboss.shrinkwrap.api.spec.JavaArchive;
7+
import org.junit.jupiter.api.Test;
8+
import org.junit.jupiter.api.extension.RegisterExtension;
9+
10+
import io.quarkus.test.QuarkusUnitTest;
11+
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient;
12+
13+
public class DynamodbAsyncClientTlsFileStoreConfigTest {
14+
15+
@Inject
16+
DynamoDbAsyncClient client;
17+
18+
@RegisterExtension
19+
static final QuarkusUnitTest config = new QuarkusUnitTest()
20+
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
21+
.addAsResource("async-tls-filestore-config.properties", "application.properties"));
22+
23+
@Test
24+
public void test() {
25+
// Application should start with full config.
26+
}
27+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
quarkus.dynamodb.async-client.proxy.enabled = true
2+
quarkus.dynamodb.async-client.proxy.endpoint = http://user:[email protected]?foo=bar
3+
4+
5+

extensions/amazon-dynamodb/deployment/src/test/resources/async-full-config.properties

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
quarkus.dynamodb.region=us-east-1
21
quarkus.dynamodb.enable-endpoint-discovery=false
32
quarkus.dynamodb.endpoint-override=http://localhost:8000
43

5-
quarkus.dynamodb.credentials.type=STATIC
6-
quarkus.dynamodb.credentials.static-provider.access-key-id=test-key
7-
quarkus.dynamodb.credentials.static-provider.secret-access-key=test-secret
4+
quarkus.dynamodb.aws.region=us-east-1
5+
quarkus.dynamodb.aws.credentials.type=STATIC
6+
quarkus.dynamodb.aws.credentials.static-provider.access-key-id=test-key
7+
quarkus.dynamodb.aws.credentials.static-provider.secret-access-key=test-secret
88

99
quarkus.dynamodb.async-client.max-concurrency=10
1010
quarkus.dynamodb.async-client.max-pending-connection-acquires=10
@@ -21,3 +21,7 @@ quarkus.dynamodb.async-client.ssl-provider = JDK
2121
quarkus.dynamodb.async-client.event-loop.override = true
2222
quarkus.dynamodb.async-client.event-loop.number-of-threads = 5
2323
quarkus.dynamodb.async-client.event-loop.thread-name-prefix = Quarkus-Netty-EventLoop-
24+
quarkus.dynamodb.async-client.proxy.enabled = true
25+
quarkus.dynamodb.async-client.proxy.endpoint = http://127.1.1.1
26+
quarkus.dynamodb.async-client.proxy.non-proxy-hosts = localhost, hostlocal
27+
quarkus.dynamodb.async-client.tls-managers-provider.type=SYSTEM_PROPERTY
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
quarkus.dynamodb.aws.region=us-east-1
2+
3+
quarkus.dynamodb.async-client.tls-managers-provider.type=FILE_STORE
4+
quarkus.dynamodb.async-client.tls-managers-provider.file-store.path=/tmp/file.key
5+
quarkus.dynamodb.async-client.tls-managers-provider.file-store.type=pkcs11
6+
quarkus.dynamodb.async-client.tls-managers-provider.file-store.password=thePassword
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
quarkus.dynamodb.aws.region=us-east-1
2+
13
quarkus.dynamodb.endpoint-override=127.0.0.1
24

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
quarkus.dynamodb.region=us-east-2
1+
quarkus.dynamodb.aws.region=us-east-2
22

3-
quarkus.dynamodb.credentials.type=DEFAULT
4-
quarkus.dynamodb.credentials.default-provider.async-credential-update-enabled=true
5-
quarkus.dynamodb.credentials.default-provider.reuse-last-provider-enabled=true
3+
quarkus.dynamodb.aws.credentials.type=DEFAULT
4+
quarkus.dynamodb.aws.credentials.default-provider.async-credential-update-enabled=true
5+
quarkus.dynamodb.aws.credentials.default-provider.reuse-last-provider-enabled=true
66

0 commit comments

Comments
 (0)