@quadnix/octo-aws-cdk 0.2.1 → 0.2.3
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 +5 -6
- package/dist/anchors/aws-account/aws-account.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-account/aws-account.anchor.schema.js +1 -1
- package/dist/anchors/aws-cloudfront/aws-cloudfront.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-cloudfront/aws-cloudfront.anchor.schema.js +1 -1
- package/dist/anchors/aws-deployment/aws-deployment.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-deployment/aws-deployment.anchor.schema.js +1 -1
- package/dist/anchors/aws-dynamodb/aws-dynamodb-global.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-dynamodb/aws-dynamodb-global.anchor.schema.js +1 -1
- package/dist/anchors/aws-dynamodb/aws-dynamodb.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-dynamodb/aws-dynamodb.anchor.schema.js +1 -1
- package/dist/anchors/aws-ecr/aws-ecr-image.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-ecr/aws-ecr-image.anchor.schema.js +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-alb.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-alb.anchor.schema.js +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-cluster.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-cluster.anchor.schema.js +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-execution.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-execution.anchor.schema.js +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-service.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-ecs/aws-ecs-service.anchor.schema.js +1 -1
- package/dist/anchors/aws-efs/aws-efs.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-efs/aws-efs.anchor.schema.js +1 -1
- package/dist/anchors/aws-environment/aws-serverless-environment.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-environment/aws-serverless-environment.anchor.schema.js +1 -1
- package/dist/anchors/aws-lambda/aws-lambda-execution.anchor.schema.d.ts +1 -3
- package/dist/anchors/aws-lambda/aws-lambda-execution.anchor.schema.js +1 -6
- package/dist/anchors/aws-lambda/aws-lambda-execution.anchor.schema.js.map +1 -1
- package/dist/anchors/aws-lambda/aws-lambda-function.anchor.schema.d.ts +5 -1
- package/dist/anchors/aws-lambda/aws-lambda-function.anchor.schema.js +8 -2
- package/dist/anchors/aws-lambda/aws-lambda-function.anchor.schema.js.map +1 -1
- package/dist/anchors/aws-region/aws-region.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-region/aws-region.anchor.schema.js +1 -1
- package/dist/anchors/aws-region/aws-serverless-region.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-region/aws-serverless-region.anchor.schema.js +1 -1
- package/dist/anchors/aws-s3-storage-service/aws-s3-storage-service-access-prefix.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-s3-storage-service/aws-s3-storage-service-access-prefix.anchor.schema.js +1 -1
- package/dist/anchors/aws-s3-storage-service/aws-s3-storage-service.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-s3-storage-service/aws-s3-storage-service.anchor.schema.js +1 -1
- package/dist/anchors/aws-security-group/aws-security-group.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-security-group/aws-security-group.anchor.schema.js +1 -1
- package/dist/anchors/aws-server/aws-server.anchor.schema.d.ts +8 -1
- package/dist/anchors/aws-server/aws-server.anchor.schema.js +4 -1
- package/dist/anchors/aws-server/aws-server.anchor.schema.js.map +1 -1
- package/dist/anchors/aws-subnet/aws-serverless-subnet.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-subnet/aws-serverless-subnet.anchor.schema.js +1 -1
- package/dist/anchors/aws-subnet/aws-subnet-local-filesystem-mount.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-subnet/aws-subnet-local-filesystem-mount.anchor.schema.js +1 -1
- package/dist/anchors/aws-subnet/aws-subnet.anchor.schema.d.ts +1 -1
- package/dist/anchors/aws-subnet/aws-subnet.anchor.schema.js +1 -1
- package/dist/factories/aws-client.factory.d.ts +2 -1
- package/dist/factories/aws-client.factory.js +4 -2
- package/dist/factories/aws-client.factory.js.map +1 -1
- package/dist/modules/account/aws-credentials-account/aws-credentials-account.module.d.ts +1 -1
- package/dist/modules/account/aws-credentials-account/aws-credentials-account.module.js +2 -3
- package/dist/modules/account/aws-credentials-account/aws-credentials-account.module.js.map +1 -1
- package/dist/modules/account/aws-credentials-account/models/account/aws-credentials-account.model.js +1 -1
- package/dist/modules/account/aws-credentials-account/models/account/aws-credentials-account.model.js.map +1 -1
- package/dist/modules/account/aws-credentials-account/models/account/index.d.ts +0 -1
- package/dist/modules/account/aws-credentials-account/models/account/index.js +0 -1
- package/dist/modules/account/aws-credentials-account/models/account/index.js.map +1 -1
- package/dist/modules/account/aws-ini-account/aws-ini-account.module.d.ts +1 -1
- package/dist/modules/account/aws-ini-account/aws-ini-account.module.js +2 -3
- package/dist/modules/account/aws-ini-account/aws-ini-account.module.js.map +1 -1
- package/dist/modules/account/aws-ini-account/models/account/aws-ini-account.model.d.ts +7 -0
- package/dist/modules/account/aws-ini-account/models/account/aws-ini-account.model.js +22 -1
- package/dist/modules/account/aws-ini-account/models/account/aws-ini-account.model.js.map +1 -1
- package/dist/modules/account/aws-ini-account/models/account/index.d.ts +0 -1
- package/dist/modules/account/aws-ini-account/models/account/index.js +0 -1
- package/dist/modules/account/aws-ini-account/models/account/index.js.map +1 -1
- package/dist/modules/account/aws-localstack-account/aws-localstack-account.module.d.ts +1 -1
- package/dist/modules/account/aws-localstack-account/aws-localstack-account.module.js +2 -3
- package/dist/modules/account/aws-localstack-account/aws-localstack-account.module.js.map +1 -1
- package/dist/modules/account/aws-localstack-account/models/account/aws-localstack-account.model.js +1 -1
- package/dist/modules/account/aws-localstack-account/models/account/aws-localstack-account.model.js.map +1 -1
- package/dist/modules/account/aws-localstack-account/models/account/index.d.ts +0 -1
- package/dist/modules/account/aws-localstack-account/models/account/index.js +0 -1
- package/dist/modules/account/aws-localstack-account/models/account/index.js.map +1 -1
- package/dist/modules/account/aws-moto-account/aws-moto-account.module.d.ts +1 -1
- package/dist/modules/account/aws-moto-account/aws-moto-account.module.js +2 -3
- package/dist/modules/account/aws-moto-account/aws-moto-account.module.js.map +1 -1
- package/dist/modules/account/aws-moto-account/models/account/aws-moto-account.model.js +1 -1
- package/dist/modules/account/aws-moto-account/models/account/aws-moto-account.model.js.map +1 -1
- package/dist/modules/account/aws-moto-account/models/account/index.d.ts +0 -1
- package/dist/modules/account/aws-moto-account/models/account/index.js +0 -1
- package/dist/modules/account/aws-moto-account/models/account/index.js.map +1 -1
- package/dist/modules/app/simple-app/index.d.ts +0 -1
- package/dist/modules/app/simple-app/index.js +0 -1
- package/dist/modules/app/simple-app/index.js.map +1 -1
- package/dist/modules/app/simple-app/simple-app.module.d.ts +1 -1
- package/dist/modules/app/simple-app/simple-app.module.js +1 -1
- package/dist/modules/deployment/aws-deployment/aws-deployment.module.d.ts +1 -1
- package/dist/modules/deployment/aws-deployment/aws-deployment.module.js +1 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/aws-deployment.model.js +1 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/aws-deployment.model.js.map +1 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/index.d.ts +0 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/index.js +0 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/index.js.map +1 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/aws-deployment-image.overlay.js +1 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/aws-deployment-image.overlay.js.map +1 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/index.d.ts +0 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/index.js +0 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/index.js.map +1 -1
- package/dist/modules/environment/aws-ecs-environment/aws-ecs-environment.module.d.ts +1 -1
- package/dist/modules/environment/aws-ecs-environment/aws-ecs-environment.module.js +1 -1
- package/dist/modules/environment/aws-serverless-environment/aws-serverless-environment.module.d.ts +1 -1
- package/dist/modules/environment/aws-serverless-environment/aws-serverless-environment.module.js +1 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/aws-serverless-environment.model.js +1 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/aws-serverless-environment.model.js.map +1 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/index.d.ts +0 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/index.js +0 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/index.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/aws-ecs-execution.module.d.ts +1 -1
- package/dist/modules/execution/aws-ecs-execution/aws-ecs-execution.module.js +16 -9
- package/dist/modules/execution/aws-ecs-execution/aws-ecs-execution.module.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/index.schema.d.ts +5 -0
- package/dist/modules/execution/aws-ecs-execution/index.schema.js +14 -0
- package/dist/modules/execution/aws-ecs-execution/index.schema.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/aws-ecs-execution.model.js +1 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/aws-ecs-execution.model.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/index.d.ts +0 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/index.js +0 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/index.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/actions/add-aws-ecs-execution.overlay.action.js +45 -1
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/actions/add-aws-ecs-execution.overlay.action.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/aws-ecs-execution.overlay.d.ts +3 -2
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/aws-ecs-execution.overlay.js.map +1 -1
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/aws-ecs-execution.schema.d.ts +7 -0
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/aws-ecs-execution.schema.js +1 -0
- package/dist/modules/execution/aws-ecs-execution/overlays/aws-ecs-execution/aws-ecs-execution.schema.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/aws-lambda-execution.module.d.ts +1 -1
- package/dist/modules/execution/aws-lambda-execution/aws-lambda-execution.module.js +15 -3
- package/dist/modules/execution/aws-lambda-execution/aws-lambda-execution.module.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/index.schema.d.ts +3 -3
- package/dist/modules/execution/aws-lambda-execution/index.schema.js +8 -6
- package/dist/modules/execution/aws-lambda-execution/index.schema.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/aws-lambda-execution.model.js +1 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/aws-lambda-execution.model.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/index.d.ts +0 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/index.js +0 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/index.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/actions/add-aws-lambda-execution.overlay.action.js +45 -4
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/actions/add-aws-lambda-execution.overlay.action.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/aws-lambda-execution.overlay.d.ts +3 -2
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/aws-lambda-execution.overlay.js.map +1 -1
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/aws-lambda-execution.schema.d.ts +7 -0
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/aws-lambda-execution.schema.js +1 -0
- package/dist/modules/execution/aws-lambda-execution/overlays/aws-lambda-execution/aws-lambda-execution.schema.js.map +1 -1
- package/dist/modules/filesystem/aws-efs-filesystem/aws-efs-filesystem.module.d.ts +1 -1
- package/dist/modules/filesystem/aws-efs-filesystem/aws-efs-filesystem.module.js +1 -1
- package/dist/modules/image/aws-ecr-image/aws-ecr-image.module.d.ts +1 -1
- package/dist/modules/image/aws-ecr-image/aws-ecr-image.module.js +1 -1
- package/dist/modules/image/aws-ecr-image/index.schema.d.ts +6 -0
- package/dist/modules/image/aws-ecr-image/index.schema.js +10 -0
- package/dist/modules/image/aws-ecr-image/index.schema.js.map +1 -1
- package/dist/modules/image/aws-ecr-image/models/image/actions/add-aws-ecr-image.model.action.js +1 -0
- package/dist/modules/image/aws-ecr-image/models/image/actions/add-aws-ecr-image.model.action.js.map +1 -1
- package/dist/modules/region/aws-multi-az-region/aws-multi-az-region.module.d.ts +1 -1
- package/dist/modules/region/aws-multi-az-region/aws-multi-az-region.module.js +1 -1
- package/dist/modules/region/aws-multi-az-region/index.schema.d.ts +1 -1
- package/dist/modules/region/aws-multi-az-region/index.schema.js +2 -2
- package/dist/modules/region/aws-multi-az-region/index.schema.js.map +1 -1
- package/dist/modules/region/aws-serverless-region/aws-serverless-region.module.d.ts +1 -1
- package/dist/modules/region/aws-serverless-region/aws-serverless-region.module.js +1 -1
- package/dist/modules/region/aws-serverless-region/index.schema.d.ts +1 -1
- package/dist/modules/region/aws-serverless-region/index.schema.js +2 -2
- package/dist/modules/region/aws-serverless-region/index.schema.js.map +1 -1
- package/dist/modules/region/aws-serverless-region/models/region/aws-serverless-region.model.js +1 -1
- package/dist/modules/region/aws-serverless-region/models/region/aws-serverless-region.model.js.map +1 -1
- package/dist/modules/region/aws-serverless-region/models/region/index.d.ts +0 -1
- package/dist/modules/region/aws-serverless-region/models/region/index.js +0 -1
- package/dist/modules/region/aws-serverless-region/models/region/index.js.map +1 -1
- package/dist/modules/region/aws-single-az-region/aws-single-az-region.module.d.ts +1 -1
- package/dist/modules/region/aws-single-az-region/aws-single-az-region.module.js +1 -1
- package/dist/modules/region/aws-single-az-region/index.schema.d.ts +1 -1
- package/dist/modules/region/aws-single-az-region/index.schema.js +2 -2
- package/dist/modules/region/aws-single-az-region/index.schema.js.map +1 -1
- package/dist/modules/server/aws-server/aws-server.module.d.ts +5 -4
- package/dist/modules/server/aws-server/aws-server.module.js +25 -3
- package/dist/modules/server/aws-server/aws-server.module.js.map +1 -1
- package/dist/modules/server/aws-server/index.schema.d.ts +24 -4
- package/dist/modules/server/aws-server/index.schema.js +50 -4
- package/dist/modules/server/aws-server/index.schema.js.map +1 -1
- package/dist/modules/server/aws-server/models/server/aws-server.model.js +1 -1
- package/dist/modules/server/aws-server/models/server/aws-server.model.js.map +1 -1
- package/dist/modules/server/aws-server/models/server/index.d.ts +0 -1
- package/dist/modules/server/aws-server/models/server/index.js +0 -1
- package/dist/modules/server/aws-server/models/server/index.js.map +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/aws-server-dynamodb-access.overlay.js +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/aws-server-dynamodb-access.overlay.js.map +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/index.d.ts +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/index.js +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/index.js.map +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.overlay.d.ts +22 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.overlay.js +37 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.overlay.js.map +1 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.schema.d.ts +12 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.schema.js +32 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/aws-server-lambda-access.schema.js.map +1 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/index.d.ts +1 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/index.js +2 -0
- package/dist/modules/server/aws-server/overlays/aws-server-lambda-access/index.js.map +1 -0
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/aws-server-s3-access.overlay.js +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/aws-server-s3-access.overlay.js.map +1 -1
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/index.d.ts +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/index.js +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/index.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/aws-cloudfront-service.module.d.ts +13 -5
- package/dist/modules/service/aws-cloudfront-service/aws-cloudfront-service.module.js +56 -7
- package/dist/modules/service/aws-cloudfront-service/aws-cloudfront-service.module.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/index.schema.d.ts +30 -1
- package/dist/modules/service/aws-cloudfront-service/index.schema.js +51 -1
- package/dist/modules/service/aws-cloudfront-service/index.schema.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/models/service/actions/add-aws-cloudfront-service.model.action.js +36 -3
- package/dist/modules/service/aws-cloudfront-service/models/service/actions/add-aws-cloudfront-service.model.action.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-lambda-origin/actions/add-aws-cloudfront-lambda-origin.overlay.action.js +7 -5
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-lambda-origin/actions/add-aws-cloudfront-lambda-origin.overlay.action.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-s3-origin/actions/add-aws-cloudfront-s3-origin.overlay.action.js +9 -14
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-s3-origin/actions/add-aws-cloudfront-s3-origin.overlay.action.js.map +1 -1
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-s3-origin/aws-cloudfront-s3-origin.overlay.d.ts +1 -0
- package/dist/modules/service/aws-cloudfront-service/overlays/aws-cloudfront-s3-origin/aws-cloudfront-s3-origin.overlay.js.map +1 -1
- package/dist/modules/service/aws-dynamodb-global-service/aws-dynamodb-global-service.module.d.ts +1 -1
- package/dist/modules/service/aws-dynamodb-global-service/aws-dynamodb-global-service.module.js +1 -1
- package/dist/modules/service/aws-dynamodb-global-service/models/service/actions/add-aws-dynamodb-global-service.model.action.js +4 -1
- package/dist/modules/service/aws-dynamodb-global-service/models/service/actions/add-aws-dynamodb-global-service.model.action.js.map +1 -1
- package/dist/modules/service/aws-dynamodb-service/aws-dynamodb-service.module.d.ts +1 -1
- package/dist/modules/service/aws-dynamodb-service/aws-dynamodb-service.module.js +1 -1
- package/dist/modules/service/aws-dynamodb-service/index.schema.d.ts +11 -1
- package/dist/modules/service/aws-dynamodb-service/index.schema.js +25 -1
- package/dist/modules/service/aws-dynamodb-service/index.schema.js.map +1 -1
- package/dist/modules/service/aws-dynamodb-service/models/service/actions/add-aws-dynamodb-service.model.action.js +2 -1
- package/dist/modules/service/aws-dynamodb-service/models/service/actions/add-aws-dynamodb-service.model.action.js.map +1 -1
- package/dist/modules/service/aws-ecs-alb-service/aws-ecs-alb-service.module.d.ts +1 -1
- package/dist/modules/service/aws-ecs-alb-service/aws-ecs-alb-service.module.js +1 -1
- package/dist/modules/service/aws-s3-static-website-service/aws-s3-static-website-service.module.d.ts +1 -1
- package/dist/modules/service/aws-s3-static-website-service/aws-s3-static-website-service.module.js +1 -1
- package/dist/modules/service/aws-s3-static-website-service/index.schema.js +2 -2
- package/dist/modules/service/aws-s3-static-website-service/index.schema.js.map +1 -1
- package/dist/modules/service/aws-s3-storage-service/aws-s3-storage-service.module.d.ts +1 -1
- package/dist/modules/service/aws-s3-storage-service/aws-s3-storage-service.module.js +1 -1
- package/dist/modules/service/aws-s3-storage-service/index.schema.js +2 -2
- package/dist/modules/service/aws-s3-storage-service/index.schema.js.map +1 -1
- package/dist/modules/subnet/aws-serverless-subnet/aws-serverless-subnet.module.d.ts +1 -1
- package/dist/modules/subnet/aws-serverless-subnet/aws-serverless-subnet.module.js +1 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/aws-serverless-subnet.model.js +1 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/aws-serverless-subnet.model.js.map +1 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/index.d.ts +0 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/index.js +0 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/index.js.map +1 -1
- package/dist/modules/subnet/aws-simple-subnet/aws-simple-subnet.module.d.ts +1 -1
- package/dist/modules/subnet/aws-simple-subnet/aws-simple-subnet.module.js +1 -1
- package/dist/resources/cloudfront-distribution/cloudfront-behavior.schema.d.ts +8 -10
- package/dist/resources/cloudfront-distribution/cloudfront-behavior.schema.js +10 -11
- package/dist/resources/cloudfront-distribution/cloudfront-behavior.schema.js.map +1 -1
- package/dist/resources/cloudfront-distribution/cloudfront-distribution.resource.d.ts +19 -4
- package/dist/resources/cloudfront-distribution/cloudfront-distribution.resource.js +43 -25
- package/dist/resources/cloudfront-distribution/cloudfront-distribution.resource.js.map +1 -1
- package/dist/resources/cloudfront-distribution/cloudfront-policy.schema.d.ts +2 -2
- package/dist/resources/cloudfront-distribution/cloudfront-policy.schema.js +1 -1
- package/dist/resources/cloudfront-function/cloudfront-function.resource.d.ts +25 -0
- package/dist/resources/cloudfront-function/cloudfront-function.resource.js +73 -0
- package/dist/resources/cloudfront-function/cloudfront-function.resource.js.map +1 -0
- package/dist/resources/cloudfront-function/index.d.ts +1 -0
- package/dist/resources/cloudfront-function/index.js +2 -0
- package/dist/resources/cloudfront-function/index.js.map +1 -0
- package/dist/resources/cloudfront-function/index.schema.d.ts +38 -0
- package/dist/resources/cloudfront-function/index.schema.js +62 -0
- package/dist/resources/cloudfront-function/index.schema.js.map +1 -0
- package/dist/resources/cloudwatch-log-group/cloudwatch-log-group.resource.d.ts +25 -0
- package/dist/resources/cloudwatch-log-group/cloudwatch-log-group.resource.js +67 -0
- package/dist/resources/cloudwatch-log-group/cloudwatch-log-group.resource.js.map +1 -0
- package/dist/resources/cloudwatch-log-group/index.d.ts +1 -0
- package/dist/resources/cloudwatch-log-group/index.js +2 -0
- package/dist/resources/cloudwatch-log-group/index.js.map +1 -0
- package/dist/resources/cloudwatch-log-group/index.schema.d.ts +37 -0
- package/dist/resources/cloudwatch-log-group/index.schema.js +77 -0
- package/dist/resources/cloudwatch-log-group/index.schema.js.map +1 -0
- package/dist/resources/dynamodb/dynamodb.resource.js +12 -4
- package/dist/resources/dynamodb/dynamodb.resource.js.map +1 -1
- package/dist/resources/dynamodb/index.schema.d.ts +3 -1
- package/dist/resources/dynamodb/index.schema.js +8 -2
- package/dist/resources/dynamodb/index.schema.js.map +1 -1
- package/dist/resources/dynamodb-global/dynamodb-global.resource.js +2 -0
- package/dist/resources/dynamodb-global/dynamodb-global.resource.js.map +1 -1
- package/dist/resources/dynamodb-global/index.schema.d.ts +4 -0
- package/dist/resources/dynamodb-global/index.schema.js +10 -0
- package/dist/resources/dynamodb-global/index.schema.js.map +1 -1
- package/dist/resources/ecr/ecr-image.resource.js +20 -2
- package/dist/resources/ecr/ecr-image.resource.js.map +1 -1
- package/dist/resources/ecr/index.schema.d.ts +2 -0
- package/dist/resources/ecr/index.schema.js +1 -0
- package/dist/resources/ecr/index.schema.js.map +1 -1
- package/dist/resources/ecr-image-tag/actions/add-ecr-image-tag.resource.action.d.ts +7 -2
- package/dist/resources/ecr-image-tag/actions/add-ecr-image-tag.resource.action.js +35 -11
- package/dist/resources/ecr-image-tag/actions/add-ecr-image-tag.resource.action.js.map +1 -1
- package/dist/resources/ecr-image-tag/actions/delete-ecr-image-tag.resource.action.d.ts +2 -6
- package/dist/resources/ecr-image-tag/actions/delete-ecr-image-tag.resource.action.js +4 -28
- package/dist/resources/ecr-image-tag/actions/delete-ecr-image-tag.resource.action.js.map +1 -1
- package/dist/resources/ecr-image-tag/ecr-image-tag.resource.d.ts +8 -1
- package/dist/resources/ecr-image-tag/ecr-image-tag.resource.js +19 -0
- package/dist/resources/ecr-image-tag/ecr-image-tag.resource.js.map +1 -1
- package/dist/resources/ecs-service/ecs-service.resource.js +3 -1
- package/dist/resources/ecs-service/ecs-service.resource.js.map +1 -1
- package/dist/resources/ecs-service/index.schema.d.ts +2 -0
- package/dist/resources/ecs-service/index.schema.js +2 -0
- package/dist/resources/ecs-service/index.schema.js.map +1 -1
- package/dist/resources/ecs-task-definition/ecs-task-definition.resource.d.ts +3 -0
- package/dist/resources/ecs-task-definition/ecs-task-definition.resource.js +15 -0
- package/dist/resources/ecs-task-definition/ecs-task-definition.resource.js.map +1 -1
- package/dist/resources/ecs-task-definition/index.schema.d.ts +1 -0
- package/dist/resources/ecs-task-definition/index.schema.js +1 -0
- package/dist/resources/ecs-task-definition/index.schema.js.map +1 -1
- package/dist/resources/iam-role/iam-role.resource.d.ts +21 -0
- package/dist/resources/iam-role/iam-role.resource.js +100 -4
- package/dist/resources/iam-role/iam-role.resource.js.map +1 -1
- package/dist/resources/iam-role/index.schema.d.ts +42 -0
- package/dist/resources/iam-role/index.schema.js.map +1 -1
- package/dist/resources/iam-user/iam-user.resource.js +7 -1
- package/dist/resources/iam-user/iam-user.resource.js.map +1 -1
- package/dist/resources/lambda-function/index.schema.d.ts +6 -11
- package/dist/resources/lambda-function/index.schema.js +6 -14
- package/dist/resources/lambda-function/index.schema.js.map +1 -1
- package/dist/resources/lambda-function/lambda-function.resource.d.ts +11 -8
- package/dist/resources/lambda-function/lambda-function.resource.js +10 -44
- package/dist/resources/lambda-function/lambda-function.resource.js.map +1 -1
- package/dist/resources/lambda-function-cloudfront-permission/index.d.ts +1 -0
- package/dist/resources/lambda-function-cloudfront-permission/index.js +2 -0
- package/dist/resources/lambda-function-cloudfront-permission/index.js.map +1 -0
- package/dist/resources/lambda-function-cloudfront-permission/index.schema.d.ts +42 -0
- package/dist/resources/lambda-function-cloudfront-permission/index.schema.js +67 -0
- package/dist/resources/lambda-function-cloudfront-permission/index.schema.js.map +1 -0
- package/dist/resources/lambda-function-cloudfront-permission/lambda-function-cloudfront-permission.resource.d.ts +24 -0
- package/dist/resources/lambda-function-cloudfront-permission/lambda-function-cloudfront-permission.resource.js +67 -0
- package/dist/resources/lambda-function-cloudfront-permission/lambda-function-cloudfront-permission.resource.js.map +1 -0
- package/dist/resources/lambda-function-permission/index.d.ts +1 -0
- package/dist/resources/lambda-function-permission/index.js +2 -0
- package/dist/resources/lambda-function-permission/index.js.map +1 -0
- package/dist/resources/lambda-function-permission/index.schema.d.ts +40 -0
- package/dist/resources/lambda-function-permission/index.schema.js +60 -0
- package/dist/resources/lambda-function-permission/index.schema.js.map +1 -0
- package/dist/resources/lambda-function-permission/lambda-function-permission.resource.d.ts +24 -0
- package/dist/resources/lambda-function-permission/lambda-function-permission.resource.js +71 -0
- package/dist/resources/lambda-function-permission/lambda-function-permission.resource.js.map +1 -0
- package/dist/resources/security-group/security-group.resource.js +3 -0
- package/dist/resources/security-group/security-group.resource.js.map +1 -1
- package/dist/services/docker/docker.service.d.ts +28 -9
- package/dist/services/docker/docker.service.js +74 -16
- package/dist/services/docker/docker.service.js.map +1 -1
- package/package.json +7 -2
- package/dist/modules/account/aws-credentials-account/models/account/actions/add-aws-credentials-account.model.action.d.ts +0 -25
- package/dist/modules/account/aws-credentials-account/models/account/actions/add-aws-credentials-account.model.action.js +0 -51
- package/dist/modules/account/aws-credentials-account/models/account/actions/add-aws-credentials-account.model.action.js.map +0 -1
- package/dist/modules/account/aws-ini-account/models/account/actions/add-aws-ini-account.model.action.d.ts +0 -25
- package/dist/modules/account/aws-ini-account/models/account/actions/add-aws-ini-account.model.action.js +0 -51
- package/dist/modules/account/aws-ini-account/models/account/actions/add-aws-ini-account.model.action.js.map +0 -1
- package/dist/modules/account/aws-localstack-account/models/account/actions/add-aws-localstack-account.model.action.d.ts +0 -25
- package/dist/modules/account/aws-localstack-account/models/account/actions/add-aws-localstack-account.model.action.js +0 -51
- package/dist/modules/account/aws-localstack-account/models/account/actions/add-aws-localstack-account.model.action.js.map +0 -1
- package/dist/modules/account/aws-moto-account/models/account/actions/add-aws-moto-account.model.action.d.ts +0 -25
- package/dist/modules/account/aws-moto-account/models/account/actions/add-aws-moto-account.model.action.js +0 -51
- package/dist/modules/account/aws-moto-account/models/account/actions/add-aws-moto-account.model.action.js.map +0 -1
- package/dist/modules/app/simple-app/models/app/actions/add-simple-app.model.action.d.ts +0 -25
- package/dist/modules/app/simple-app/models/app/actions/add-simple-app.model.action.js +0 -50
- package/dist/modules/app/simple-app/models/app/actions/add-simple-app.model.action.js.map +0 -1
- package/dist/modules/app/simple-app/models/app/index.d.ts +0 -1
- package/dist/modules/app/simple-app/models/app/index.js +0 -2
- package/dist/modules/app/simple-app/models/app/index.js.map +0 -1
- package/dist/modules/deployment/aws-deployment/models/deployment/actions/add-aws-deployment.model.action.d.ts +0 -27
- package/dist/modules/deployment/aws-deployment/models/deployment/actions/add-aws-deployment.model.action.js +0 -53
- package/dist/modules/deployment/aws-deployment/models/deployment/actions/add-aws-deployment.model.action.js.map +0 -1
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/actions/add-aws-deployment-image.overlay.action.d.ts +0 -28
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/actions/add-aws-deployment-image.overlay.action.js +0 -53
- package/dist/modules/deployment/aws-deployment/overlays/aws-deployment-image/actions/add-aws-deployment-image.overlay.action.js.map +0 -1
- package/dist/modules/environment/aws-serverless-environment/models/environment/actions/add-aws-serverless-environment.model.action.d.ts +0 -28
- package/dist/modules/environment/aws-serverless-environment/models/environment/actions/add-aws-serverless-environment.model.action.js +0 -53
- package/dist/modules/environment/aws-serverless-environment/models/environment/actions/add-aws-serverless-environment.model.action.js.map +0 -1
- package/dist/modules/execution/aws-ecs-execution/models/execution/actions/add-aws-ecs-execution.model.action.d.ts +0 -25
- package/dist/modules/execution/aws-ecs-execution/models/execution/actions/add-aws-ecs-execution.model.action.js +0 -51
- package/dist/modules/execution/aws-ecs-execution/models/execution/actions/add-aws-ecs-execution.model.action.js.map +0 -1
- package/dist/modules/execution/aws-lambda-execution/models/execution/actions/add-aws-lambda-execution.model.action.d.ts +0 -25
- package/dist/modules/execution/aws-lambda-execution/models/execution/actions/add-aws-lambda-execution.model.action.js +0 -51
- package/dist/modules/execution/aws-lambda-execution/models/execution/actions/add-aws-lambda-execution.model.action.js.map +0 -1
- package/dist/modules/region/aws-serverless-region/models/region/actions/add-aws-serverless-region.model.action.d.ts +0 -28
- package/dist/modules/region/aws-serverless-region/models/region/actions/add-aws-serverless-region.model.action.js +0 -53
- package/dist/modules/region/aws-serverless-region/models/region/actions/add-aws-serverless-region.model.action.js.map +0 -1
- package/dist/modules/server/aws-server/models/server/actions/add-aws-server.model.action.d.ts +0 -27
- package/dist/modules/server/aws-server/models/server/actions/add-aws-server.model.action.js +0 -53
- package/dist/modules/server/aws-server/models/server/actions/add-aws-server.model.action.js.map +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/actions/add-aws-server-dynamodb-access.overlay.action.d.ts +0 -28
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/actions/add-aws-server-dynamodb-access.overlay.action.js +0 -53
- package/dist/modules/server/aws-server/overlays/aws-server-dynamodb-access/actions/add-aws-server-dynamodb-access.overlay.action.js.map +0 -1
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/actions/add-aws-server-s3-access.overlay.action.d.ts +0 -28
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/actions/add-aws-server-s3-access.overlay.action.js +0 -53
- package/dist/modules/server/aws-server/overlays/aws-server-s3-access/actions/add-aws-server-s3-access.overlay.action.js.map +0 -1
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/actions/add-aws-serverless-subnet.model.action.d.ts +0 -28
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/actions/add-aws-serverless-subnet.model.action.js +0 -53
- package/dist/modules/subnet/aws-serverless-subnet/models/subnet/actions/add-aws-serverless-subnet.model.action.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ATerraformResource, Diff, DiffAction, DiffUtility, Resource, } from '@quadnix/octo';
|
|
11
|
+
import { LambdaFunctionCloudFrontPermissionSchema } from './index.schema.js';
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
let LambdaFunctionCloudFrontPermission = class LambdaFunctionCloudFrontPermission extends ATerraformResource {
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
constructor(resourceId, properties, parents) {
|
|
20
|
+
super(resourceId, properties, parents);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
async diffProperties(previous) {
|
|
26
|
+
if (!DiffUtility.isObjectDeepEquals(previous.properties, this.properties)) {
|
|
27
|
+
return [
|
|
28
|
+
new Diff(this, DiffAction.REPLACE, 'resourceId', this.getContext(), 'lambda function cloudfront permission properties are identity; a change recreates it'),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
async toHCL(terraform) {
|
|
37
|
+
const [distributionParent, lambdaFunctionParent] = this.parents;
|
|
38
|
+
const permissionOctoResource = terraform.addOctoTerraformResource(this, {
|
|
39
|
+
provider: { accountId: this.properties.awsAccountId, regionId: this.properties.awsRegionId },
|
|
40
|
+
});
|
|
41
|
+
// A URL caller needs both actions; `invoked_via_function_url` is in hashicorp/aws >= 6.28.0.
|
|
42
|
+
permissionOctoResource.addTerraformResource('aws_lambda_permission', this.resourceId, {
|
|
43
|
+
action: 'lambda:InvokeFunctionUrl',
|
|
44
|
+
function_name: terraform.getRef(lambdaFunctionParent, 'FunctionName'),
|
|
45
|
+
function_url_auth_type: 'AWS_IAM',
|
|
46
|
+
principal: 'cloudfront.amazonaws.com',
|
|
47
|
+
source_arn: terraform.getRef(distributionParent, 'Arn'),
|
|
48
|
+
statement_id: `AllowFunctionUrlInvokeFrom-cloudfront-${this.properties.distributionName}`,
|
|
49
|
+
});
|
|
50
|
+
permissionOctoResource.addTerraformResource('aws_lambda_permission', `${this.resourceId}_invoke`, {
|
|
51
|
+
action: 'lambda:InvokeFunction',
|
|
52
|
+
function_name: terraform.getRef(lambdaFunctionParent, 'FunctionName'),
|
|
53
|
+
invoked_via_function_url: true,
|
|
54
|
+
principal: 'cloudfront.amazonaws.com',
|
|
55
|
+
source_arn: terraform.getRef(distributionParent, 'Arn'),
|
|
56
|
+
statement_id: `AllowInvokeViaFunctionUrlFrom-cloudfront-${this.properties.distributionName}`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
LambdaFunctionCloudFrontPermission = __decorate([
|
|
61
|
+
Resource('@octo', 'lambda-function-cloudfront-permission', LambdaFunctionCloudFrontPermissionSchema, {
|
|
62
|
+
uniqueProperties: [{ path: 'distributionName', within: ['awsAccountId', 'awsRegionId', 'functionName'] }],
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:paramtypes", [String, Object, Array])
|
|
65
|
+
], LambdaFunctionCloudFrontPermission);
|
|
66
|
+
export { LambdaFunctionCloudFrontPermission };
|
|
67
|
+
//# sourceMappingURL=lambda-function-cloudfront-permission.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-function-cloudfront-permission.resource.js","sourceRoot":"","sources":["../../../src/resources/lambda-function-cloudfront-permission/lambda-function-cloudfront-permission.resource.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,WAAW,EAEX,QAAQ,GAET,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,wCAAwC,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AASI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,kBAGvD;IAKC;;OAEG;IACH,YACE,UAAkB,EAClB,UAAkE,EAClE,OAAiG;QAEjG,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,cAAc,CAAC,QAA4C;QACxE,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1E,OAAO;gBACL,IAAI,IAAI,CACN,IAAI,EACJ,UAAU,CAAC,OAAO,EAClB,YAAY,EACZ,IAAI,CAAC,UAAU,EAAE,EACjB,sFAAsF,CACvF;aACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,KAAK,CAAC,SAA+B;QAClD,MAAM,CAAC,kBAAkB,EAAE,oBAA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AC,EAAE,CAAC;KAC1G,CACF;;GACY,kCAAkC,CAkE9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LambdaFunctionPermission } from './lambda-function-permission.resource.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/lambda-function-permission/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseResourceSchema } from '@quadnix/octo';
|
|
2
|
+
/**
|
|
3
|
+
* The `LambdaFunctionPermissionSchema` class is the schema for the `LambdaFunctionPermission`
|
|
4
|
+
* resource, which admits one IAM role to invoke one Lambda function through its URL. The function may
|
|
5
|
+
* be in another account, such as one an imported state holds; the permission is created there.
|
|
6
|
+
* Terraform provisions it as two
|
|
7
|
+
* [`aws_lambda_permission`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission)
|
|
8
|
+
* blocks.
|
|
9
|
+
*
|
|
10
|
+
* @group Resources/LambdaFunctionPermission
|
|
11
|
+
*
|
|
12
|
+
* @hideconstructor
|
|
13
|
+
*
|
|
14
|
+
* @overrideProperty parents - This resource has parents.
|
|
15
|
+
* ```mermaid
|
|
16
|
+
* graph TD;
|
|
17
|
+
* iam_role((IAM<br>Role)) --> lambda_function_permission((Lambda<br>Function<br>Permission))
|
|
18
|
+
* lambda_function((Lambda<br>Function)) --> lambda_function_permission
|
|
19
|
+
* ```
|
|
20
|
+
* @overrideProperty resourceId - The resource id is of format `lambda-function-permission-<execution-id>-<function-name>`
|
|
21
|
+
*/
|
|
22
|
+
export declare class LambdaFunctionPermissionSchema extends BaseResourceSchema {
|
|
23
|
+
/**
|
|
24
|
+
* Input properties.
|
|
25
|
+
* * `properties.awsAccountId` - The AWS account of the function.
|
|
26
|
+
* * `properties.awsRegionId` - The AWS region of the function.
|
|
27
|
+
* * `properties.functionName` - The name of the function.
|
|
28
|
+
* * `properties.roleName` - The name of the role admitted.
|
|
29
|
+
*/
|
|
30
|
+
properties: {
|
|
31
|
+
awsAccountId: string;
|
|
32
|
+
awsRegionId: string;
|
|
33
|
+
functionName: string;
|
|
34
|
+
roleName: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Saved response. A permission reports nothing.
|
|
38
|
+
*/
|
|
39
|
+
response: Record<never, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { BaseResourceSchema, Schema, Validate } from '@quadnix/octo';
|
|
11
|
+
/**
|
|
12
|
+
* The `LambdaFunctionPermissionSchema` class is the schema for the `LambdaFunctionPermission`
|
|
13
|
+
* resource, which admits one IAM role to invoke one Lambda function through its URL. The function may
|
|
14
|
+
* be in another account, such as one an imported state holds; the permission is created there.
|
|
15
|
+
* Terraform provisions it as two
|
|
16
|
+
* [`aws_lambda_permission`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission)
|
|
17
|
+
* blocks.
|
|
18
|
+
*
|
|
19
|
+
* @group Resources/LambdaFunctionPermission
|
|
20
|
+
*
|
|
21
|
+
* @hideconstructor
|
|
22
|
+
*
|
|
23
|
+
* @overrideProperty parents - This resource has parents.
|
|
24
|
+
* ```mermaid
|
|
25
|
+
* graph TD;
|
|
26
|
+
* iam_role((IAM<br>Role)) --> lambda_function_permission((Lambda<br>Function<br>Permission))
|
|
27
|
+
* lambda_function((Lambda<br>Function)) --> lambda_function_permission
|
|
28
|
+
* ```
|
|
29
|
+
* @overrideProperty resourceId - The resource id is of format `lambda-function-permission-<execution-id>-<function-name>`
|
|
30
|
+
*/
|
|
31
|
+
export class LambdaFunctionPermissionSchema extends BaseResourceSchema {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/**
|
|
35
|
+
* Input properties.
|
|
36
|
+
* * `properties.awsAccountId` - The AWS account of the function.
|
|
37
|
+
* * `properties.awsRegionId` - The AWS region of the function.
|
|
38
|
+
* * `properties.functionName` - The name of the function.
|
|
39
|
+
* * `properties.roleName` - The name of the role admitted.
|
|
40
|
+
*/
|
|
41
|
+
this.properties = Schema();
|
|
42
|
+
/**
|
|
43
|
+
* Saved response. A permission reports nothing.
|
|
44
|
+
*/
|
|
45
|
+
this.response = Schema({});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
__decorate([
|
|
49
|
+
Validate({
|
|
50
|
+
destruct: (value) => [
|
|
51
|
+
value.awsAccountId,
|
|
52
|
+
value.awsRegionId,
|
|
53
|
+
value.functionName,
|
|
54
|
+
value.roleName,
|
|
55
|
+
],
|
|
56
|
+
options: { minLength: 1 },
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], LambdaFunctionPermissionSchema.prototype, "properties", void 0);
|
|
60
|
+
//# sourceMappingURL=index.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.schema.js","sourceRoot":"","sources":["../../../src/resources/lambda-function-permission/index.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,8BAA+B,SAAQ,kBAAkB;IAAtE;;QACE;;;;;;WAMG;QAUM,eAAU,GAAG,MAAM,EAKxB,CAAC;QAEL;;WAEG;QACM,aAAQ,GAAG,MAAM,CAAuB,EAAE,CAAC,CAAC;IACvD,CAAC;CAAA;AAXU;IATR,QAAQ,CAAC;QACR,QAAQ,EAAE,CAAC,KAAmD,EAAY,EAAE,CAAC;YAC3E,KAAK,CAAC,YAAY;YAClB,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,YAAY;YAClB,KAAK,CAAC,QAAQ;SACf;QACD,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;KAC1B,CAAC;;kEAMG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ATerraformResource, Diff, type MatchingResource, type TerraformModuleScope } from '@quadnix/octo';
|
|
2
|
+
import type { IamRoleSchema } from '../iam-role/index.schema.js';
|
|
3
|
+
import type { LambdaFunctionSchema } from '../lambda-function/index.schema.js';
|
|
4
|
+
import { LambdaFunctionPermissionSchema } from './index.schema.js';
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class LambdaFunctionPermission extends ATerraformResource<LambdaFunctionPermissionSchema, LambdaFunctionPermission> {
|
|
9
|
+
parents: [MatchingResource<IamRoleSchema>, MatchingResource<LambdaFunctionSchema>];
|
|
10
|
+
properties: LambdaFunctionPermissionSchema['properties'];
|
|
11
|
+
response: LambdaFunctionPermissionSchema['response'];
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
constructor(resourceId: string, properties: LambdaFunctionPermissionSchema['properties'], parents: [MatchingResource<IamRoleSchema>, MatchingResource<LambdaFunctionSchema>]);
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
diffProperties(previous: LambdaFunctionPermission): Promise<Diff[]>;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
toHCL(terraform: TerraformModuleScope): Promise<void>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ATerraformResource, Diff, DiffAction, DiffUtility, Resource, } from '@quadnix/octo';
|
|
11
|
+
import { LambdaFunctionPermissionSchema } from './index.schema.js';
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
let LambdaFunctionPermission = class LambdaFunctionPermission extends ATerraformResource {
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
constructor(resourceId, properties, parents) {
|
|
20
|
+
super(resourceId, properties, parents);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
async diffProperties(previous) {
|
|
26
|
+
if (!DiffUtility.isObjectDeepEquals(previous.properties, this.properties)) {
|
|
27
|
+
return [
|
|
28
|
+
new Diff(this, DiffAction.REPLACE, 'resourceId', this.getContext(), 'lambda function permission properties are identity; a change recreates it'),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
async toHCL(terraform) {
|
|
37
|
+
const [iamRoleParent, lambdaFunctionParent] = this.parents;
|
|
38
|
+
const permissionOctoResource = terraform.addOctoTerraformResource(this, {
|
|
39
|
+
provider: { accountId: this.properties.awsAccountId, regionId: this.properties.awsRegionId },
|
|
40
|
+
});
|
|
41
|
+
// Lambda refuses a role as a principal until IAM has spread it, so a role created in the same
|
|
42
|
+
// apply is waited for first; each permission below depends on the wait.
|
|
43
|
+
permissionOctoResource.addTerraformResource('time_sleep', `${this.resourceId}_role_propagation`, {
|
|
44
|
+
create_duration: '10s',
|
|
45
|
+
triggers: terraform.mapAttr({ role_arn: terraform.getRef(iamRoleParent, 'Arn') }),
|
|
46
|
+
});
|
|
47
|
+
// A URL caller needs both actions; `invoked_via_function_url` is in hashicorp/aws >= 6.28.0.
|
|
48
|
+
permissionOctoResource.addTerraformResource('aws_lambda_permission', this.resourceId, {
|
|
49
|
+
action: 'lambda:InvokeFunctionUrl',
|
|
50
|
+
function_name: terraform.getRef(lambdaFunctionParent, 'FunctionName'),
|
|
51
|
+
function_url_auth_type: 'AWS_IAM',
|
|
52
|
+
principal: terraform.getRef(iamRoleParent, 'Arn'),
|
|
53
|
+
statement_id: `AllowFunctionUrlInvokeFrom-${this.properties.roleName}`,
|
|
54
|
+
});
|
|
55
|
+
permissionOctoResource.addTerraformResource('aws_lambda_permission', `${this.resourceId}_invoke`, {
|
|
56
|
+
action: 'lambda:InvokeFunction',
|
|
57
|
+
function_name: terraform.getRef(lambdaFunctionParent, 'FunctionName'),
|
|
58
|
+
invoked_via_function_url: true,
|
|
59
|
+
principal: terraform.getRef(iamRoleParent, 'Arn'),
|
|
60
|
+
statement_id: `AllowInvokeViaFunctionUrlFrom-${this.properties.roleName}`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
LambdaFunctionPermission = __decorate([
|
|
65
|
+
Resource('@octo', 'lambda-function-permission', LambdaFunctionPermissionSchema, {
|
|
66
|
+
uniqueProperties: [{ path: 'roleName', within: ['awsAccountId', 'awsRegionId', 'functionName'] }],
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:paramtypes", [String, Object, Array])
|
|
69
|
+
], LambdaFunctionPermission);
|
|
70
|
+
export { LambdaFunctionPermission };
|
|
71
|
+
//# sourceMappingURL=lambda-function-permission.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-function-permission.resource.js","sourceRoot":"","sources":["../../../src/resources/lambda-function-permission/lambda-function-permission.resource.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,WAAW,EAEX,QAAQ,GAET,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;GAEG;AAII,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,kBAG7C;IAKC;;OAEG;IACH,YACE,UAAkB,EAClB,UAAwD,EACxD,OAAkF;QAElF,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,cAAc,CAAC,QAAkC;QAC9D,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1E,OAAO;gBACL,IAAI,IAAI,CACN,IAAI,EACJ,UAAU,CAAC,OAAO,EAClB,YAAY,EACZ,IAAI,CAAC,UAAU,EAAE,EACjB,2EAA2E,CAC5E;aACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,KAAK,CAAC,SAA+B;QAClD,MAAM,CAAC,aAAa,EAAE,oBAAoB,CAAC,GAAG,IAA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CAAC;CACF,CAAA;AAvEY,wBAAwB;IAHpC,QAAQ,CAA2B,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE;QACzG,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,cAAc,CAAC,EAAE,CAAC;KAClG,CAAC;;GACW,wBAAwB,CAuEpC"}
|
|
@@ -48,7 +48,10 @@ let SecurityGroup = class SecurityGroup extends ATerraformResource {
|
|
|
48
48
|
const sgOctoResource = terraform.addOctoTerraformResource(this, {
|
|
49
49
|
provider: { accountId: this.properties.awsAccountId, regionId: this.properties.awsRegionId },
|
|
50
50
|
});
|
|
51
|
+
// A replaced group is deleted only once what it guards has moved to its successor, which AWS
|
|
52
|
+
// requires. AWS names each group, so the two never collide.
|
|
51
53
|
const sgTFResource = sgOctoResource.addTerraformResource('aws_security_group', this.resourceId, {
|
|
54
|
+
lifecycle: { create_before_destroy: true },
|
|
52
55
|
vpc_id: terraform.getRef(this.parents[0], 'VpcId'),
|
|
53
56
|
});
|
|
54
57
|
sgOctoResource.output({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-group.resource.js","sourceRoot":"","sources":["../../../src/resources/security-group/security-group.resource.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,WAAW,EAEX,QAAQ,GAET,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;GAKG;AACH,SAAS,YAAY,CAAC,IAAmD;IACvE,OAAO,IAAI,CAAC,UAAU,KAAK,IAAI;QAC7B,CAAC,CAAC,eAAe,IAAI,CAAC,SAAS,EAAE;QACjC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,CAA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AC,SAAS;gBACtB,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;gBAC5B,WAAW,EAAE,CAAC,CAAC,UAAU;gBACzB,iBAAiB,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC;aAC/D,CAAC;YACF,IAAI,CAAC,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;gBAC1B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;gBAC/B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;YAC7B,CAAC;YACD,cAAc,CAAC,oBAAoB,CAAC,oCAAoC,EAAE,GAAG,IAAI,CAAC,UAAU,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACpH,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,YAAY,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"security-group.resource.js","sourceRoot":"","sources":["../../../src/resources/security-group/security-group.resource.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,WAAW,EAEX,QAAQ,GAET,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;GAKG;AACH,SAAS,YAAY,CAAC,IAAmD;IACvE,OAAO,IAAI,CAAC,UAAU,KAAK,IAAI;QAC7B,CAAC,CAAC,eAAe,IAAI,CAAC,SAAS,EAAE;QACjC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;AAC7E,C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,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,GAA4B;gBACpC,SAAS,EAAE,CAAC,CAAC,SAAS;gBACtB,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;gBAC5B,WAAW,EAAE,CAAC,CAAC,UAAU;gBACzB,iBAAiB,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC;aAC/D,CAAC;YACF,IAAI,CAAC,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;gBAC1B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;gBAC/B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;YAC7B,CAAC;YACD,cAAc,CAAC,oBAAoB,CAAC,oCAAoC,EAAE,GAAG,IAAI,CAAC,UAAU,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACpH,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,YAAY,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;CACF,CAAA;AA/FY,aAAa;IADzB,QAAQ,CAAgB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;;GAC3D,aAAa,CA+FzB"}
|
|
@@ -6,6 +6,14 @@ type DockerLog = (line: string, metadata: {
|
|
|
6
6
|
command: string;
|
|
7
7
|
stream: 'stderr' | 'stdout';
|
|
8
8
|
}) => void;
|
|
9
|
+
/**
|
|
10
|
+
* What a docker command authenticates to its registry with.
|
|
11
|
+
*/
|
|
12
|
+
type RegistryCredentials = {
|
|
13
|
+
password: string;
|
|
14
|
+
registryUri: string;
|
|
15
|
+
username: string;
|
|
16
|
+
};
|
|
9
17
|
/**
|
|
10
18
|
* Runs the local docker CLI on behalf of a resource action.
|
|
11
19
|
*
|
|
@@ -13,6 +21,10 @@ type DockerLog = (line: string, metadata: {
|
|
|
13
21
|
* external resource and reaches docker through here. Every method shells out to the binary named by
|
|
14
22
|
* `dockerBinary`; nothing is talked to over the docker socket directly.
|
|
15
23
|
*
|
|
24
|
+
* No command logs in. Each one runs against a private copy of the user's docker config, which sends
|
|
25
|
+
* only the registry's host to a credential helper returning the caller's own token. Parallel
|
|
26
|
+
* commands to one registry so never write the user's credential store, nor read another's token.
|
|
27
|
+
*
|
|
16
28
|
* @internal
|
|
17
29
|
*/
|
|
18
30
|
export declare class DockerService {
|
|
@@ -36,23 +48,21 @@ export declare class DockerService {
|
|
|
36
48
|
* @param options What the build is given besides its context.
|
|
37
49
|
* @param options.buildArguments Values passed as `--build-arg`.
|
|
38
50
|
* @param options.buildSecrets Secret ids, each mapped to the environment variable docker reads it from.
|
|
51
|
+
* @param credentials The registry the image is tagged for, which a base image may also come from.
|
|
39
52
|
* @param log Receives each line docker prints.
|
|
40
53
|
*/
|
|
41
54
|
build(imageReference: string, platform: 'linux/amd64' | 'linux/arm64', dockerfilePath: string, contextDirectory: string, options: {
|
|
42
55
|
buildArguments: Record<string, string>;
|
|
43
56
|
buildSecrets: Record<string, string>;
|
|
44
|
-
}, log: DockerLog): Promise<void>;
|
|
57
|
+
}, credentials: RegistryCredentials, log: DockerLog): Promise<void>;
|
|
45
58
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* The password is written to the child's stdin rather than passed as an argument, so it never
|
|
49
|
-
* appears in the process list, in terraform's echo of the `local-exec` command, or in `log`.
|
|
59
|
+
* Pushes an already built image reference to its registry.
|
|
50
60
|
*/
|
|
51
|
-
|
|
61
|
+
push(imageReference: string, credentials: RegistryCredentials, log: DockerLog): Promise<void>;
|
|
52
62
|
/**
|
|
53
|
-
*
|
|
63
|
+
* Runs docker against a config directory holding `credentials`, removed once docker exits.
|
|
54
64
|
*/
|
|
55
|
-
|
|
65
|
+
private run;
|
|
56
66
|
/**
|
|
57
67
|
* Runs docker, handing each line it prints to `log` as it is printed, and keeping only the last
|
|
58
68
|
* {@link STDERR_TAIL_LENGTH} characters of its stderr.
|
|
@@ -60,7 +70,16 @@ export declare class DockerService {
|
|
|
60
70
|
* @throws If docker is not on the PATH, or exits non-zero. The error carries the end of docker's own
|
|
61
71
|
* stderr, which is the only thing that explains a failed build.
|
|
62
72
|
*/
|
|
63
|
-
private
|
|
73
|
+
private spawn;
|
|
74
|
+
/**
|
|
75
|
+
* Fills `configDirectory` as a docker config directory mirroring the user's, whose `credHelpers`
|
|
76
|
+
* send the registry's host to a helper returning `credentials`.
|
|
77
|
+
*
|
|
78
|
+
* The user's `config.json` is copied, so their credential store still serves every other registry,
|
|
79
|
+
* and every other entry of their docker directory - contexts, CLI plugins, buildx - is linked. The
|
|
80
|
+
* token is kept in a file only the user can read, never on a command line.
|
|
81
|
+
*/
|
|
82
|
+
private writeConfigDirectory;
|
|
64
83
|
}
|
|
65
84
|
/**
|
|
66
85
|
* @internal
|
|
@@ -5,12 +5,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
|
+
import { chmod, mkdir, mkdtemp, readFile, readdir, rm, symlink, writeFile } from 'node:fs/promises';
|
|
9
|
+
import { homedir, tmpdir } from 'node:os';
|
|
10
|
+
import { delimiter, join } from 'node:path';
|
|
8
11
|
import { Factory } from '@quadnix/octo';
|
|
9
12
|
/**
|
|
10
13
|
* How much of docker's stderr is kept for the error a failure throws. Every line it prints goes to
|
|
11
14
|
* the caller's log as it is printed.
|
|
12
15
|
*/
|
|
13
16
|
const STDERR_TAIL_LENGTH = 64 * 1024;
|
|
17
|
+
/**
|
|
18
|
+
* The credential helper docker asks for the registry's credentials, found on the PATH as
|
|
19
|
+
* `docker-credential-<name>`.
|
|
20
|
+
*/
|
|
21
|
+
const CREDENTIAL_HELPER_NAME = 'octo';
|
|
14
22
|
/**
|
|
15
23
|
* Runs the local docker CLI on behalf of a resource action.
|
|
16
24
|
*
|
|
@@ -18,6 +26,10 @@ const STDERR_TAIL_LENGTH = 64 * 1024;
|
|
|
18
26
|
* external resource and reaches docker through here. Every method shells out to the binary named by
|
|
19
27
|
* `dockerBinary`; nothing is talked to over the docker socket directly.
|
|
20
28
|
*
|
|
29
|
+
* No command logs in. Each one runs against a private copy of the user's docker config, which sends
|
|
30
|
+
* only the registry's host to a credential helper returning the caller's own token. Parallel
|
|
31
|
+
* commands to one registry so never write the user's credential store, nor read another's token.
|
|
32
|
+
*
|
|
21
33
|
* @internal
|
|
22
34
|
*/
|
|
23
35
|
export class DockerService {
|
|
@@ -42,10 +54,11 @@ export class DockerService {
|
|
|
42
54
|
* @param options What the build is given besides its context.
|
|
43
55
|
* @param options.buildArguments Values passed as `--build-arg`.
|
|
44
56
|
* @param options.buildSecrets Secret ids, each mapped to the environment variable docker reads it from.
|
|
57
|
+
* @param credentials The registry the image is tagged for, which a base image may also come from.
|
|
45
58
|
* @param log Receives each line docker prints.
|
|
46
59
|
*/
|
|
47
|
-
async build(imageReference, platform, dockerfilePath, contextDirectory, options, log) {
|
|
48
|
-
await this.run(log, [
|
|
60
|
+
async build(imageReference, platform, dockerfilePath, contextDirectory, options, credentials, log) {
|
|
61
|
+
await this.run(log, credentials, [
|
|
49
62
|
'build',
|
|
50
63
|
...Object.entries(options.buildArguments).flatMap(([name, value]) => ['--build-arg', `${name}=${value}`]),
|
|
51
64
|
...Object.entries(options.buildSecrets).flatMap(([id, variable]) => ['--secret', `id=${id},env=${variable}`]),
|
|
@@ -63,19 +76,27 @@ export class DockerService {
|
|
|
63
76
|
]);
|
|
64
77
|
}
|
|
65
78
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* The password is written to the child's stdin rather than passed as an argument, so it never
|
|
69
|
-
* appears in the process list, in terraform's echo of the `local-exec` command, or in `log`.
|
|
79
|
+
* Pushes an already built image reference to its registry.
|
|
70
80
|
*/
|
|
71
|
-
async
|
|
72
|
-
await this.run(log,
|
|
81
|
+
async push(imageReference, credentials, log) {
|
|
82
|
+
await this.run(log, credentials, ['push', imageReference]);
|
|
73
83
|
}
|
|
74
84
|
/**
|
|
75
|
-
*
|
|
85
|
+
* Runs docker against a config directory holding `credentials`, removed once docker exits.
|
|
76
86
|
*/
|
|
77
|
-
async
|
|
78
|
-
await
|
|
87
|
+
async run(log, credentials, args) {
|
|
88
|
+
const configDirectory = await mkdtemp(join(tmpdir(), 'octo-docker-config-'));
|
|
89
|
+
try {
|
|
90
|
+
await this.writeConfigDirectory(configDirectory, credentials);
|
|
91
|
+
await this.spawn(log, args, {
|
|
92
|
+
...process.env,
|
|
93
|
+
DOCKER_CONFIG: configDirectory,
|
|
94
|
+
PATH: [join(configDirectory, 'octo-bin'), process.env.PATH].filter(Boolean).join(delimiter),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
await rm(configDirectory, { force: true, recursive: true });
|
|
99
|
+
}
|
|
79
100
|
}
|
|
80
101
|
/**
|
|
81
102
|
* Runs docker, handing each line it prints to `log` as it is printed, and keeping only the last
|
|
@@ -84,9 +105,9 @@ export class DockerService {
|
|
|
84
105
|
* @throws If docker is not on the PATH, or exits non-zero. The error carries the end of docker's own
|
|
85
106
|
* stderr, which is the only thing that explains a failed build.
|
|
86
107
|
*/
|
|
87
|
-
|
|
108
|
+
spawn(log, args, environment) {
|
|
88
109
|
return new Promise((resolve, reject) => {
|
|
89
|
-
const child = spawn(this.dockerBinary, args, { stdio: ['pipe', 'pipe', 'pipe'] });
|
|
110
|
+
const child = spawn(this.dockerBinary, args, { env: environment, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
90
111
|
// Log each whole line, holding back the end of a chunk until the line it starts is whole.
|
|
91
112
|
const partialLines = { stderr: '', stdout: '' };
|
|
92
113
|
let stderrTail = '';
|
|
@@ -120,12 +141,49 @@ export class DockerService {
|
|
|
120
141
|
reject(new Error(`"${this.dockerBinary} ${args[0]}" exited with ${exitCode}!\n${stderrTail}`));
|
|
121
142
|
}
|
|
122
143
|
});
|
|
123
|
-
if (stdin !== undefined) {
|
|
124
|
-
child.stdin.write(stdin);
|
|
125
|
-
}
|
|
126
144
|
child.stdin.end();
|
|
127
145
|
});
|
|
128
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Fills `configDirectory` as a docker config directory mirroring the user's, whose `credHelpers`
|
|
149
|
+
* send the registry's host to a helper returning `credentials`.
|
|
150
|
+
*
|
|
151
|
+
* The user's `config.json` is copied, so their credential store still serves every other registry,
|
|
152
|
+
* and every other entry of their docker directory - contexts, CLI plugins, buildx - is linked. The
|
|
153
|
+
* token is kept in a file only the user can read, never on a command line.
|
|
154
|
+
*/
|
|
155
|
+
async writeConfigDirectory(configDirectory, credentials) {
|
|
156
|
+
const userDirectory = process.env.DOCKER_CONFIG || join(homedir(), '.docker');
|
|
157
|
+
// Copy the user's config, sending the registry's host to the helper.
|
|
158
|
+
const config = await readFile(join(userDirectory, 'config.json'), 'utf8').then((content) => JSON.parse(content), (error) => {
|
|
159
|
+
if (error.code === 'ENOENT') {
|
|
160
|
+
return {};
|
|
161
|
+
}
|
|
162
|
+
throw error;
|
|
163
|
+
});
|
|
164
|
+
config.credHelpers = { ...config.credHelpers, [new URL(credentials.registryUri).host]: CREDENTIAL_HELPER_NAME };
|
|
165
|
+
await writeFile(join(configDirectory, 'config.json'), JSON.stringify(config));
|
|
166
|
+
// Link everything else of the user's docker directory.
|
|
167
|
+
const entries = await readdir(userDirectory).catch((error) => {
|
|
168
|
+
if (error.code === 'ENOENT') {
|
|
169
|
+
return [];
|
|
170
|
+
}
|
|
171
|
+
throw error;
|
|
172
|
+
});
|
|
173
|
+
for (const entry of entries.filter((name) => name !== 'config.json')) {
|
|
174
|
+
await symlink(join(userDirectory, entry), join(configDirectory, entry));
|
|
175
|
+
}
|
|
176
|
+
// Write the credentials, and the helper that reads them back to docker.
|
|
177
|
+
await writeFile(join(configDirectory, 'octo-credentials.json'), JSON.stringify({
|
|
178
|
+
Secret: credentials.password,
|
|
179
|
+
ServerURL: credentials.registryUri,
|
|
180
|
+
Username: credentials.username,
|
|
181
|
+
}), { mode: 0o600 });
|
|
182
|
+
const helperPath = join(configDirectory, 'octo-bin', `docker-credential-${CREDENTIAL_HELPER_NAME}`);
|
|
183
|
+
await mkdir(join(configDirectory, 'octo-bin'));
|
|
184
|
+
await writeFile(helperPath, '#!/bin/sh\ncat > /dev/null\nif [ "$1" = get ]; then cat "$(dirname "$0")/../octo-credentials.json"; fi\n');
|
|
185
|
+
await chmod(helperPath, 0o700);
|
|
186
|
+
}
|
|
129
187
|
}
|
|
130
188
|
/**
|
|
131
189
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.service.js","sourceRoot":"","sources":["../../../src/services/docker/docker.service.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"docker.service.js","sourceRoot":"","sources":["../../../src/services/docker/docker.service.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,EAA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AI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF,CAAA;AAZY,oBAAoB;IADhC,OAAO,CAAgB,aAAa,CAAC;GACzB,oBAAoB,CAYhC"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"@aws-sdk/client-cloudfront": "~3.743.0",
|
|
7
7
|
"@aws-sdk/client-ecr": "~3.743.0",
|
|
8
8
|
"@aws-sdk/credential-provider-ini": "~3.743.0",
|
|
9
|
-
"@
|
|
9
|
+
"@aws-sdk/token-providers": "~3.743.0",
|
|
10
|
+
"@quadnix/octo": "~0.2.2",
|
|
10
11
|
"@smithy/types": "~4.1.0",
|
|
11
12
|
"fast-cidr-tools": "~0.3.2",
|
|
12
13
|
"mime": "~4.0.6"
|
|
@@ -98,7 +99,9 @@
|
|
|
98
99
|
"./resources/alb-target-group/schema": "./dist/resources/alb-target-group/index.schema.js",
|
|
99
100
|
"./resources/alb/schema": "./dist/resources/alb/index.schema.js",
|
|
100
101
|
"./resources/cloudfront-distribution/schema": "./dist/resources/cloudfront-distribution/index.schema.js",
|
|
102
|
+
"./resources/cloudfront-function/schema": "./dist/resources/cloudfront-function/index.schema.js",
|
|
101
103
|
"./resources/cloudfront-invalidation/schema": "./dist/resources/cloudfront-invalidation/index.schema.js",
|
|
104
|
+
"./resources/cloudwatch-log-group/schema": "./dist/resources/cloudwatch-log-group/index.schema.js",
|
|
102
105
|
"./resources/dynamodb-global/schema": "./dist/resources/dynamodb-global/index.schema.js",
|
|
103
106
|
"./resources/dynamodb/schema": "./dist/resources/dynamodb/index.schema.js",
|
|
104
107
|
"./resources/ecr-image-tag/schema": "./dist/resources/ecr-image-tag/index.schema.js",
|
|
@@ -111,6 +114,8 @@
|
|
|
111
114
|
"./resources/iam-role/schema": "./dist/resources/iam-role/index.schema.js",
|
|
112
115
|
"./resources/iam-user/schema": "./dist/resources/iam-user/index.schema.js",
|
|
113
116
|
"./resources/internet-gateway/schema": "./dist/resources/internet-gateway/index.schema.js",
|
|
117
|
+
"./resources/lambda-function-cloudfront-permission/schema": "./dist/resources/lambda-function-cloudfront-permission/index.schema.js",
|
|
118
|
+
"./resources/lambda-function-permission/schema": "./dist/resources/lambda-function-permission/index.schema.js",
|
|
114
119
|
"./resources/lambda-function/schema": "./dist/resources/lambda-function/index.schema.js",
|
|
115
120
|
"./resources/nat-gateway/schema": "./dist/resources/nat-gateway/index.schema.js",
|
|
116
121
|
"./resources/network-acl/schema": "./dist/resources/network-acl/index.schema.js",
|
|
@@ -177,7 +182,7 @@
|
|
|
177
182
|
},
|
|
178
183
|
"type": "module",
|
|
179
184
|
"types": "./dist/index.d.ts",
|
|
180
|
-
"version": "0.2.
|
|
185
|
+
"version": "0.2.3",
|
|
181
186
|
"scripts": {
|
|
182
187
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
183
188
|
"check:circular-dependency": "dpdm --no-tree --exit-code circular:1 --no-warning ./dist/**/*.js",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type ActionOutputs, type Diff, type EnhancedModuleSchema, type IModelAction } from '@quadnix/octo';
|
|
2
|
-
import type { AwsCredentialsAccountModule } from '../../../aws-credentials-account.module.js';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare class AddAwsCredentialsAccountModelAction implements IModelAction<AwsCredentialsAccountModule> {
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
filter(diff: Diff): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
handle(_diff: Diff, _actionInputs: EnhancedModuleSchema<AwsCredentialsAccountModule>, actionOutputs: ActionOutputs): Promise<ActionOutputs>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export declare class AddAwsCredentialsAccountModelActionFactory {
|
|
20
|
-
private static instance;
|
|
21
|
-
/**
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
static create(): Promise<AddAwsCredentialsAccountModelAction>;
|
|
25
|
-
}
|