DevOps Classroomnotes 17/Mar/2023

Terraform Contd

Azure Provider

  • Refer Here for the provider documentation
  • To install azure cli Refer Here. To authenticate azure cli
az login
az group list

Providers and resources

  • In terraform to create any resource we need to configure provdier
  • Every provider has a specific structure
provider "<name>" {
    <ARGUMENT-1> = <VALUE-1>
    ..
    ..
    ..
    <ARGUMENT-N> = <VALUE-N>

}
  • AWS Provider argument reference Refer Here
  • Azure Provider argument reference Refer Here
  • Resource: The syntax or structure of resource in terraform template is
resource <type of resource> <name> {
    <ARGUMENT-1> = <VALUE-1>
    ..
    ..
    ..
    <ARGUMENT-N> = <VALUE-N>
}
  • the type of resource will be in the form of <provider>_<resource_type>

Manual Steps of VPC Creation

  • Steps: Lets create a simple vpc
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
  • Lets search for resource which lead to Refer Here
    Preview
  • Now look at arguments Refer Here
  • Create the template as shown in this changeset Refer Here
  • Now validate and apply
    Preview
    Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner