@goldstack/infra-aws 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Goldstack AWS Infra Tools
2
+
3
+ This library allows managing AWS deployments for JavaScript applications. It is used for [Goldstack Templates](https://goldstack.party).
@@ -0,0 +1,17 @@
1
+ import { AWSConfiguration, AWSUser, AWSRegion, AWSLocalUserConfig, AWSAPIKeyUserConfig, AWSAccessKeyId, AWSSecretAccessKey, AWSEnvironmentVariableUserConfig, Name } from './types/awsAccount';
2
+ import AWS from 'aws-sdk';
3
+ export type { AWSConfiguration, AWSUser, AWSRegion, AWSAccessKeyId, AWSSecretAccessKey, AWSLocalUserConfig, AWSAPIKeyUserConfig as AWSAPIKeyUser, AWSEnvironmentVariableUserConfig, };
4
+ import { AWSDeployment } from './types/awsDeployment';
5
+ import { AWSTerraformState } from './types/awsTerraformState';
6
+ export { AWSDeployment, AWSDeploymentRegion, AWSUserName, } from './types/awsDeployment';
7
+ export declare const readDeploymentFromPackageConfig: (deploymentName: string, path?: string | undefined) => AWSDeployment;
8
+ export declare const assertTerraformConfig: (user: Name, path?: string | undefined) => AWSTerraformState;
9
+ export declare const writeTerraformConfig: (config: AWSTerraformState, path?: string | undefined) => void;
10
+ export declare const readConfig: (path?: string | undefined) => AWSConfiguration;
11
+ export declare const writeConfig: (config: AWSConfiguration, path?: string | undefined) => void;
12
+ export declare const createDefaultConfig: () => AWSConfiguration;
13
+ /**
14
+ * Obtains AWS user credentials from config file or environment variables.
15
+ **/
16
+ export declare const getAWSUser: (userName: string) => Promise<AWS.Credentials>;
17
+ //# sourceMappingURL=infraAws.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infraAws.d.ts","sourceRoot":"","sources":["../src/infraAws.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,gCAAgC,EAChC,IAAI,EACL,MAAM,oBAAoB,CAAC;AAI5B,OAAO,GAAG,MAAM,SAAS,CAAC;AAE1B,YAAY,EACV,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,IAAI,aAAa,EACpC,gCAAgC,GACjC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,+BAA+B,mBAC1B,MAAM,gCAErB,aAcF,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAC1B,IAAI,gCAET,iBAuBF,CAAC;AAEF,eAAO,MAAM,oBAAoB,WACvB,iBAAiB,gCAExB,IAKF,CAAC;AACF,eAAO,MAAM,UAAU,iCAAoB,gBAa1C,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,gBAAgB,gCAAkB,IAKrE,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,gBAItC,CAAC;AAEF;;IAEI;AACJ,eAAO,MAAM,UAAU,aACX,MAAM,KACf,QAAQ,IAAI,WAAW,CAwGzB,CAAC"}
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getAWSUser = exports.createDefaultConfig = exports.writeConfig = exports.readConfig = exports.writeTerraformConfig = exports.assertTerraformConfig = exports.readDeploymentFromPackageConfig = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const assert_1 = __importDefault(require("assert"));
9
+ const utils_config_1 = require("@goldstack/utils-config");
10
+ const utils_package_1 = require("@goldstack/utils-package");
11
+ const utils_sh_1 = require("@goldstack/utils-sh");
12
+ const accountConfigSchema_json_1 = __importDefault(require("./schemas/accountConfigSchema.json"));
13
+ const deploymentConfigSchema_json_1 = __importDefault(require("./schemas/deploymentConfigSchema.json"));
14
+ const awsTerraformStateSchema_json_1 = __importDefault(require("./schemas/awsTerraformStateSchema.json"));
15
+ const aws_sdk_1 = __importDefault(require("aws-sdk"));
16
+ const readDeploymentFromPackageConfig = (deploymentName, path) => {
17
+ const packageConfig = (0, utils_package_1.readPackageConfig)(path);
18
+ const deployment = packageConfig.deployments.find((d) => d.name === deploymentName);
19
+ if (!deployment) {
20
+ throw new Error('Cannot find deployment with name: ' + deploymentName);
21
+ }
22
+ (0, utils_config_1.validateConfig)(deployment, deploymentConfigSchema_json_1.default, {
23
+ errorMessage: `Invalid AWS deployment ${deploymentName}`,
24
+ });
25
+ return deployment;
26
+ };
27
+ exports.readDeploymentFromPackageConfig = readDeploymentFromPackageConfig;
28
+ const assertTerraformConfig = (user, path) => {
29
+ if (!path) {
30
+ path = (0, utils_config_1.getAwsTerraformConfigPath)('./../../');
31
+ }
32
+ let res;
33
+ if (fs_1.default.existsSync(path)) {
34
+ res = (0, utils_config_1.parseConfig)((0, utils_sh_1.read)(path), awsTerraformStateSchema_json_1.default, {
35
+ errorMessage: `Cannot load AWS Terraform configuration from ${path}`,
36
+ });
37
+ }
38
+ else {
39
+ res = {
40
+ remoteState: [],
41
+ };
42
+ }
43
+ if (!res.remoteState.find((el) => el.user == user)) {
44
+ res.remoteState.push({
45
+ user: user,
46
+ });
47
+ }
48
+ return res;
49
+ };
50
+ exports.assertTerraformConfig = assertTerraformConfig;
51
+ const writeTerraformConfig = (config, path) => {
52
+ if (!path) {
53
+ path = (0, utils_config_1.getAwsTerraformConfigPath)('./../../');
54
+ }
55
+ (0, utils_sh_1.write)(JSON.stringify(config, null, 2), path);
56
+ };
57
+ exports.writeTerraformConfig = writeTerraformConfig;
58
+ const readConfig = (path) => {
59
+ if (!path) {
60
+ path = (0, utils_config_1.getAwsConfigPath)('./../../');
61
+ }
62
+ // otherwise check default config file location
63
+ if (!fs_1.default.existsSync(path)) {
64
+ throw new Error(`AWS configuration file does not exist: ${path}.`);
65
+ }
66
+ return (0, utils_config_1.parseConfig)((0, utils_sh_1.read)(path), accountConfigSchema_json_1.default, {
67
+ errorMessage: `Cannot load AWS configuration from ${path}`,
68
+ });
69
+ };
70
+ exports.readConfig = readConfig;
71
+ const writeConfig = (config, path) => {
72
+ if (!path) {
73
+ path = (0, utils_config_1.getAwsConfigPath)('./../../');
74
+ }
75
+ (0, utils_sh_1.write)(JSON.stringify(config, null, 2), path);
76
+ };
77
+ exports.writeConfig = writeConfig;
78
+ const createDefaultConfig = () => {
79
+ return {
80
+ users: [],
81
+ };
82
+ };
83
+ exports.createDefaultConfig = createDefaultConfig;
84
+ /**
85
+ * Obtains AWS user credentials from config file or environment variables.
86
+ **/
87
+ const getAWSUser = async (userName) => {
88
+ // check if running in ECS
89
+ if (process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI) {
90
+ const ecsCredentials = new aws_sdk_1.default.ECSCredentials({
91
+ httpOptions: { timeout: 5000 },
92
+ maxRetries: 10, // retry 10 times
93
+ });
94
+ await ecsCredentials.getPromise();
95
+ aws_sdk_1.default.config.credentials = ecsCredentials;
96
+ if (!process.env.AWS_REGION) {
97
+ throw new Error('AWS region environment variable ("AWS_REGION") not defined for ECS task.');
98
+ }
99
+ aws_sdk_1.default.config.update({ region: process.env.AWS_REGION });
100
+ return ecsCredentials;
101
+ }
102
+ // always prefer gettting credentials from environment variables
103
+ if (process.env.AWS_ACCESS_KEY_ID) {
104
+ (0, assert_1.default)(process.env.AWS_ACCESS_KEY_ID, 'AWS_ACCESS_KEY_ID not defined.');
105
+ (0, assert_1.default)(process.env.AWS_SECRET_ACCESS_KEY, 'AWS_SECRET_ACCESS_KEY not defined');
106
+ const region = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION;
107
+ (0, assert_1.default)(region, 'Neither AWS_REGION nor AWS_DEFAULT_REGION are defined.');
108
+ const credentials = new aws_sdk_1.default.EnvironmentCredentials('AWS');
109
+ await credentials.getPromise();
110
+ aws_sdk_1.default.config.credentials = credentials;
111
+ aws_sdk_1.default.config.update({ region });
112
+ return credentials;
113
+ }
114
+ const config = (0, exports.readConfig)();
115
+ const user = config.users.find((user) => user.name === userName);
116
+ if (!user) {
117
+ throw new Error(`User '${userName}' does not exist in AWS configuration.`);
118
+ }
119
+ if (user.type === 'apiKey') {
120
+ const config = user.config;
121
+ if (!config.awsAccessKeyId || !config.awsSecretAccessKey) {
122
+ throw new Error(`AWS Access credentials not defined for user ${userName}. Define them in infra/aws/config.json.`);
123
+ }
124
+ const credentials = new aws_sdk_1.default.Credentials({
125
+ accessKeyId: config.awsAccessKeyId || '',
126
+ secretAccessKey: config.awsSecretAccessKey || '',
127
+ });
128
+ aws_sdk_1.default.config.credentials = credentials;
129
+ aws_sdk_1.default.config.update({ region: config.awsDefaultRegion });
130
+ return credentials;
131
+ }
132
+ if (user.type === 'environmentVariables') {
133
+ const userConfig = user.config;
134
+ const awsAccessKeyId = process.env[userConfig.awsAccessKeyIdVariableName];
135
+ if (!awsAccessKeyId) {
136
+ throw new Error(`Environment variable expected but not found: ${userConfig.awsAccessKeyIdVariableName}`);
137
+ }
138
+ const awsSecretAccessKey = process.env[userConfig.awsSecretAccessKeyVariableName];
139
+ if (!awsSecretAccessKey) {
140
+ throw new Error(`Environment variable expected but not found: ${userConfig.awsSecretAccessKeyVariableName}`);
141
+ }
142
+ const awsDefaultRegion = process.env[userConfig.awsDefaultRegionVariableName];
143
+ if (!awsDefaultRegion) {
144
+ throw new Error(`Environment variable expected but not found: ${userConfig.awsDefaultRegionVariableName}`);
145
+ }
146
+ const credentials = new aws_sdk_1.default.Credentials({
147
+ accessKeyId: awsAccessKeyId,
148
+ secretAccessKey: awsSecretAccessKey,
149
+ });
150
+ aws_sdk_1.default.config.credentials = credentials;
151
+ aws_sdk_1.default.config.update({ region: awsDefaultRegion });
152
+ return credentials;
153
+ }
154
+ if (user.type === 'local') {
155
+ throw new Error('Local user not supported yet.');
156
+ }
157
+ throw new Error(`Unknown user config type ${user.type}`);
158
+ };
159
+ exports.getAWSUser = getAWSUser;
160
+ //# sourceMappingURL=infraAws.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infraAws.js","sourceRoot":"","sources":["../src/infraAws.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,oDAA4B;AAC5B,0DAKiC;AACjC,4DAA6D;AAC7D,kDAAkD;AAYlD,kGAA8D;AAC9D,wGAA2E;AAC3E,0GAA0E;AAC1E,sDAA0B;AAsBnB,MAAM,+BAA+B,GAAG,CAC7C,cAAsB,EACtB,IAAa,EACE,EAAE;IACjB,MAAM,aAAa,GAAG,IAAA,iCAAiB,EAAC,IAAI,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,IAAI,CAC/C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CACjC,CAAC;IACF,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,cAAc,CAAC,CAAC;KACxE;IAED,IAAA,6BAAc,EAAC,UAAU,EAAE,qCAAsB,EAAE;QACjD,YAAY,EAAE,0BAA0B,cAAc,EAAE;KACzD,CAAC,CAAC;IACH,OAAO,UAA2B,CAAC;AACrC,CAAC,CAAC;AAjBW,QAAA,+BAA+B,mCAiB1C;AAEK,MAAM,qBAAqB,GAAG,CACnC,IAAU,EACV,IAAa,EACM,EAAE;IACrB,IAAI,CAAC,IAAI,EAAE;QACT,IAAI,GAAG,IAAA,wCAAyB,EAAC,UAAU,CAAC,CAAC;KAC9C;IAED,IAAI,GAAsB,CAAC;IAC3B,IAAI,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QACvB,GAAG,GAAG,IAAA,0BAAW,EAAC,IAAA,eAA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AAC,CAAC;KAClD;IAED,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC,CAAC;AA1GW,QAAA,UAAU,cA0GrB"}
@@ -0,0 +1,203 @@
1
+ {
2
+ "$ref": "#/definitions/AWSConfiguration",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "AWSAPIKeyUserConfig": {
6
+ "additionalProperties": false,
7
+ "description": "User accessing AWS using an access key id and secret access key. Only recommended for users used during development. The provided credentials will be included in the downloaded package but by default will not be committed to git.",
8
+ "properties": {
9
+ "awsAccessKeyId": {
10
+ "$ref": "#/definitions/AWSAccessKeyId"
11
+ },
12
+ "awsDefaultRegion": {
13
+ "$ref": "#/definitions/AWSRegion"
14
+ },
15
+ "awsSecretAccessKey": {
16
+ "$ref": "#/definitions/AWSSecretAccessKey"
17
+ }
18
+ },
19
+ "required": [
20
+ "awsDefaultRegion"
21
+ ],
22
+ "title": "AWS API Key User Configuration",
23
+ "type": "object"
24
+ },
25
+ "AWSAccessKeyId": {
26
+ "description": "Access key for this user.",
27
+ "pattern": "^[^\\s]*$",
28
+ "title": "AWS Access Key Id",
29
+ "type": "string"
30
+ },
31
+ "AWSAccessKeyIdVariableName": {
32
+ "description": "Name of environment variable for AWS Access Key Id. When in doubt, use AWS_ACCESS_KEY_ID.",
33
+ "pattern": "^[^\\s]*$",
34
+ "title": "AWS Access Key Id Variable Name",
35
+ "type": "string"
36
+ },
37
+ "AWSConfiguration": {
38
+ "additionalProperties": false,
39
+ "description": "Global configuration for deploying to AWS.",
40
+ "properties": {
41
+ "users": {
42
+ "$ref": "#/definitions/AWSUsers"
43
+ }
44
+ },
45
+ "required": [
46
+ "users"
47
+ ],
48
+ "title": "AWS Configuration",
49
+ "type": "object"
50
+ },
51
+ "AWSDefaultRegionVariableName": {
52
+ "description": "Name of environment variable for AWS Default Region. When in doubt, use AWS_DEFAULT_REGION.",
53
+ "pattern": "^[^\\s]*$",
54
+ "title": "AWS Default Region Varialbe Name",
55
+ "type": "string"
56
+ },
57
+ "AWSDeploymentRegion": {
58
+ "description": "AWS region that infrastructure should be deployed to.",
59
+ "enum": [
60
+ "us-east-1",
61
+ "us-east-2",
62
+ "us-west-1",
63
+ "us-west-2",
64
+ "af-south-1",
65
+ "ap-east-1",
66
+ "ap-south-1",
67
+ "ap-northeast-3",
68
+ "ap-northeast-2",
69
+ "ap-southeast-1",
70
+ "ap-southeast-2",
71
+ "ap-northeast-1",
72
+ "ca-central-1",
73
+ "eu-central-1",
74
+ "eu-west-1",
75
+ "eu-west-2",
76
+ "eu-south-1",
77
+ "eu-west-3",
78
+ "eu-north-1",
79
+ "me-south-1",
80
+ "sa-east-1"
81
+ ],
82
+ "title": "AWS Deployment Region",
83
+ "type": "string"
84
+ },
85
+ "AWSEnvironmentVariableUserConfig": {
86
+ "additionalProperties": false,
87
+ "description": "Obtain AWS user from environment variables. This will be useful for CI/CD.",
88
+ "properties": {
89
+ "awsAccessKeyIdVariableName": {
90
+ "$ref": "#/definitions/AWSAccessKeyIdVariableName"
91
+ },
92
+ "awsDefaultRegionVariableName": {
93
+ "$ref": "#/definitions/AWSDefaultRegionVariableName"
94
+ },
95
+ "awsSecretAccessKeyVariableName": {
96
+ "$ref": "#/definitions/AWSSecretAccessKeyVariableName"
97
+ }
98
+ },
99
+ "required": [
100
+ "awsAccessKeyIdVariableName",
101
+ "awsSecretAccessKeyVariableName",
102
+ "awsDefaultRegionVariableName"
103
+ ],
104
+ "title": "AWS Environment Variable User Configuration",
105
+ "type": "object"
106
+ },
107
+ "AWSLocalUserConfig": {
108
+ "additionalProperties": false,
109
+ "description": "User that is configured using the aws cli. Useful for development environments.",
110
+ "properties": {
111
+ "profile": {
112
+ "$ref": "#/definitions/Profile"
113
+ }
114
+ },
115
+ "required": [
116
+ "profile"
117
+ ],
118
+ "title": "AWS Local User Configuration",
119
+ "type": "object"
120
+ },
121
+ "AWSRegion": {
122
+ "$ref": "#/definitions/AWSDeploymentRegion",
123
+ "description": "Default AWS region to use.",
124
+ "pattern": "^[^\\s]*$",
125
+ "title": "AWS Region"
126
+ },
127
+ "AWSSecretAccessKey": {
128
+ "description": "Secret key for this user.",
129
+ "pattern": "^[^\\s]*$",
130
+ "title": "AWS Secret Access Key",
131
+ "type": "string"
132
+ },
133
+ "AWSSecretAccessKeyVariableName": {
134
+ "description": "Name of environment variable for AWS Secret Access Key. When in doubt, use AWS_SECRET_ACCESS_KEY.",
135
+ "pattern": "^[^\\s]*$",
136
+ "title": "AWS Secret Access Key Variable Name",
137
+ "type": "string"
138
+ },
139
+ "AWSUser": {
140
+ "additionalProperties": false,
141
+ "description": "AWS user",
142
+ "properties": {
143
+ "config": {
144
+ "$ref": "#/definitions/AwsUserConfig"
145
+ },
146
+ "name": {
147
+ "$ref": "#/definitions/Name"
148
+ },
149
+ "type": {
150
+ "$ref": "#/definitions/Type"
151
+ }
152
+ },
153
+ "required": [
154
+ "name",
155
+ "type",
156
+ "config"
157
+ ],
158
+ "title": "AWS User",
159
+ "type": "object"
160
+ },
161
+ "AWSUsers": {
162
+ "items": {
163
+ "$ref": "#/definitions/AWSUser"
164
+ },
165
+ "type": "array"
166
+ },
167
+ "AwsUserConfig": {
168
+ "anyOf": [
169
+ {
170
+ "$ref": "#/definitions/AWSLocalUserConfig"
171
+ },
172
+ {
173
+ "$ref": "#/definitions/AWSEnvironmentVariableUserConfig"
174
+ },
175
+ {
176
+ "$ref": "#/definitions/AWSAPIKeyUserConfig"
177
+ }
178
+ ]
179
+ },
180
+ "Name": {
181
+ "description": "Identifier for this user. No spaces allowed.",
182
+ "pattern": "^[^\\s]*$",
183
+ "title": "Name",
184
+ "type": "string"
185
+ },
186
+ "Profile": {
187
+ "description": "Profile name of the user configured with the aws cli. When in doubt, use `default`.",
188
+ "pattern": "^[^\\s]*$",
189
+ "title": "Profile",
190
+ "type": "string"
191
+ },
192
+ "Type": {
193
+ "description": "Type of this user.",
194
+ "enum": [
195
+ "apiKey",
196
+ "local",
197
+ "environmentVariables"
198
+ ],
199
+ "title": "Type",
200
+ "type": "string"
201
+ }
202
+ }
203
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$ref": "#/definitions/AWSTerraformState",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "AWSTerraformState": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "remoteState": {
9
+ "items": {
10
+ "$ref": "#/definitions/RemoteState"
11
+ },
12
+ "type": "array"
13
+ }
14
+ },
15
+ "required": [
16
+ "remoteState"
17
+ ],
18
+ "type": "object"
19
+ },
20
+ "Name": {
21
+ "description": "Identifier for this user. No spaces allowed.",
22
+ "pattern": "^[^\\s]*$",
23
+ "title": "Name",
24
+ "type": "string"
25
+ },
26
+ "RemoteState": {
27
+ "additionalProperties": false,
28
+ "properties": {
29
+ "terraformStateBucket": {
30
+ "$ref": "#/definitions/TerraformStateBucket"
31
+ },
32
+ "terraformStateDynamoDBTable": {
33
+ "$ref": "#/definitions/TerraformDynamoDBTable"
34
+ },
35
+ "user": {
36
+ "$ref": "#/definitions/Name"
37
+ }
38
+ },
39
+ "required": [
40
+ "user"
41
+ ],
42
+ "type": "object"
43
+ },
44
+ "TerraformDynamoDBTable": {
45
+ "description": "The name of the DynamoDB table used for Terraform state locking. If not provided, will be auto-generated on first deployment.",
46
+ "pattern": "^[^\\s]*$",
47
+ "title": "Terraform DynamoDB Table",
48
+ "type": "string"
49
+ },
50
+ "TerraformStateBucket": {
51
+ "description": "The name of the bucket where the Terraform state for the packages will be stored.\nIf not provided, will be auto-generated on first deployment.",
52
+ "pattern": "^[^\\s]*$",
53
+ "title": "Terraform State Bucket",
54
+ "type": "string"
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$ref": "#/definitions/AWSDeployment",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "AWSDeployment": {
6
+ "properties": {
7
+ "awsRegion": {
8
+ "$ref": "#/definitions/AWSDeploymentRegion"
9
+ },
10
+ "awsUser": {
11
+ "$ref": "#/definitions/AWSUserName"
12
+ },
13
+ "configuration": {
14
+ "$ref": "#/definitions/DeploymentConfiguration"
15
+ },
16
+ "name": {
17
+ "$ref": "#/definitions/DeploymentName"
18
+ }
19
+ },
20
+ "required": [
21
+ "awsRegion",
22
+ "awsUser",
23
+ "configuration",
24
+ "name"
25
+ ],
26
+ "type": "object"
27
+ },
28
+ "AWSDeploymentRegion": {
29
+ "description": "AWS region that infrastructure should be deployed to.",
30
+ "enum": [
31
+ "us-east-1",
32
+ "us-east-2",
33
+ "us-west-1",
34
+ "us-west-2",
35
+ "af-south-1",
36
+ "ap-east-1",
37
+ "ap-south-1",
38
+ "ap-northeast-3",
39
+ "ap-northeast-2",
40
+ "ap-southeast-1",
41
+ "ap-southeast-2",
42
+ "ap-northeast-1",
43
+ "ca-central-1",
44
+ "eu-central-1",
45
+ "eu-west-1",
46
+ "eu-west-2",
47
+ "eu-south-1",
48
+ "eu-west-3",
49
+ "eu-north-1",
50
+ "me-south-1",
51
+ "sa-east-1"
52
+ ],
53
+ "title": "AWS Deployment Region",
54
+ "type": "string"
55
+ },
56
+ "AWSUserName": {
57
+ "description": "Name of the AWS user that is used to perform the deployment.",
58
+ "title": "AWS User Name",
59
+ "type": "string"
60
+ },
61
+ "DeploymentConfiguration": {
62
+ "description": "Specifies configuration for a specific deployment.",
63
+ "title": "Deployment Configuration",
64
+ "type": "object"
65
+ },
66
+ "DeploymentName": {
67
+ "description": "Identifier for this deployment. No spaces allowed in name.",
68
+ "pattern": "^[^\\s]*$",
69
+ "title": "Deployment Name",
70
+ "type": "string"
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,112 @@
1
+ import { AWSDeploymentRegion } from './awsDeployment';
2
+ export declare type AWSUsers = AWSUser[];
3
+ /**
4
+ * Identifier for this user. No spaces allowed.
5
+ *
6
+ * @title Name
7
+ * @pattern ^[^\s]*$
8
+ */
9
+ export declare type Name = string;
10
+ /**
11
+ * Type of this user.
12
+ *
13
+ * @title Type
14
+ */
15
+ export declare type Type = 'apiKey' | 'local' | 'environmentVariables';
16
+ /**
17
+ * Profile name of the user configured with the aws cli. When in doubt, use `default`.
18
+ *
19
+ * @title Profile
20
+ * @pattern ^[^\s]*$
21
+ */
22
+ export declare type Profile = string;
23
+ /**
24
+ * Name of environment variable for AWS Access Key Id. When in doubt, use AWS_ACCESS_KEY_ID.
25
+ *
26
+ * @title AWS Access Key Id Variable Name
27
+ * @pattern ^[^\s]*$
28
+ */
29
+ export declare type AWSAccessKeyIdVariableName = string;
30
+ /**
31
+ * Name of environment variable for AWS Secret Access Key. When in doubt, use AWS_SECRET_ACCESS_KEY.
32
+ *
33
+ * @title AWS Secret Access Key Variable Name
34
+ * @pattern ^[^\s]*$
35
+ */
36
+ export declare type AWSSecretAccessKeyVariableName = string;
37
+ /**
38
+ * Name of environment variable for AWS Default Region. When in doubt, use AWS_DEFAULT_REGION.
39
+ *
40
+ * @title AWS Default Region Varialbe Name
41
+ * @pattern ^[^\s]*$
42
+ */
43
+ export declare type AWSDefaultRegionVariableName = string;
44
+ /**
45
+ * Access key for this user.
46
+ *
47
+ * @title AWS Access Key Id
48
+ * @pattern ^[^\s]*$
49
+ */
50
+ export declare type AWSAccessKeyId = string;
51
+ /**
52
+ * Secret key for this user.
53
+ *
54
+ * @title AWS Secret Access Key
55
+ * @pattern ^[^\s]*$
56
+ */
57
+ export declare type AWSSecretAccessKey = string;
58
+ /**
59
+ * Default AWS region to use.
60
+ *
61
+ * @title AWS Region
62
+ * @pattern ^[^\s]*$
63
+ */
64
+ export declare type AWSRegion = AWSDeploymentRegion;
65
+ /**
66
+ * User that is configured using the aws cli. Useful for development environments.
67
+ *
68
+ * @title AWS Local User Configuration
69
+ */
70
+ export interface AWSLocalUserConfig {
71
+ profile: Profile;
72
+ }
73
+ /**
74
+ * Obtain AWS user from environment variables. This will be useful for CI/CD.
75
+ *
76
+ * @title AWS Environment Variable User Configuration
77
+ */
78
+ export interface AWSEnvironmentVariableUserConfig {
79
+ awsAccessKeyIdVariableName: AWSAccessKeyIdVariableName;
80
+ awsSecretAccessKeyVariableName: AWSSecretAccessKeyVariableName;
81
+ awsDefaultRegionVariableName: AWSDefaultRegionVariableName;
82
+ }
83
+ /**
84
+ * User accessing AWS using an access key id and secret access key. Only recommended for users used during development. The provided credentials will be included in the downloaded package but by default will not be committed to git.
85
+ *
86
+ * @title AWS API Key User Configuration
87
+ */
88
+ export interface AWSAPIKeyUserConfig {
89
+ awsAccessKeyId?: AWSAccessKeyId;
90
+ awsSecretAccessKey?: AWSSecretAccessKey;
91
+ awsDefaultRegion: AWSRegion;
92
+ }
93
+ export declare type AwsUserConfig = AWSLocalUserConfig | AWSEnvironmentVariableUserConfig | AWSAPIKeyUserConfig;
94
+ /**
95
+ * AWS user
96
+ *
97
+ * @title AWS User
98
+ */
99
+ export interface AWSUser {
100
+ name: Name;
101
+ type: Type;
102
+ config: AwsUserConfig;
103
+ }
104
+ /**
105
+ * Global configuration for deploying to AWS.
106
+ *
107
+ * @title AWS Configuration
108
+ */
109
+ export interface AWSConfiguration {
110
+ users: AWSUsers;
111
+ }
112
+ //# sourceMappingURL=awsAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsAccount.d.ts","sourceRoot":"","sources":["../../src/types/awsAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,OAAO,EAAE,CAAC;AAEjC;;;;;GAKG;AACH,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B;;;;GAIG;AACH,oBAAY,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,sBAAsB,CAAC;AAE/D;;;;;GAKG;AACH,oBAAY,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;GAKG;AACH,oBAAY,0BAA0B,GAAG,MAAM,CAAC;AAChD;;;;;GAKG;AACH,oBAAY,8BAA8B,GAAG,MAAM,CAAC;AAEpD;;;;;GAKG;AACH,oBAAY,4BAA4B,GAAG,MAAM,CAAC;AAElD;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;GAKG;AACH,oBAAY,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,oBAAY,SAAS,GAAG,mBAAmB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC/C,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,8BAA8B,EAAE,8BAA8B,CAAC;IAC/D,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D;AACD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gBAAgB,EAAE,SAAS,CAAC;CAC7B;AAED,oBAAY,aAAa,GACrB,kBAAkB,GAClB,gCAAgC,GAChC,mBAAmB,CAAC;AAExB;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,QAAQ,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=awsAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsAccount.js","sourceRoot":"","sources":["../../src/types/awsAccount.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { Deployment } from '@goldstack/infra';
2
+ /**
3
+ * AWS region that infrastructure should be deployed to.
4
+ *
5
+ * @title AWS Deployment Region
6
+ */
7
+ export declare type AWSDeploymentRegion = 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'af-south-1' | 'ap-east-1' | 'ap-south-1' | 'ap-northeast-3' | 'ap-northeast-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-northeast-1' | 'ca-central-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'eu-south-1' | 'eu-west-3' | 'eu-north-1' | 'me-south-1' | 'sa-east-1';
8
+ /**
9
+ * Name of the AWS user that is used to perform the deployment.
10
+ *
11
+ * @title AWS User Name
12
+ */
13
+ export declare type AWSUserName = string;
14
+ export interface AWSDeployment extends Deployment {
15
+ awsRegion: AWSDeploymentRegion;
16
+ awsUser: AWSUserName;
17
+ }
18
+ //# sourceMappingURL=awsDeployment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsDeployment.d.ts","sourceRoot":"","sources":["../../src/types/awsDeployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;GAIG;AACH,oBAAY,mBAAmB,GAC3B,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,WAAW,CAAC;AAEhB;;;;GAIG;AACH,oBAAY,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=awsDeployment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsDeployment.js","sourceRoot":"","sources":["../../src/types/awsDeployment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { Name } from './awsAccount';
2
+ /**
3
+ * The name of the bucket where the Terraform state for the packages will be stored.
4
+ * If not provided, will be auto-generated on first deployment.
5
+ *
6
+ * @title Terraform State Bucket
7
+ * @pattern ^[^\s]*$
8
+ */
9
+ export declare type TerraformStateBucket = string;
10
+ /**
11
+ * The name of the DynamoDB table used for Terraform state locking. If not provided, will be auto-generated on first deployment.
12
+ *
13
+ * @title Terraform DynamoDB Table
14
+ * @pattern ^[^\s]*$
15
+ */
16
+ export declare type TerraformDynamoDBTable = string;
17
+ export interface RemoteState {
18
+ user: Name;
19
+ terraformStateBucket?: TerraformStateBucket;
20
+ terraformStateDynamoDBTable?: TerraformDynamoDBTable;
21
+ }
22
+ export interface AWSTerraformState {
23
+ remoteState: RemoteState[];
24
+ }
25
+ //# sourceMappingURL=awsTerraformState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsTerraformState.d.ts","sourceRoot":"","sources":["../../src/types/awsTerraformState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;;;;;GAMG;AACH,oBAAY,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;;;;GAKG;AACH,oBAAY,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,2BAA2B,CAAC,EAAE,sBAAsB,CAAC;CACtD;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,WAAW,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=awsTerraformState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsTerraformState.js","sourceRoot":"","sources":["../../src/types/awsTerraformState.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@goldstack/infra-aws",
3
+ "version": "0.3.17",
4
+ "description": "Utilities to work with AWS infrastructrue via the cli.",
5
+ "keywords": [
6
+ "goldstack",
7
+ "utility",
8
+ "infrastructure",
9
+ "IaC",
10
+ "configuration",
11
+ "aws",
12
+ "cli"
13
+ ],
14
+ "homepage": "https://goldstack.party",
15
+ "bugs": {
16
+ "url": "https://github.com/goldstack/goldstack/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/goldstack/goldstack.git"
21
+ },
22
+ "license": "MIT",
23
+ "author": "Max Rohde",
24
+ "sideEffects": false,
25
+ "main": "dist/infraAws.js",
26
+ "scripts": {
27
+ "build": "yarn clean && yarn compile",
28
+ "build:watch": "yarn clean && yarn compile:watch",
29
+ "clean": "rm -rf ./dist",
30
+ "compile": "tsc -p tsconfig.json",
31
+ "compile:watch": "tsc -p tsconfig.json --watch",
32
+ "compile:watch:light": "nodemon --watch ./src/ -e '*' --exec 'yarn compile'",
33
+ "coverage": "jest --collect-coverage --passWithNoTests --config=./jest.config.js",
34
+ "generate:schema": "ts-json-schema-generator --tsconfig tsconfig.generate.json --path './src/types/**/*' --type 'AWSConfiguration' -o src/schemas/accountConfigSchema.json && ts-json-schema-generator --tsconfig tsconfig.generate.json --path './src/types/**/*' --type 'AWSDeployment' -o src/schemas/deploymentConfigSchema.json ts-json-schema-generator --tsconfig tsconfig.generate.json --path './src/types/**/*' --type 'AWSTerraformState' -o src/schemas/awsTerraformStateSchema.json",
35
+ "prepublishOnly": "yarn run build",
36
+ "publish": "utils-git changed --exec \"yarn npm publish $@\"",
37
+ "test:ci": "jest --passWithNoTests --config=./jest.config.js",
38
+ "version:apply": "utils-git changed --exec \"yarn version $@ && yarn version apply\"",
39
+ "version:apply:force": "yarn version $@ && yarn version apply"
40
+ },
41
+ "dependencies": {
42
+ "@goldstack/infra": "0.3.15",
43
+ "@goldstack/utils-config": "0.3.14",
44
+ "@goldstack/utils-log": "0.2.6",
45
+ "@goldstack/utils-package": "0.3.15",
46
+ "@goldstack/utils-sh": "0.4.13",
47
+ "aws-sdk": "2.721.0",
48
+ "axios": "^0.21.1",
49
+ "handlebars": "^4.7.6"
50
+ },
51
+ "devDependencies": {
52
+ "@goldstack/utils-git": "0.1.26",
53
+ "@types/jest": "^26.0.21",
54
+ "@types/node": "^14.0.6",
55
+ "jest": "^26.6.3",
56
+ "renamer": "^0.7.0",
57
+ "ts-jest": "^26.5.4",
58
+ "ts-json-schema-generator": "^0.70.2",
59
+ "typescript": "^4.4.3"
60
+ }
61
+ }