Pulumi is a modern Infrastructure as Code (IaC) tool that simplifies cloud resource management by using familiar programming languages like TypeScript, Python, Go, C#, and Java. This guide provides 30 multiple-choice questions (MCQs) covering Pulumi fundamentals, resource management, configuration, secrets, and deployment practices. Test your knowledge and enhance your understanding of Pulumi with these expertly crafted questions.
1. What is Pulumi primarily used for?
a) Managing hardware infrastructure
b) Writing Infrastructure as Code (IaC)
c) Monitoring application performance
d) Testing software applications
2. Which statement best describes Infrastructure as Code (IaC)?
a) It refers to writing server-side scripts for applications.
b) It automates infrastructure provisioning using code.
c) It is a configuration tool for databases only.
d) It is a networking framework.
3. Pulumi supports which type of deployment model?
a) Manual deployment
b) Container-only deployment
c) Declarative and imperative deployment
d) Infrastructure monitoring deployment
4. Pulumi integrates with which of the following cloud providers?
a) AWS and Azure only
b) All major cloud providers
c) AWS only
d) Azure and GCP only
5. What is the core advantage of Pulumi over traditional IaC tools?
a) Uses standard programming languages
b) Operates only on public clouds
c) Requires no programming knowledge
d) Only supports Kubernetes
6. In Pulumi, what does “infrastructure state” refer to?
a) Code snippets used to configure servers
b) The current status of managed resources
c) Default cloud configurations
d) Database connection details
7. Which command in Pulumi updates infrastructure resources?
a) pulumi deploy
b) pulumi up
c) pulumi run
d) pulumi update
8. Pulumi allows you to define infrastructure in which programming paradigm?
a) Declarative only
b) Imperative only
c) Both declarative and imperative
d) Object-oriented only
9. What is the purpose of the Pulumi.yaml file?
a) Define cloud provider secrets
b) Store program dependencies
c) Configure the Pulumi project metadata
d) Automate application testing
10. In Pulumi, how are dependencies installed for a TypeScript project?
a) Using npm install
b) Using pip install
c) Using go mod tidy
d) Using dotnet restore
11. Which language is not supported by Pulumi?
a) TypeScript
b) Python
c) JavaScript
d) PHP
12. Pulumi supports which type of programming languages?
a) Only scripting languages
b) General-purpose programming languages
c) Vendor-specific languages
d) Low-level programming languages
13. Which command initializes a Pulumi project in Python?
a) pulumi init -l python
b) pulumi create python
c) pulumi config python
d) pulumi start python
14. Which language is commonly used for Kubernetes deployment in Pulumi?
a) Java
b) C#
c) TypeScript
d) Go
15. How does Pulumi handle language-specific dependencies?
a) Pulumi installs them automatically
b) By using the language’s package manager
c) Manually editing the Pulumi.yaml file
d) They are pre-installed
16. How does Pulumi securely manage secrets?
a) Encrypting them with a passphrase
b) Storing them in plaintext
c) Using cloud storage only
d) Only storing them in the Pulumi.yaml file
17. Which Pulumi command is used to set a configuration value?
a) pulumi config set
b) pulumi init config
c) pulumi configure
d) pulumi secret add
18. What is the default behavior of Pulumi when managing secrets?
a) Encrypts them using a backend-specific encryption mechanism
b) Stores them in plaintext
c) Automatically deletes unused secrets
d) Requires manual encryption
19. Pulumi configurations are stored in which format by default?
a) JSON
b) YAML
c) XML
d) CSV
20. Which command lists all Pulumi configurations?
a) pulumi config list
b) pulumi view config
c) pulumi get config
d) pulumi config view
21. What are Pulumi resource providers used for?
a) Monitoring resource usage
b) Managing specific cloud services
c) Writing IaC scripts
d) Configuring development environments
22. Which Pulumi command installs required plugins?
a) pulumi up
b) pulumi install
c) pulumi plugin install
d) pulumi add plugin
23. What is the purpose of resource options in Pulumi?
a) Define resource attributes
b) Specify dependencies and policies for resources
c) Generate API documentation
d) Set environment variables
24. Pulumi plugins are versioned to ensure what?
a) Compatibility with the cloud provider APIs
b) Faster deployment speeds
c) Lower system resource usage
d) Improved logging mechanisms
25. Resource providers are typically implemented as what?
a) Cloud-specific functions
b) External libraries
c) Plugins
d) Virtual environments
26. What does the pulumi destroy command do?
a) Removes unused resources
b) Deletes the stack and its resources
c) Deletes only failed resources
d) Cancels ongoing deployments
27. Which file is used to store the program’s main execution logic?
a) Pulumi.yaml
b) main.ts (or equivalent in the chosen language)
c) config.json
d) infrastructure.yaml
28. Which Pulumi command previews changes before deployment?
a) pulumi dry-run
b) pulumi preview
c) pulumi simulate
d) pulumi validate
29. What is the purpose of the Pulumi state?
a) Debugging deployment issues
b) Storing the current infrastructure status
c) Managing secret configurations
d) Running CI/CD pipelines
30. What is a stack in Pulumi terminology?
a) A programming language runtime
b) A logical grouping of infrastructure resources
c) A cloud provider’s SDK
d) A testing framework
| QNo | Answer (Option with the text) |
|---|---|
| 1 | b) Writing Infrastructure as Code (IaC) |
| 2 | b) Automates infrastructure provisioning using code |
| 3 | c) Declarative and imperative deployment |
| 4 | b) All major cloud providers |
| 5 | a) Uses standard programming languages |
| 6 | b) The current status of managed resources |
| 7 | b) pulumi up |
| 8 | c) Both declarative and imperative |
| 9 | c) Configure the Pulumi project metadata |
| 10 | a) Using npm install |
| 11 | d) PHP |
| 12 | b) General-purpose programming languages |
| 13 | a) pulumi init -l python |
| 14 | c) TypeScript |
| 15 | b) By using the language’s package manager |
| 16 | a) Encrypting them with a passphrase |
| 17 | a) pulumi config set |
| 18 | a) Encrypts them using a backend-specific encryption mechanism |
| 19 | b) YAML |
| 20 | a) pulumi config list |
| 21 | b) Managing specific cloud services |
| 22 | c) pulumi plugin install |
| 23 | b) Specify dependencies and policies for resources |
| 24 | a) Compatibility with the cloud provider APIs |
| 25 | c) Plugins |
| 26 | b) Deletes the stack and its resources |
| 27 | b) main.ts (or equivalent in the chosen language) |
| 28 | b) pulumi preview |
| 29 | b) Storing the current infrastructure status |
| 30 | b) A logical grouping of infrastructure resources |