Skip to content

feat(identity-access-control): add module to configure the AWS IAM provider#387

Merged
davidf-null merged 1 commit into
mainfrom
feat/provider-assume-role
Jun 10, 2026
Merged

feat(identity-access-control): add module to configure the AWS IAM provider#387
davidf-null merged 1 commit into
mainfrom
feat/provider-assume-role

Conversation

@davidf-null

@davidf-null davidf-null commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a new cloud-agnostic module nullplatform/identity-access-control that configures an identity & access control provider in nullplatform through a nullplatform_provider_config resource.

The provider type and attributes are exposed as variables so new clouds can be onboarded without changing the module. type defaults to the AWS IAM provider (aws-iam-configuration), confirmed live via the nullplatform API (there is no provider literally named identity-access-control).

For AWS, this is the platform-side counterpart to infrastructure/aws/iam/agent, which grants the agent sts:AssumeRole over the published role ARNs.

Inputs

Name Type Default Required
nrn string yes
attributes any yes
type string "aws-iam-configuration" no
dimensions map(string) {} no

attributes is JSON-encoded as-is to match the selected provider specification's schema. For aws-iam-configuration:

attributes = {
  iam_role_arns = {
    arns = [
      { selector = "billing", arn = "arn:aws:iam::123456789012:role/billing-reader" }
    ]
  }
}

Onboarding a new cloud is just a different type + attributes:

type       = "azure-iam-configuration"
attributes = { /* azure-iam-configuration schema */ }

Design notes

  • Cloud-agnostic by design: no cloud-specific attribute validation in the module; the caller owns attribute shape. Trade-off: drops the AWS-only ARN validation in exchange for zero module changes per new cloud.
  • No ignore_changes on attributes (unlike metrics/code_repository, which suppress drift for externally-rotated secrets): this config is declarative identity/access data, so Terraform stays the source of truth.
  • Follows existing nullplatform/* provider-config conventions.

Testing

  • tofu fmt, tofu validate, tofu test pass (also enforced via pre-commit hooks).
  • 3 tests: default type, custom type (new cloud), and JSON-encoded attributes.
tests/identity_access_control.tftest.hcl... pass
  run "default_type_is_aws_iam_configuration"... pass
  run "custom_type_for_new_cloud"... pass
  run "attributes_are_json_encoded"... pass
Success! 3 passed, 0 failed.

🤖 Generated with Claude Code

@davidf-null davidf-null force-pushed the feat/provider-assume-role branch from 963c75b to d14ce01 Compare June 10, 2026 00:09
Add nullplatform/identity-access-control, which configures an identity &
access control provider in nullplatform via nullplatform_provider_config.

The module is cloud-agnostic: the provider `type` and `attributes` are
exposed as variables so new clouds can be onboarded without changing the
module. `type` defaults to the AWS IAM provider (aws-iam-configuration), and
`attributes` carries the provider-specific config (JSON-encoded to match the
selected specification's schema).

For AWS, this is the platform-side counterpart to
infrastructure/aws/iam/agent, which grants the agent sts:AssumeRole over the
published role ARNs.

- type variable (default aws-iam-configuration) + generic attributes (any)
- supports dimensions
- no ignore_changes on attributes: Terraform stays the source of truth
- includes README (AWS + new-cloud usage) and tests (3 passing)

Also ignore the local np-api-skill.token credential.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@davidf-null davidf-null force-pushed the feat/provider-assume-role branch from d14ce01 to c6491bd Compare June 10, 2026 00:10
@davidf-null davidf-null marked this pull request as draft June 10, 2026 00:10
@davidf-null davidf-null marked this pull request as ready for review June 10, 2026 14:32
@davidf-null davidf-null merged commit ddcc212 into main Jun 10, 2026
44 checks passed
@davidf-null davidf-null deleted the feat/provider-assume-role branch June 10, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants