terradart_aws
Curated factory wrappers for AWS resources (the hashicorp/aws Terraform provider) for Dart-first Terraform stacks.
The catalog is the full hashicorp/aws provider at its exact pin: every resource and data source. Start from a Dart backend on AWS Lambda: an execution role, a managed-policy attachment, the function, a function URL, and a log group, plus the aws_iam_policy_document and aws_caller_identity data sources.
Security & Credentials
Credentials never appear in synth output by design. The AWS provider schema does not mark its credential arguments sensitive, so AwsProvider leaves them out by name: there is no access_key, secret_key, token, or assume_role_with_web_identity parameter. Authenticate at apply time through the AWS SDK credential chain: AWS_PROFILE with your shared config, AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN, or an instance or task role. assumeRole, defaultTags, ignoreTags and endpoints are typed settings on AwsProvider.
Installation
dependencies:
terradart_core: ^0.36.0
terradart_aws: ^0.36.0
Usage example
import 'package:terradart_aws/data.dart';
import 'package:terradart_aws/iam.dart';
import 'package:terradart_aws/lambda.dart';
import 'package:terradart_aws/provider.dart';
final class HelloStack extends Stack {
HelloStack()
: super(providers: [
const AwsProvider(
region: 'us-east-1',
defaultTags: {'app': 'hello-dart'},
),
]) {
final trust = DataAwsIamPolicyDocument(
'lambda_trust',
statement: [
DataIamPolicyDocumentStatement(
actions: .literal(['sts:AssumeRole']),
principals: [
.new(
type: .literal('Service'),
identifiers: .literal(['lambda.amazonaws.com']),
),
],
),
],
);
add(trust);
final role = AwsIamRole(
'hello',
assumeRolePolicy: trust.json,
);
add(role);
add(AwsLambdaFunction(
'hello',
functionName: .literal('hello-dart'),
role: role.ref,
runtime: .providedAl2023,
handler: .literal('bootstrap'),
code: .filename(.literal('build/bootstrap.zip')),
));
}
}
dart pub get
dart pub global activate terradart_cli
AWS_PROFILE=... terradart apply
Curated surface
Every resource and data source of the pinned provider, across per-service barrels (ec2, iam, lambda, s3, rds, …) plus data. The provider is pinned exactly (kAwsProviderVersionConstraint, the release the wrappers were generated from). Start with examples/aws_lambda_quickstart, which builds the bootstrap zip from a Dart handler. examples/aws_serverless_api_quickstart is the full stack: that handler behind an API Gateway HTTP API and a DynamoDB table, with a least-privilege role and the API URL and table name read back through the generated outputs reader. examples/aws_static_site_quickstart hosts a Flutter Web build on S3 + CloudFront with a custom domain, and examples/aws_ecs_express_quickstart runs a Dart server on ECS Express Mode; both need real AWS setup to apply (their READMEs' "Before you apply"). The rest of the catalog is exercised by examples/aws_leftover_quickstart (synth only; CI validates it against the provider).
The six most deeply nested resources (AwsWafv2WebAcl, AwsWafv2WebAclRule, AwsWafv2RuleGroup, AwsQuicksightAnalysis, AwsQuicksightDashboard, AwsQuicksightTemplate) take typed nested helpers, but a block shape that repeats inside one resource gets one helper, named after its shallowest occurrence. The challengeConfig of an AwsWafv2WebAclRule therefore takes Wafv2WebAclRuleCaptchaConfig, and an asnMatchStatement nested inside andStatement levels takes the same Wafv2WebAclRuleAsnMatchStatement as a top-level one. The inline rule blocks on AwsWafv2WebAcl stay a TfArg<Map<String, dynamic>> map; manage rules through AwsWafv2WebAclRule for the typed form.
Generated by the maintainer pipeline (terradart-codegen wrap against the pin fixture); do not hand-edit files under lib/src/.
Libraries
- accessanalyzer
- AWS IAM Access Analyzer.
- account
- AWS Account Management (contacts and opt-in Regions).
- accountaccess
accountaccessapplications and entitlements.- acm
- AWS Certificate Manager (ACM).
- acmpca
- AWS Private Certificate Authority.
- agentregistry
agentregistryregistries.- amplify
- AWS Amplify.
- api_gateway
- AWS API Gateway (REST APIs).
- apigatewayv2
- AWS API Gateway V2 (HTTP and WebSocket APIs).
- appautoscaling
- AWS Application Auto Scaling.
- appconfig
- AWS AppConfig.
- appfabric
- AWS AppFabric.
- appflow
- AWS AppFlow.
- appintegrations
- AWS AppIntegrations.
- applicationinsights
- AWS CloudWatch Application Insights.
- appmesh
- AWS App Mesh.
- apprunner
- AWS App Runner.
- appstream
- AWS AppStream 2.0.
- appsync
- AWS AppSync.
- arcregionswitch
- AWS ARC Region switch plans.
- arczonalshift
- AWS ARC zonal shift.
- athena
- AWS Athena.
- auditmanager
- AWS Audit Manager.
- autoscaling
- AWS EC2 Auto Scaling and launch configurations.
- autoscalingplans
- AWS Auto Scaling plans.
- backup
- AWS Backup.
- batch
- AWS Batch.
- bcmdataexports
- AWS Billing and Cost Management Data Exports.
- bedrock
- AWS Bedrock.
- bedrockagent
- AWS Bedrock Agents and knowledge bases.
- bedrockagentcore
- AWS Bedrock AgentCore.
- billing
- AWS Billing views.
- budgets
- AWS Budgets.
- catalog
- Static catalog of all curated terradart_aws factories.
- ce
- AWS Cost Explorer (anomaly detection and cost categories).
- chatbot
- AWS Chatbot.
- chime
- AWS Chime.
- chimesdkmediapipelines
- AWS Chime SDK media pipelines.
- chimesdkvoice
- AWS Chime SDK Voice.
- cleanrooms
- AWS Clean Rooms.
- cloud9
- AWS Cloud9.
- cloudcontrolapi
- AWS Cloud Control API.
- cloudformation
- AWS CloudFormation.
- cloudfront
- AWS CloudFront.
- cloudfrontkeyvaluestore
- AWS CloudFront KeyValueStore.
- cloudhsm
- AWS CloudHSM.
- cloudsearch
- AWS CloudSearch.
- cloudtrail
- AWS CloudTrail.
- cloudwatch
- AWS CloudWatch (alarms, dashboards, logs, and events).
- cloudwatchomni
cloudwatchomnifactories, added by the weekly schema bump.- codeartifact
- AWS CodeArtifact.
- codebuild
- AWS CodeBuild.
- codecatalyst
- AWS CodeCatalyst.
- codecommit
- AWS CodeCommit.
- codeconnections
- AWS CodeConnections.
- codedeploy
- AWS CodeDeploy.
- codeguruprofiler
- AWS CodeGuru Profiler.
- codegurureviewer
- AWS CodeGuru Reviewer.
- codepipeline
- AWS CodePipeline.
- codestarconnections
- AWS CodeStar Connections.
- codestarnotifications
- AWS CodeStar Notifications.
- cognito
- AWS Cognito.
- comprehend
- AWS Comprehend.
- computeoptimizer
- AWS Compute Optimizer.
- config
- AWS Config.
- connect
- AWS Connect.
- controltower
- AWS Control Tower.
- costoptimizationhub
- AWS Cost Optimization Hub.
- cur
- AWS Cost and Usage Reports.
- customerprofiles
- AWS Customer Profiles.
- data
- AWS data sources (read-only lookups).
- dataexchange
- AWS Data Exchange.
- datapipeline
- AWS Data Pipeline.
- datasync
- AWS DataSync.
- datazone
- AWS DataZone.
- dax
- AWS DynamoDB Accelerator (DAX).
- db
- AWS RDS DB instances, snapshots, and option and parameter groups.
- detective
- AWS Detective.
- devicefarm
- AWS Device Farm.
- devopsagent
devopsagentfactories, added by the weekly schema bump.- devopsguru
- AWS DevOps Guru.
- directory_service
- AWS Directory Service.
- directoryservicedata
directoryservicedatafactories, added by the weekly schema bump.- dlm
- AWS Data Lifecycle Manager.
- dms
- AWS Database Migration Service.
- docdb
- AWS DocumentDB.
- docdbelastic
- AWS DocumentDB elastic clusters.
- drs
- AWS Elastic Disaster Recovery.
- dsql
- AWS Aurora DSQL.
- dx
- AWS Direct Connect.
- dynamodb
- AWS DynamoDB.
- ec2
- AWS EC2 and VPC (instances, networking, EBS, and transit gateways).
- ecr
- AWS Elastic Container Registry (ECR).
- ecrpublic
- AWS ECR Public.
- ecs
- AWS Elastic Container Service (ECS).
- efs
- AWS Elastic File System (EFS).
- eks
- AWS Elastic Kubernetes Service (EKS).
- elastic_beanstalk
- AWS Elastic Beanstalk.
- elasticache
- AWS ElastiCache.
- elasticsearch
- AWS Elasticsearch Service (legacy).
- elastictranscoder
- AWS Elastic Transcoder.
- elb
- AWS Elastic Load Balancing (ALB, NLB, and Classic).
- emr
- AWS EMR.
- emrcontainers
- AWS EMR on EKS.
- emrserverless
- AWS EMR Serverless.
- evidently
- AWS CloudWatch Evidently.
- finspace
- AWS FinSpace.
- fis
- AWS Fault Injection Service.
- fms
- AWS Firewall Manager.
- fsx
- AWS FSx.
- gamelift
- AWS GameLift.
- glacier
- AWS S3 Glacier vaults.
- globalaccelerator
- AWS Global Accelerator.
- glue
- AWS Glue.
- grafana
- AWS Managed Grafana.
- guardduty
- AWS GuardDuty.
- iam
- AWS IAM.
- identitystore
- AWS IAM Identity Center identity store.
- imagebuilder
- AWS EC2 Image Builder.
- inspector
- AWS Inspector Classic.
- inspector2
- AWS Inspector.
- internetmonitor
- AWS CloudWatch Internet Monitor.
- invoicing
- AWS Invoicing invoice units.
- iot
- AWS IoT Core.
- ivs
- AWS Interactive Video Service (IVS).
- ivschat
- AWS IVS Chat.
- kendra
- AWS Kendra.
- keyspaces
- AWS Keyspaces (for Apache Cassandra).
- kinesis
- AWS Kinesis (Data Streams, Firehose, and Video Streams).
- kinesisanalyticsv2
- AWS Managed Service for Apache Flink.
- kms
- AWS Key Management Service (KMS).
- lakeformation
- AWS Lake Formation.
- lambda
- AWS Lambda.
- lambdacore
lambdacorenetwork connectors.- lambdamicrovms
lambdamicrovmsimages and microVMs.- lex
- AWS Lex (V1).
- lexv2models
- AWS Lex V2.
- licensemanager
- AWS License Manager.
- lightsail
- AWS Lightsail.
- location
- AWS Location Service.
- m2
- AWS Mainframe Modernization.
- macie2
- AWS Macie.
- mailmanager
- AWS SES Mail Manager.
- media
- AWS Elemental MediaConvert, MediaPackage, and MediaStore.
- medialive
- AWS Elemental MediaLive.
- memorydb
- AWS MemoryDB.
- mq
- AWS MQ.
- msk
- AWS Managed Streaming for Apache Kafka (MSK).
- mskconnect
- AWS MSK Connect.
- mwaa
- AWS Managed Workflows for Apache Airflow.
- neptune
- AWS Neptune.
- neptunegraph
- AWS Neptune Analytics.
- networkfirewall
- AWS Network Firewall.
- networkflowmonitor
- AWS CloudWatch Network Flow Monitor.
- networkmanager
- AWS Network Manager (Cloud WAN).
- networkmonitor
- AWS CloudWatch Network Monitor.
- notifications
- AWS User Notifications.
- notificationscontacts
- AWS User Notifications contacts.
- oam
- AWS CloudWatch Observability Access Manager.
- observabilityadmin
- AWS CloudWatch Observability Admin.
- odb
- AWS Oracle Database@AWS.
- opensearch
- AWS OpenSearch Service.
- opensearchserverless
- AWS OpenSearch Serverless.
- organizations
- AWS Organizations.
- osis
- AWS OpenSearch Ingestion.
- outposts
- AWS Outposts.
- paymentcryptography
- AWS Payment Cryptography.
- pinpoint
- AWS Pinpoint.
- pinpointsmsvoicev2
- AWS End User Messaging SMS.
- pipes
- AWS EventBridge Pipes.
- pricingplanmanager
pricingplanmanagerfactories, added by the weekly schema bump.- prometheus
- AWS Managed Service for Prometheus.
- provider
- Provider block factory and version constants for
hashicorp/aws. - qbusiness
- AWS Q Business.
- qldb
- AWS QLDB.
- quicksight
- AWS QuickSight.
- ram
- AWS Resource Access Manager (RAM).
- rbin
- AWS Recycle Bin.
- rds
- AWS RDS clusters, proxies, and Aurora.
- redshift
- AWS Redshift.
- redshiftdata
- AWS Redshift Data API.
- redshiftserverless
- AWS Redshift Serverless.
- rekognition
- AWS Rekognition.
- resiliencehub
- AWS Resilience Hub.
- resiliencehubv2
- AWS Resilience Hub (
resiliencehubv2systems and policies). - resourceexplorer2
- AWS Resource Explorer.
- resourcegroups
- AWS Resource Groups.
- rolesanywhere
- AWS IAM Roles Anywhere.
- route53
- AWS Route 53.
- route53domains
- AWS Route 53 Domains.
- route53profiles
- AWS Route 53 Profiles.
- route53recoverycontrolconfig
- AWS Route 53 ARC recovery control.
- route53recoveryreadiness
- AWS Route 53 ARC readiness.
- rum
- AWS CloudWatch RUM.
- s3
- AWS S3.
- s3control
- AWS S3 Control (account-level S3).
- s3files
s3filesfile systems, access points, and mount targets.- s3outposts
- AWS S3 on Outposts.
- s3tables
- AWS S3 Tables.
- s3vectors
- AWS S3 Vectors.
- sagemaker
- AWS SageMaker.
- savingsplans
- AWS Savings Plans.
- scheduler
- AWS EventBridge Scheduler.
- schemas
- AWS EventBridge Schemas.
- secretsmanager
- AWS Secrets Manager.
- securityhub
- AWS Security Hub.
- securitylake
- AWS Security Lake.
- serverlessapplicationrepository
- AWS Serverless Application Repository.
- service_discovery
- AWS Cloud Map (service discovery).
- servicecatalog
- AWS Service Catalog.
- servicecatalogappregistry
- AWS Service Catalog AppRegistry.
- servicequotas
- AWS Service Quotas.
- ses
- AWS SES (V1).
- sesv2
- AWS SES.
- sfn
- AWS Step Functions.
- shield
- AWS Shield.
- signer
- AWS Signer.
- sns
- AWS SNS.
- sqs
- AWS SQS.
- ssm
- AWS Systems Manager.
- ssmcontacts
- AWS Systems Manager Incident Manager contacts.
- ssmincidents
- AWS Systems Manager Incident Manager.
- ssmquicksetup
- AWS Systems Manager Quick Setup.
- ssoadmin
- AWS IAM Identity Center administration.
- storagegateway
- AWS Storage Gateway.
- swf
- AWS Simple Workflow Service.
- synthetics
- AWS CloudWatch Synthetics.
- terradart_aws
- Curated AWS surface for TerraDart (
hashicorp/awsTerraform provider, pinned exactly atkAwsProviderVersionConstraint). - timestreaminfluxdb
- AWS Timestream for InfluxDB.
- timestreamquery
- AWS Timestream scheduled queries.
- timestreamwrite
- AWS Timestream for LiveAnalytics.
- transcribe
- AWS Transcribe.
- transfer
- AWS Transfer Family.
- uxc
uxcaccount customizations.- verifiedaccess
- AWS Verified Access.
- verifiedpermissions
- AWS Verified Permissions.
- vpclattice
- AWS VPC Lattice.
- waf
- AWS WAF Classic.
- wafregional
- AWS WAF Classic Regional.
- wafv2
- AWS WAF.
- workmail
- AWS WorkMail.
- workspaces
- AWS WorkSpaces.
- workspacesweb
- AWS WorkSpaces Secure Browser.
- xray
- AWS X-Ray.