Explore a curated list of multiple-choice questions (MCQs) on advanced Pulumi topics, including dynamic resources, managing dependencies, using Pulumi Outputs, and multi-cloud deployments. This collection is designed to test and enhance your understanding of Pulumi’s advanced capabilities, such as policy-as-code and best practices for state management, ensuring you’re ready for real-world cloud infrastructure challenges.
Advanced Resource Management (10 MCQs)
Which Pulumi feature allows creating resources whose configuration depends on runtime conditions? a) Stack Configuration b) Dynamic Resources c) State Backend d) Policy Pack
What is the primary benefit of Pulumi Outputs? a) Store API tokens b) Manage user roles c) Pass runtime values between resources d) Enforce resource policies
How does Pulumi manage the state of resources? a) Using YAML files stored locally b) Through remote servers only c) Using a state file stored locally or in a backend d) State is not required
Which language is NOT supported by Pulumi? a) Python b) JavaScript c) Rust d) TypeScript
Pulumi uses which of the following to represent cloud resources? a) Modules b) Packages c) Classes d) Infrastructure as Code (IaC)
What is the role of a Pulumi stack? a) It acts as a database server b) It groups related infrastructure resources c) It stores cloud resource logs d) It ensures faster API requests
Which command is used to destroy all resources in a Pulumi stack? a) pulumi delete b) pulumi down c) pulumi destroy d) pulumi remove
In Pulumi, resources defined in a program are: a) Automatically executed sequentially b) Explicitly orchestrated by the user c) Independently created with no order d) Created based on dependency graph
What is a key advantage of Pulumi over traditional IaC tools? a) It requires no coding b) It supports modern programming languages c) It eliminates resource provisioning d) It is free for enterprise use
How does Pulumi ensure resource updates are not destructive? a) By defaulting to read-only mode b) Using the preview feature to show changes before applying them c) Automatically storing a backup of all resources d) By preventing any updates once resources are created
Working with Dynamic Resources (5 MCQs)
What is the main purpose of dynamic resources in Pulumi? a) Creating static cloud infrastructure b) Managing conditional resource configurations c) Logging API requests d) Debugging Pulumi programs
A dynamic provider in Pulumi requires which primary component? a) Resource schema b) Policy script c) Update function d) Dependency map
How can a developer reuse a dynamic resource in multiple projects? a) By exporting it as a package b) By copying and pasting the code c) Using Pulumi templates d) It cannot be reused
In Pulumi, dynamic resources are commonly used for: a) Resource deletion b) Generating custom configurations c) Managing IAM roles d) Scaling virtual machines
When would you choose a dynamic resource over a built-in provider? a) When native support is limited for a specific resource b) When a resource is managed outside Pulumi c) To simplify state management d) Always, as it is more efficient
Managing Dependencies Between Resources (5 MCQs)
Pulumi automatically determines resource order using: a) Stack configuration b) Dependency graph c) YAML hierarchy d) CLI commands
Which Pulumi feature ensures proper sequencing of resource creation? a) Outputs b) Providers c) Dependency tracking d) State locking
Dependencies in Pulumi can be enforced by: a) Declaring resource properties b) Using explicit programming logic c) Configuring backend state d) Adding stack policies
Circular dependencies in Pulumi are resolved by: a) Adding delay functions b) Breaking the cycle with manual intervention c) Pulumi automatically removes them d) They cannot be resolved
Which scenario exemplifies a dependency between two resources? a) A storage bucket and its access policy b) Two unrelated databases c) Standalone resources d) Parallel API deployments
Multi-Cloud Deployments (5 MCQs)
Pulumi supports multi-cloud deployments by: a) Using a unified CLI b) Leveraging multiple stacks within the same program c) Restricting resource creation to a single provider d) Requiring different languages for each cloud
Which statement about multi-cloud deployment in Pulumi is true? a) It requires specialized hardware b) Pulumi simplifies it through shared state management c) It only works with AWS and Azure d) It is exclusive to enterprise users
Multi-cloud infrastructure in Pulumi is defined: a) Per provider b) In a single program c) Using dynamic YAML d) As separate stack instances
What is an example of a multi-cloud setup in Pulumi? a) Using AWS Lambda and Google Cloud Functions in one application b) Creating identical resources in one cloud c) Deploying databases without automation d) Running a single CLI command
Pulumi enables smooth multi-cloud transitions by: a) Isolating cloud providers from programming logic b) Providing SDKs for each provider c) Enforcing policy compliance across clouds d) All of the above
Policy-as-Code and State Management (5 MCQs)
What is Policy-as-Code in Pulumi? a) A way to enforce compliance via code b) A mechanism to deploy resources c) A CLI command to manage state d) A feature for resource monitoring
Pulumi policies are typically written in: a) JSON b) YAML c) Programming languages d) SQL
Best practices for managing Pulumi state include: a) Always storing it locally b) Using a secure remote backend c) Disabling state management d) Sharing state files manually
What is a recommended way to prevent unauthorized resource changes in Pulumi? a) Disabling the Pulumi CLI b) Enforcing policies on stacks c) Manually editing state files d) Creating multiple state backends
How does Pulumi handle sensitive data like API keys in state files? a) By encrypting the data in the state file b) By excluding them from state c) By storing them in plain text d) By logging them in the CLI
Answer Key
Qno
Answer (Option with the text)
1
b) Dynamic Resources
2
c) Pass runtime values between resources
3
c) Using a state file stored locally or in a backend
4
c) Rust
5
d) Infrastructure as Code (IaC)
6
b) It groups related infrastructure resources
7
c) pulumi destroy
8
d) Created based on dependency graph
9
b) It supports modern programming languages
10
b) Using the preview feature to show changes before applying them
11
b) Managing conditional resource configurations
12
c) Update function
13
a) By exporting it as a package
14
b) Generating custom configurations
15
a) When native support is limited for a specific resource
16
b) Dependency graph
17
c) Dependency tracking
18
b) Using explicit programming logic
19
b) Breaking the cycle with manual intervention
20
a) A storage bucket and its access policy
21
b) Leveraging multiple stacks within the same program
22
b) Pulumi simplifies it through shared state management
23
b) In a single program
24
a) Using AWS Lambda and Google Cloud Functions in one application