Posts

Showing posts from July, 2022

OCI -- Compute Instance Creation : VCN :Subnet -- Multiple Instances - Practice

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  You can use the same code that you have created and create multiple instances or resources using resourcegroup.   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I have written a code under the folder testing_self it has a main.tf , variables file etc. Now I am creating another folder by anyname (I am creating the folder as Monto ) -- created a file under the folder as main.tf And I am just calling the code three times using a module  module "instance1" {     source = "../testing_self" } module "instance2" {     source = "../testing_self" } module "instance3" {     source = "../testing_self" } Now terraform init > terraform validate  > terraform plan > terraform apply  You will have thress resources created. === Multiple Instance using Count   COUNT variable MULTIPLE INSTANCES display_name = " ...

OCI -- Compute Instance Creation : VCN :Subnet

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  Creating a Compute Instance over an existing VCN and Subnet Created a VCN and Subnet over OCI and wrote terraform code to launch the compute instance over the same VCN and subnet +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   ComputeInstance.tf   # resource "oci_core_vcn" "test_vcn" { #     #Required #     compartment_id = var.compartment_id # #    #Optional # #    byoipv6cidr_details { # #        #Required # #        byoipv6range_id = oci_core_byoipv6range.test_byoipv6range.id # #        ipv6cidr_block = var.vcn_byoipv6cidr_details_ipv6cidr_block # #    }     # cidr_block = var.vcn_cidr_block     #cidr_blocks = var.vcn_cidr_blocks     #defined_tags = {"Operations.CostCenter"= "Testing"}     #display_name = var.v...