|
| 1 | +## auto.tfvars syntax for Compute Module |
| 2 | +These are the syntax and sample format for providing inputs to the modules via <b>*.auto.tfvars</b> files. |
| 3 | +<b>"key"</b> must be unique to every resource that is created. |
| 4 | +Comments preceed with <b>##</b>. |
| 5 | + |
| 6 | +## Compute |
| 7 | +1. Virtual Machines (VMs) |
| 8 | +- <b>Syntax</b> |
| 9 | + |
| 10 | + ```` |
| 11 | + instances = { |
| 12 | + ## key - Is a unique value to reference the resources respectively |
| 13 | + key = { |
| 14 | + # Required |
| 15 | + availability_domain = string |
| 16 | + compartment_id = string |
| 17 | + shape = string |
| 18 | + source_id = string |
| 19 | + source_type = string |
| 20 | + vcn_name = string |
| 21 | + subnet_id = string |
| 22 | + network_compartment_id = string |
| 23 | + |
| 24 | + # Optional |
| 25 | + display_name = string |
| 26 | + assign_public_ip = bool |
| 27 | + boot_volume_size_in_gbs = string |
| 28 | + fault_domain = string |
| 29 | + dedicated_vm_host_id = string |
| 30 | + private_ip = string |
| 31 | + hostname_label = string |
| 32 | + nsg_ids = list |
| 33 | + ocpus = string |
| 34 | + memory_in_gbs = number |
| 35 | + capacity_reservation_id = string |
| 36 | + create_is_pv_encryption_in_transit_enabled = bool |
| 37 | + update_is_pv_encryption_in_transit_enabled = bool |
| 38 | + ssh_authorized_keys = string |
| 39 | + backup_policy = string |
| 40 | + policy_compartment_id = string |
| 41 | + network_type = string |
| 42 | + extended_metadata = string |
| 43 | + skip_source_dest_check = bool |
| 44 | + baseline_ocpu_utilization = string |
| 45 | + preemptible_instance_config = string |
| 46 | + all_plugins_disabled = bool |
| 47 | + is_management_disabled = bool |
| 48 | + is_monitoring_disabled = bool |
| 49 | + plugins_details = map |
| 50 | + is_live_migration_preferred = bool |
| 51 | + recovery_action = string |
| 52 | + are_legacy_imds_endpoints_disabled = bool |
| 53 | + boot_volume_type = string |
| 54 | + firmware = string |
| 55 | + is_consistent_volume_naming_enabled = bool |
| 56 | + remote_data_volume_type = string |
| 57 | + platform_config = map |
| 58 | + ipxe_script = string |
| 59 | + firmware = string |
| 60 | + preserve_boot_volume = bool |
| 61 | + vlan_id = string |
| 62 | + kms_key_id = string |
| 63 | + vnic_display_name = string |
| 64 | + vnic_defined_tags = map |
| 65 | + vnic_freeform_tags = map |
| 66 | + defined_tags = map |
| 67 | + freeform_tags = map |
| 68 | + }, |
| 69 | + } |
| 70 | + ```` |
| 71 | +- <b>Example</b> |
| 72 | + ```` |
| 73 | + // Copyright (c) 2021, 2022, Oracle and/or its affiliates. |
| 74 | + ############################ |
| 75 | + # Instances |
| 76 | + # Instance - tfvars |
| 77 | + # Allowed Values: |
| 78 | + # vcn_name must be the name of the VCN as in OCI |
| 79 | + # subnet_id can be the ocid of the subnet or the name as in OCI |
| 80 | + # compartment_id and network_compartment_id can be the ocid or the name of the compartment hierarchy delimited by double hiphens "--" |
| 81 | + # Example : compartment_id = "ocid1.compartment.oc1..aaaaaaaahwwiefb56epvdlzfic6ah6jy3xf3c" or compartment_id = "Network-root-cpt--Network" where "Network-root-cpt" is the parent of "Network" compartment |
| 82 | + # Sample import command for Instance and volume backup policy: |
| 83 | + # terraform import "module.instances[\"<<instances terraform variable name>>\"].oci_core_instance.instance" <<instance ocid>> |
| 84 | + # terraform import "module.instances[\"<<instances terraform variable name>>\"].oci_core_volume_backup_policy_assignment.volume_backup_policy_assignment[0]" <<volume backup policy ocid>> |
| 85 | + ############################ |
| 86 | + instances = { |
| 87 | + server01 = { |
| 88 | + # Required |
| 89 | + availability_domain = 0 |
| 90 | + compartment_id = "AppDev" |
| 91 | + shape = "VM.Standard.A1.Flex" |
| 92 | + source_id = "Linux" |
| 93 | + source_type = "image" |
| 94 | + vcn_name = "dev" |
| 95 | + subnet_id = "app" |
| 96 | + network_compartment_id = "Dev" |
| 97 | + |
| 98 | + # Optional |
| 99 | + display_name = "server01" |
| 100 | + boot_volume_size_in_gbs = 50 |
| 101 | + fault_domain = "FAULT-DOMAIN-2" |
| 102 | + assign_public_ip = false |
| 103 | + private_ip = "172.10.10.10" |
| 104 | + nsg_ids = ["app-nsg"] |
| 105 | + ocpus = "4" |
| 106 | + memory_in_gbs = 16 |
| 107 | + ssh_authorized_keys = "instance-ssh-key" |
| 108 | + backup_policy = "gold" |
| 109 | + ## Section for adding VNIC Defined and Freeform Tags |
| 110 | + vnic_defined_tags = { |
| 111 | + "Operations.os"= "Linux" , |
| 112 | + "Organization.department"= "Administrators" , |
| 113 | + "Oracle-Tags.CreatedBy"= "oracleidentitycloudservice/[email protected]" , |
| 114 | + "Oracle-Tags.CreatedOn"= "2021-09-16T19:59:21.745Z" , |
| 115 | + } |
| 116 | + vnic_freeform_tags = { |
| 117 | + "Operations.os"= "Linux" , |
| 118 | + } |
| 119 | + defined_tags = { |
| 120 | + "Operations.os"= "Linux" , |
| 121 | + "Organization.department"= "Administrators" , |
| 122 | + "Oracle-Tags.CreatedBy"= "oracleidentitycloudservice/[email protected]" , |
| 123 | + "Oracle-Tags.CreatedOn"= "2021-09-16T19:59:21.745Z" , |
| 124 | + } |
| 125 | + }, |
| 126 | + server02 = { |
| 127 | + # Required |
| 128 | + availability_domain = 0 |
| 129 | + compartment_id = "Sbox--T11-Testing--AppDev--Non-Prod" |
| 130 | + shape = "VM.Standard.E4.Flex" |
| 131 | + source_id = "Linux" |
| 132 | + source_type = "image" |
| 133 | + network_compartment_id = "Dev" |
| 134 | + vcn_name = "dev" |
| 135 | + subnet_id = "app" |
| 136 | + |
| 137 | + # Optional |
| 138 | + display_name = "server02" |
| 139 | + boot_volume_size_in_gbs = 50 |
| 140 | + fault_domain = "FAULT-DOMAIN-2" |
| 141 | + assign_public_ip = false |
| 142 | + private_ip = "172.10.10.10" |
| 143 | + nsg_ids = ["app-nsg"] |
| 144 | + ocpus = "4" |
| 145 | + memory_in_gbs = 16 |
| 146 | + update_is_pv_encryption_in_transit_enabled = false |
| 147 | + ssh_authorized_keys = "instance-ssh-key" |
| 148 | + backup_policy = "gold" |
| 149 | + }, |
| 150 | + ##Add New Instances for phoenix here## |
| 151 | + } |
| 152 | + ```` |
0 commit comments