CompTIA Cloud+ (CV0-004)DeploymentHard
A cloud engineer is tasked with deploying a new virtual machine using a pre-defined template. The template specifies the operating system, instance type, and network configuration. However, the engineer needs to provide a unique hostname, IP address, and an SSH key for the specific deployment. Where should these unique values be specified when using the template?
- APost-deployment via manual configuration
- BAs template input parameters
- CHardcoded directly within the template file
- DIn a separate configuration file referenced by the template
Show answer & explanationAnswer & explanation
Correct answer: B. As template input parameters
Template input parameters (or variables) are designed to allow users to provide unique values at deployment time without modifying the core template. This ensures the template remains generic and reusable while accommodating specific deployment needs like hostnames, IP addresses, and SSH keys.
Why the other options are wrong
- A. Manual post-deployment configuration introduces inconsistencies and reduces automation, contradicting the benefits of using templates.
- C. Hardcoding unique values defeats the purpose of templates for reusability and consistency, requiring template modification for each deployment.
- D. While configuration files can store parameters, 'template input parameters' is the specific and most direct mechanism within most IaC/orchestration template systems for providing values at runtime.
Template Input Parameters
Variables or placeholders defined within an Infrastructure as Code (IaC) template that allow users to provide specific values at deployment time, customizing the deployed resources.
- Enable template reusability for different environments or needs.
- Defined in the template, values provided at runtime.
- Examples: instance size, region, unique names, passwords, IP addresses.
Memory trick: Parameters customize templates, Hardcoding breaks reuse, Files link config, Manual is not automated.