@aws/nx-plugin 0.109.0 → 0.109.1
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/package.json +1 -1
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +167 -89
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +72 -16
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +11 -9
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +11 -9
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +113 -61
- package/src/terraform/project/files/application/scripts/aws-config.ts.template +41 -0
- package/src/terraform/project/files/application/scripts/bootstrap.ts.template +91 -0
- package/src/terraform/project/files/application/scripts/init.ts.template +44 -0
- package/src/terraform/project/generator.js +16 -11
- package/src/terraform/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +167 -89
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +72 -16
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +11 -9
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +7 -0
- package/src/ts/strands-agent/__snapshots__/generator.spec.ts.snap +11 -9
- package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +14 -12
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +28 -15
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +29 -16
- package/src/utils/files/terraform/scripts/reset-runtime-config.ts.template +25 -0
- package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +203 -0
- package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +42 -39
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +138 -0
- package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +26 -90
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +61 -5
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/__functionNameKebabCase__/__functionNameKebabCase__.tf.template +35 -7
- package/src/utils/shared-constructs.js +4 -2
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/versions.d.ts +4 -1
- package/src/utils/versions.js +3 -0
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +7 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the current AWS account ID + region using the standard
|
|
3
|
+
* AWS SDK credential + config chain (same chain CDK uses).
|
|
4
|
+
*/
|
|
5
|
+
import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
|
|
6
|
+
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
|
|
7
|
+
import {
|
|
8
|
+
NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
9
|
+
NODE_REGION_CONFIG_OPTIONS,
|
|
10
|
+
} from '@smithy/config-resolver';
|
|
11
|
+
import { loadConfig } from '@smithy/node-config-provider';
|
|
12
|
+
|
|
13
|
+
export interface AwsConfig {
|
|
14
|
+
accountId: string;
|
|
15
|
+
region: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function resolveAwsConfig(): Promise<AwsConfig> {
|
|
19
|
+
const region = await loadConfig(
|
|
20
|
+
NODE_REGION_CONFIG_OPTIONS,
|
|
21
|
+
NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
22
|
+
)();
|
|
23
|
+
if (!region) {
|
|
24
|
+
throw new Error(
|
|
25
|
+
'Unable to resolve AWS region. Set the `AWS_REGION` environment variable or configure a default region via `aws configure`.',
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const sts = new STSClient({
|
|
30
|
+
region,
|
|
31
|
+
credentials: fromNodeProviderChain(),
|
|
32
|
+
});
|
|
33
|
+
const identity = await sts.send(new GetCallerIdentityCommand({}));
|
|
34
|
+
if (!identity.Account) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
'Unable to resolve AWS account ID — no credentials found in the default provider chain.',
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return { accountId: identity.Account, region };
|
|
41
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstraps the remote Terraform state bucket.
|
|
3
|
+
*
|
|
4
|
+
* Equivalent to `cdk bootstrap` — resolves account + region from the AWS
|
|
5
|
+
* SDK credential chain, pulls any existing bootstrap tfstate from S3,
|
|
6
|
+
* runs `terraform apply` in the `bootstrap` dir, then pushes the new
|
|
7
|
+
* state back to S3.
|
|
8
|
+
*/
|
|
9
|
+
import { execFileSync } from 'node:child_process';
|
|
10
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
11
|
+
import { dirname, join, resolve } from 'node:path';
|
|
12
|
+
import {
|
|
13
|
+
S3Client,
|
|
14
|
+
GetObjectCommand,
|
|
15
|
+
PutObjectCommand,
|
|
16
|
+
} from '@aws-sdk/client-s3';
|
|
17
|
+
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
|
|
18
|
+
import { resolveAwsConfig } from './aws-config';
|
|
19
|
+
|
|
20
|
+
const projectRootRel = process.argv[2];
|
|
21
|
+
if (!projectRootRel) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
'Expected the project root as argv[2] — this script is wired up by the generated `bootstrap` nx target and should be invoked through it.',
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
const workspaceRoot = process.cwd();
|
|
27
|
+
const projectRoot = resolve(workspaceRoot, projectRootRel);
|
|
28
|
+
const bootstrapDir = join(projectRoot, 'bootstrap');
|
|
29
|
+
const tfStatePath = join(
|
|
30
|
+
workspaceRoot,
|
|
31
|
+
'dist',
|
|
32
|
+
projectRootRel,
|
|
33
|
+
'terraform',
|
|
34
|
+
'bootstrap.tfstate',
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const main = async () => {
|
|
38
|
+
const { accountId, region } = await resolveAwsConfig();
|
|
39
|
+
const bucket = `${accountId}-tf-state-${region}`;
|
|
40
|
+
const key = 'bootstrap.tfstate';
|
|
41
|
+
|
|
42
|
+
const s3 = new S3Client({ region, credentials: fromNodeProviderChain() });
|
|
43
|
+
|
|
44
|
+
mkdirSync(dirname(tfStatePath), { recursive: true });
|
|
45
|
+
|
|
46
|
+
// Pull any existing bootstrap tfstate. First-time bootstrap has no
|
|
47
|
+
// remote state yet — fall through and let terraform apply create the
|
|
48
|
+
// bucket.
|
|
49
|
+
try {
|
|
50
|
+
const out = await s3.send(
|
|
51
|
+
new GetObjectCommand({ Bucket: bucket, Key: key }),
|
|
52
|
+
);
|
|
53
|
+
if (out.Body) {
|
|
54
|
+
writeFileSync(tfStatePath, await out.Body.transformToByteArray());
|
|
55
|
+
}
|
|
56
|
+
} catch (err: any) {
|
|
57
|
+
const name = err?.name ?? '';
|
|
58
|
+
const status = err?.$metadata?.httpStatusCode;
|
|
59
|
+
const firstRun =
|
|
60
|
+
name === 'NoSuchBucket' ||
|
|
61
|
+
name === 'NoSuchKey' ||
|
|
62
|
+
status === 404 ||
|
|
63
|
+
status === 403;
|
|
64
|
+
if (!firstRun) throw err;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
execFileSync('terraform', ['init'], { cwd: bootstrapDir, stdio: 'inherit' });
|
|
68
|
+
execFileSync(
|
|
69
|
+
'terraform',
|
|
70
|
+
[
|
|
71
|
+
'apply',
|
|
72
|
+
'-auto-approve',
|
|
73
|
+
`-state=${tfStatePath}`,
|
|
74
|
+
`-var=aws_region=${region}`,
|
|
75
|
+
],
|
|
76
|
+
{ cwd: bootstrapDir, stdio: 'inherit' },
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
await s3.send(
|
|
80
|
+
new PutObjectCommand({
|
|
81
|
+
Bucket: bucket,
|
|
82
|
+
Key: key,
|
|
83
|
+
Body: readFileSync(tfStatePath),
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
main().catch((err) => {
|
|
89
|
+
console.error(err);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs `terraform init` against the remote S3 backend, resolving the
|
|
3
|
+
* backend config (bucket + region + per-env state key) from the AWS
|
|
4
|
+
* SDK credential chain. Pass the environment name via the `TF_ENV`
|
|
5
|
+
* env var (defaults to `dev`).
|
|
6
|
+
*/
|
|
7
|
+
import { execFileSync } from 'node:child_process';
|
|
8
|
+
import { join, resolve } from 'node:path';
|
|
9
|
+
import { resolveAwsConfig } from './aws-config';
|
|
10
|
+
|
|
11
|
+
const STATE_KEY_PREFIX = '<%- stateKeyPrefix %>';
|
|
12
|
+
|
|
13
|
+
const projectRootRel = process.argv[2];
|
|
14
|
+
if (!projectRootRel) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
'Expected the project root as argv[2] — this script is wired up by the generated `init` nx target and should be invoked through it.',
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
const srcDir = join(resolve(process.cwd(), projectRootRel), 'src');
|
|
20
|
+
|
|
21
|
+
const main = async () => {
|
|
22
|
+
const { accountId, region } = await resolveAwsConfig();
|
|
23
|
+
const env = process.env.TF_ENV ?? 'dev';
|
|
24
|
+
const bucket = `${accountId}-tf-state-${region}`;
|
|
25
|
+
const key = `${STATE_KEY_PREFIX}/${env}/terraform.tfstate`;
|
|
26
|
+
|
|
27
|
+
execFileSync(
|
|
28
|
+
'terraform',
|
|
29
|
+
[
|
|
30
|
+
'init',
|
|
31
|
+
'-reconfigure',
|
|
32
|
+
`-backend-config=region=${region}`,
|
|
33
|
+
`-backend-config=bucket=${bucket}`,
|
|
34
|
+
`-backend-config=key=${key}`,
|
|
35
|
+
...process.argv.slice(3),
|
|
36
|
+
],
|
|
37
|
+
{ cwd: srcDir, stdio: 'inherit' },
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
main().catch((err) => {
|
|
42
|
+
console.error(err);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
@@ -53,14 +53,8 @@ async function terraformProjectGenerator(tree, schema) {
|
|
|
53
53
|
executor: 'nx:run-commands',
|
|
54
54
|
options: {
|
|
55
55
|
forwardAllArgs: true,
|
|
56
|
-
commands: [
|
|
57
|
-
|
|
58
|
-
'terraform init',
|
|
59
|
-
`terraform apply -auto-approve -state=${tfDistDir}/bootstrap.tfstate -var="aws_region=$(aws configure get region)"`,
|
|
60
|
-
`aws s3 cp ${tfDistDir}/bootstrap.tfstate s3://$(aws sts get-caller-identity --query Account --output text)-tf-state-$(aws configure get region)/bootstrap.tfstate`,
|
|
61
|
-
],
|
|
62
|
-
parallel: false,
|
|
63
|
-
cwd: '{projectRoot}/bootstrap',
|
|
56
|
+
commands: ['tsx {projectRoot}/scripts/bootstrap.ts {projectRoot}'],
|
|
57
|
+
cwd: '{workspaceRoot}',
|
|
64
58
|
},
|
|
65
59
|
},
|
|
66
60
|
'bootstrap-destroy': {
|
|
@@ -96,12 +90,13 @@ async function terraformProjectGenerator(tree, schema) {
|
|
|
96
90
|
defaultConfiguration: 'dev',
|
|
97
91
|
configurations: {
|
|
98
92
|
dev: {
|
|
99
|
-
|
|
93
|
+
env: { TF_ENV: 'dev' },
|
|
100
94
|
},
|
|
101
95
|
},
|
|
102
96
|
options: {
|
|
103
97
|
forwardAllArgs: true,
|
|
104
|
-
|
|
98
|
+
commands: ['tsx {projectRoot}/scripts/init.ts {projectRoot}'],
|
|
99
|
+
cwd: '{workspaceRoot}',
|
|
105
100
|
},
|
|
106
101
|
dependsOn: ['^init'],
|
|
107
102
|
},
|
|
@@ -198,6 +193,7 @@ async function terraformProjectGenerator(tree, schema) {
|
|
|
198
193
|
lib.dir, // destination path of the files
|
|
199
194
|
{
|
|
200
195
|
metricsModulePath,
|
|
196
|
+
stateKeyPrefix: (0, names_1.kebabCase)(lib.fullyQualifiedName),
|
|
201
197
|
}, {
|
|
202
198
|
overwriteStrategy: devkit_1.OverwriteStrategy.Overwrite,
|
|
203
199
|
});
|
|
@@ -214,7 +210,16 @@ async function terraformProjectGenerator(tree, schema) {
|
|
|
214
210
|
await (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [
|
|
215
211
|
exports.TERRAFORM_PROJECT_GENERATOR_INFO,
|
|
216
212
|
]);
|
|
217
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, (0, versions_1.withVersions)([
|
|
213
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, (0, versions_1.withVersions)([
|
|
214
|
+
'@nx-extend/terraform',
|
|
215
|
+
'make-dir-cli',
|
|
216
|
+
'tsx',
|
|
217
|
+
'@aws-sdk/client-s3',
|
|
218
|
+
'@aws-sdk/client-sts',
|
|
219
|
+
'@aws-sdk/credential-providers',
|
|
220
|
+
'@smithy/config-resolver',
|
|
221
|
+
'@smithy/node-config-provider',
|
|
222
|
+
]));
|
|
218
223
|
// @nx-extend/terraform has a peer dependency on @nx/devkit ^21.0.0 which causes
|
|
219
224
|
// npm install to fail, so for NPM we add a resolution
|
|
220
225
|
// Can remove when https://github.com/TriPSs/nx-extend/issues/407 is addressed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/terraform/project/generator.ts"],"names":[],"mappings":";;;AA2CA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/terraform/project/generator.ts"],"names":[],"mappings":";;;AA2CA,8DA4QC;AAvTD;;;GAGG;AACH,uCAcoB;AAEpB,sDAAyD;AACzD,+BAAsC;AACtC,+CAAoD;AACpD,uCAIwB;AACxB,yCAAkD;AAClD,mDAAoD;AACpD,iDAAsE;AACtE,qEAA0E;AAC1E,uCAA4C;AAC5C,yFAGiD;AACjD,6C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