Terraform, CloudFormation, CDK and Pulumi
PosturaNet fixes your own source: the Terraform, the template, or the CDK or Pulumi program code. It finds which one you use; set it only when a repo holds more than one.
Terraform
PosturaNet maps the finding's resource to its address through state, then validates the fix with terraform plan -lock=false, read-only.
# .posturanet.yml version: 1 iac: terraform terraform: root: infra/ backend: s3 # or local, with state_path
CloudFormation and SAM
Templates in YAML or JSON, including SAM. PosturaNet maps the resource through the stack's logical ids. Offline, pass an aws cloudformation describe-stack-resources export. Parameters and intrinsic functions it can't resolve to a line stop with UNKNOWN.
iac: cloudformation
cloudformation:
stack_resources: stack-resources.json # optional, for offline runs
templates: # only when a logical id is in more than one template
web-prod: templates/web.yamlOptional: a change-set preview, which needs a separate role and is off by default. PosturaNet creates the change set, reads it and deletes it. It can't execute one: the client has no such call, and the role's policy denies it. Print that role's policy with posturanet init --changeset-preview.
AWS CDK
The fix is a change to your CDK program (TypeScript, Python, Go, C# or Java), found from the aws:cdk:path metadata. Validation runs cdk synth --no-lookups with no AWS credentials, then the CloudFormation checks.
iac: cdk cdk: app: infra/ # the folder with cdk.json; found when unset assembly: cdk.out # optional: an assembly your CI already synthesized
Pulumi
TypeScript, Python, Go, C#, Java and YAML programs on the AWS Classic provider. PosturaNet maps resources through a pulumi stack export and never runs the Pulumi CLI, because pulumi preview needs write-capable credentials. The PR says the preview was not run. Values computed at runtime stop with UNKNOWN.
iac: pulumi pulumi: program: infra/ # the folder with Pulumi.yaml stack_export: stack.json # required; it can hold secrets, keep it out of git