-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'renaming' of https://github.com/muhamadto/spring-native…
…-aws-lambda into renaming Signed-off-by: matto <[email protected]> # Conflicts: # README.md
- Loading branch information
Showing
17 changed files
with
237 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 43 additions & 42 deletions
85
...-service-infra/src/main/java/com/coffeebeans/springnativeawslambda/infra/Environment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,54 @@ | ||
package com.coffeebeans.springnativeawslambda.infra; | ||
|
||
import static com.coffeebeans.cdk.core.util.Constants.AWS_REGION_AP_SOUTHEAST_2; | ||
|
||
import com.coffeebeans.cdk.core.AbstractEnvironment; | ||
import com.coffeebeans.cdk.core.type.AWSAccount; | ||
import com.coffeebeans.cdk.core.type.SafeString; | ||
import io.sadpipers.cdk.type.AWSAccount; | ||
import io.sadpipers.cdk.type.SafeString; | ||
import io.sandpipers.cdk.core.AbstractEnvironment; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import static io.sandpipers.cdk.core.util.Constants.AWS_REGION_AP_SOUTHEAST_2; | ||
|
||
@Getter | ||
@SuperBuilder | ||
public class Environment extends AbstractEnvironment { | ||
|
||
public static final Environment COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2; | ||
public static final Environment COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2; | ||
public static final Environment COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2; | ||
|
||
static { | ||
final AWSAccount awsAccount = AWSAccount.of("111111111111"); | ||
final SafeString awsRegion = SafeString.of(AWS_REGION_AP_SOUTHEAST_2); | ||
|
||
final software.amazon.awscdk.Environment awsEnvironment = software.amazon.awscdk.Environment.builder() | ||
.account(awsAccount.getValue()) | ||
.account(awsRegion.getValue()) | ||
.build(); | ||
|
||
COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("DEV")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("PRD")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("TEST")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
registerEnvironment(COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2); | ||
registerEnvironment(COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2); | ||
registerEnvironment(COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2); | ||
} | ||
public static final Environment COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2; | ||
public static final Environment COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2; | ||
public static final Environment COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2; | ||
|
||
static { | ||
final AWSAccount awsAccount = AWSAccount.of("111111111111"); | ||
final SafeString awsRegion = SafeString.of(AWS_REGION_AP_SOUTHEAST_2); | ||
|
||
final software.amazon.awscdk.Environment awsEnvironment = software.amazon.awscdk.Environment.builder() | ||
.account(awsAccount.getValue()) | ||
.account(awsRegion.getValue()) | ||
.build(); | ||
|
||
COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("DEV")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("PRD")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2 = Environment.builder() | ||
.awsEnvironment(awsEnvironment) | ||
.costCentre(CostCentre.COFFEE_BEANS) | ||
.environmentName(SafeString.of("TEST")) | ||
.environmentKey(SafeString.of("COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2")) | ||
.build(); | ||
|
||
registerEnvironment(COFFEE_BEANS_DEV_111111111111_AP_SOUTHEAST_2); | ||
registerEnvironment(COFFEE_BEANS_PRD_111111111111_AP_SOUTHEAST_2); | ||
registerEnvironment(COFFEE_BEANS_TEST_111111111111_AP_SOUTHEAST_2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.