Knowledge Check - Programmatic Foundations
Test your understanding of the key concepts from Module 1. Select the best answer for each question, then submit to see your results. You need to score at least 60% to pass.
A developer's script creates a server with a POST to /cloudapi/v6/datacenters/{dcId}/servers, then immediately issues a second call to attach a volume to that server. The volume call intermittently fails with a 404. What is the correct fix?
IONOS provisioning is asynchronous: a POST returns 202 Accepted with the resource in BUSY state, and a 404 right after creation means "not ready yet," not "missing." You must poll the request status URL from the Location header until DONE before any dependent call. Tight retries waste rate-limit budget without addressing the cause, and depth only controls response payload size.
A scheduled job that generates a fresh bearer token on every run starts failing with authentication errors after several weeks, and the Token Manager shows dozens of tokens. What is the underlying limit and the correct pattern?
A user can generate up to 100 authentication tokens, so a script that mints a new token per run eventually exhausts the quota. The correct pattern is to issue one scoped, short-TTL token per service or environment, capture it at creation (the value is shown only once), and reuse it until it expires, then rotate. A single shared long-lived token violates least privilege, and token TTLs are chosen from a fixed set ranging from 1 Hour to 365 Days, not a fixed 1 hour.
A developer lists resources with GET /cloudapi/v6/datacenters and processes the returned items, but later discovers some resources were never seen by the script. The collection has more than 1000 entries. What happened and how should it be handled?
List endpoints return paginated collections with a default limit of 1000 and a default offset of 0, so a single call only sees the first page. The fix is to iterate, increasing offset by the page size until a page returns fewer than limit items. The depth parameter controls how much of the nested resource tree is inlined per item, not how many items are returned, and 429 is the rate-limit response, unrelated to pagination.
A developer adds an IONOS Object Storage bucket as a Terraform remote-state backend, but terraform init fails with errors about the Security Token Service and a missing account ID. Which change fixes the backend block?
The S3 backend assumes AWS and tries AWS-only calls (STS, account-ID lookup) that IONOS Object Storage does not implement, so the skip_* flags plus an explicit IONOS endpoint (for example https://s3.eu-central-1.ionoscloud.com) are required. IONOS Object Storage is S3-compatible and works fine as a backend, but it authenticates with an Access Key and Secret Key, not a bearer token. IONOS does not provide a DynamoDB lock table, so adding one is not an option.
A developer wants to bring a server that was created earlier with a curl script under Terraform management without recreating it. Which approach is correct?
IONOS imports use a compound ID joining the datacenter ID and the resource ID (dc_id/server_id), and the workflow is to write a matching ionoscloud_server block, import, then adjust the HCL until terraform plan reports no changes. Terraform does not auto-adopt existing resources on apply, and terraform refresh only updates state for already-managed resources. Deleting and recreating defeats the goal of preserving the existing server.