frostmoln_s3_credential (Resource)
Manages an S3 credential in the Frostmoln platform. Credentials are immutable apart from their tags: changing the name, description, or any scope attribute (allowed_buckets/allowed_actions/ip_whitelist) replaces the credential and issues a new secret_access_key, so update any downstream consumers; changing tags updates it in place. Per-credential scoping requires an IAM-capable object-storage backend.
Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.
Enacted and reconciled — every configurable attribute not listed below: the platform applies it, and a refresh reads the truth back.
Create-immutable — allowed_actions, allowed_buckets, description, ip_whitelist, name: a credential's update route takes its tags alone — changing what it may do re-mints it and issues a new secret.
Observed, not enacted — secret_access_key: returned once at create and never again — a refresh cannot read it back. tags_all: keys set outside Terraform — in the portal, by the fm CLI, or stamped by the platform — appear only here and are kept on every apply, never removed.
Example Usage
resource "frostmoln_s3_credential" "example" {
name = "app-s3-access"
description = "S3 credentials for application backend"
# Scope the credential — omitting these grants ALL buckets and ALL actions.
# Every scope attribute is ForceNew: changing one replaces the credential and
# issues a new secret_access_key.
allowed_buckets = [frostmoln_bucket.example.name]
allowed_actions = ["s3:GetObject", "s3:PutObject", "s3:ListBucket"]
}
output "s3_access_key_id" {
value = frostmoln_s3_credential.example.id
}
output "s3_secret_key" {
value = frostmoln_s3_credential.example.secret_access_key
sensitive = true
}Schema
Required
name(String) The name of the S3 credential.
Optional
allowed_actions(List of String) S3 actions this credential may perform, e.g. s3:GetObject. Empty/unset = ALL actions — set it to apply least privilege. Bucket-metadata writes (s3:PutBucketAcl, s3:PutBucketPolicy, s3:PutBucketTagging) are not grantable and are rejected. Changing this replaces the credential.allowed_buckets(List of String) Buckets this credential may access. Empty/unset = ALL buckets in the tenant's account — set it to apply least privilege. Changing this replaces the credential.description(String) A description of the S3 credential.ip_whitelist(List of String) Source IPs/CIDRs to restrict this credential to. TEMPORARILY UNAVAILABLE: must be empty or unset (= any source IP). The platform refuses a non-empty list, and so doesterraform plan, before the credential is replaced. Changing this replaces the credential.tags(Map of String) Resource tags on the credential: your own key/value metadata for search and filtering (?tag=key=valuein the API,--tagin the fm CLI). Labels only — they never reach the S3 endpoint or the credential's access, and changing them updates the credential in place (no new secret). The provider'sdefault_tagsapply as usual; the tenant's default tags are NOT added by the platform when a credential is created (they reach credentials only through "apply default tags to existing resources"). At most 32 keys including the tenant's default tags, which the platform merges in at create; a key is 1-64 bytes matching^[a-zA-Z0-9]([a-zA-Z0-9._:/-]*[a-zA-Z0-9])?$, a value at most 256 bytes; keys beginningfrostmoln_orfrostmoln-(any case) are reserved. Merged with the provider'sdefault_tagson every write (a key set here wins). Holds only the keys this configuration sets; the full set is intags_all.
Read-Only
created_at(String) The timestamp when the S3 credential was created.id(String) The access key ID of the S3 credential — the identifier used with secret_access_key when talking to the S3 endpoint, and the value to pass to terraform import.secret_access_key(String, Sensitive) The secret access key. Only returned when the credential is first created. Stored in Terraform state in plaintext —sensitiveredacts CLI output, not the state file. See the Secrets in Terraform state guide.status(String) The status of the S3 credential.tags_all(Map of String) Every tag the platform holds on this resource: the provider'sdefault_tags, this resource's owntags(which win on a shared key), and any key set outside Terraform — in the portal, by the fm CLI, or stamped by the platform. Keys set outside Terraform appear only here and are kept on every apply, never removed.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# S3 credentials are imported by their access key ID.
# secret_access_key is NOT recoverable on import - the API returns it only when
# the credential is created. Rotate or replace the credential if you need it.
terraform import frostmoln_s3_credential.example <access-key-id>