Provider Versioning Flashcards
What is the focus of today’s video?
Today’s video discusses Provider Versioning.
What does a Terraform file (TF file) do?
A TF file creates resources, such as a server in a cloud provider like Digital Ocean.
How does Terraform interact with cloud providers?
Terraform uses provider plugins to interact with the backend cloud provider.
What are the two types of version numbers in Terraform?
The two types are Terraform Version and Provider Plugin Version.
Why is it important to specify the provider version in production?
Specifying the provider version prevents issues that may arise from updates, similar to software versions like Windows.
What happens if you do not specify a version during ‘terraform init’?
The most recent provider plugin will be used by default.
What does the tilde mark (~) signify in versioning?
The tilde mark indicates any version in the specified major version range.
What does ‘>= 1.0’ mean in version constraints?
It ensures that downloaded provider plugins are greater than or equal to version 1.0.
What does ‘<= 1.0’ mean in version constraints?
It restricts the downloaded provider plugins to be less than or equal to version 1.0.
What does ‘~> 2.0’ mean in version constraints?
It allows any version in the 2.X range, such as 2.1, 2.2, etc.
What does ‘>= 2.10, <= 2.30’ mean in version constraints?
It restricts the downloaded plugin versions to be between 2.10 and 2.30.
What is the purpose of the .terraform.lock.hcl file?
It records the provider selection and version constraints used in the Terraform configuration.
What happens if you try to change the version in the configuration while a lock file exists?
Terraform may block the change if the locked version does not match the new configuration.
How can you override the lock file behavior during initialization?
You can use the ‘-upgrade’ flag with ‘terraform init’ to find the latest version based on constraints.
What should you consider before switching to a newer provider version?
Consider compatibility with existing resources and perform thorough testing.
What is a potential consequence of directly switching to a newer provider version?
Unexpected issues may arise, causing existing infrastructure to break.