The pantechdynamics_team, pantechdynamics_team_membership, pantechdynamics_access_policy, pantechdynamics_access_policy_attachment and pantechdynamics_access_settings resources and their data sources, with examples.
Keep your teams and access policies in code with the Terraform provider. The provider's key must belong to an owner or admin. Changes that act on an admin need an owner's key.
Resource
What it is
pantechdynamics_team
A team
pantechdynamics_team_membership
One member in one team
pantechdynamics_access_policy
A policy and its statements
pantechdynamics_access_policy_attachment
A policy attached to a member or a team
pantechdynamics_access_settings
The organization's member baseline, once per organization
Data source
What it reads
pantechdynamics_access_policy
A policy, yours or a managed pol_pantech_… one, by id or name
pantechdynamics_iam_actions
Every action a policy can name, optionally for one service
pantechdynamics_access_policy_document
A policy's JSON built from statement blocks, without calling the API
Required. Unique in the organization: 1 to 64 letters, digits, spaces, ., _ or -, starting with a letter or digit. Names starting pantech_ are reserved
description
Optional. Up to 255 characters
statement
1 to 20 blocks. Each has effect (allow or deny), actions and resources (1 to 50 each), and optionally sid and conditions = { source_ip = [...], mfa = ... } (up to 20 CIDRs)
policy_json
Instead of statement blocks: the statements as JSON, {"statements": [...]}. Set one or the other. With blocks, it shows them in normal form
Attribute
id
pol_…
version
Bumped on every change. The provider sends it as If-Match, so a change made in the console since your last plan is refused instead of overwritten
Actions, resources, CIDRs and the limits are checked at plan time, actions also against the published catalogue. Statements are compared by meaning, so reordering actions or writing a bare address for the same address with /32 shows no change. Writing policies explains actions, resources and conditions. Managed policies (pol_pantech_…) are not resources: attach them by id.
Required. One of yours, or a managed pol_pantech_…
principal_type
Required. member or team
principal_id
Required. A usr_… id for a member, or a team_… id
Changing any argument replaces the attachment, and destroying it detaches the policy. A member and a team can each have 10 policies. Only an owner may attach a policy to an admin, or to a team that holds one.
Required. What members (not owners or admins) may do without a policy: read (view everything, the default for an organization) or none (only what their policies allow)
Declare it once per organization; it needs an owner's key. Destroying it leaves the setting as it is.