Skip to content

Commit

Permalink
update readme for caller_identity
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Aug 28, 2024
1 parent 61a4522 commit 93a16b3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ When "Tags" key exists in function.json, lambroll set / remove tags to the lambd
When "Tags" key does not exist, lambroll doesn't manage tags.
If you hope to remove all tags, set `"Tags": {}` expressly.

### Jsonnet support for function configuration
#### Jsonnet support for function configuration

lambroll also can read function.jsonnet as [Jsonnet](https://jsonnet.org/) format instead of plain JSON.

Expand Down Expand Up @@ -517,6 +517,25 @@ local must_env = std.native('must_env');
}
```

#### Resolve AWS caller identity

Note: This function is available only in Jsonnet.

The `caller_identity` native function resolves the AWS caller identity.

```jsonnet
local caller = std.native('caller_identity')();
{
Account: caller.Account,
Arn: caller.Arn,
UserId: caller.UserId,
}
```

The `caller_identity` function returns an object containing the following fields: `Account`, `Arn`, and `UserId`.

This object is the same as the result of [GetCallerIdentity](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html) API.

#### Environment variables from envfile

`lambroll --envfile .env1 .env2` reads files named .env1 and .env2 as environment files and export variables in these files.
Expand Down

0 comments on commit 93a16b3

Please sign in to comment.