root@deploymentmachine:/home/terra# terraform init
Initializing the backend...
Initializing provider plugins...
- Finding latest version of hashicorp/oci...
- Installing hashicorp/oci v4.11.0...
- Installed hashicorp/oci v4.11.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
root@deploymentmachine:/home/terra# terraform plan
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# oci_core_instance.test_instance will be created
+ resource "oci_core_instance" "kek" {
+ availability_domain = "Aodz:EU-FRANKFURT-1-AD-1"
+ boot_volume_id = (known after apply)
+ compartment_id = "ocid1.tenancy.oc1..aaaaaaaafakeocidhere2342352345"
+ dedicated_vm_host_id = (known after apply)
+ defined_tags = (known after apply)
+ display_name = "kek"
+ fault_domain = (known after apply)
+ freeform_tags = (known after apply)
+ hostname_label = (known after apply)
+ id = (known after apply)
+ image = (known after apply)
+ ipxe_script = (known after apply)
+ is_pv_encryption_in_transit_enabled = (known after apply)
+ launch_mode = (known after apply)
+ metadata = {
+ "ssh_authorized_keys" = <<-EOT
ssh-rsa AAAAB234sererfakesshkeyshereerwerwfcse13423423fakefakefakefake2343535443534= root@deploymentmachine
EOT
}
+ private_ip = (known after apply)
+ public_ip = (known after apply)
+ region = (known after apply)
+ shape = "VM.Standard.E2.1.Micro"
+ state = (known after apply)
+ subnet_id = (known after apply)
+ system_tags = (known after apply)
+ time_created = (known after apply)
+ time_maintenance_reboot_due = (known after apply)
+ agent_config {
+ is_management_disabled = (known after apply)
+ is_monitoring_disabled = (known after apply)
}
+ availability_config {
+ recovery_action = (known after apply)
}
+ create_vnic_details {
+ assign_public_ip = "true"
+ defined_tags = (known after apply)
+ display_name = (known after apply)
+ freeform_tags = (known after apply)
+ hostname_label = (known after apply)
+ private_ip = (known after apply)
+ skip_source_dest_check = (known after apply)
+ subnet_id = "ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaafakeocidherehahaha1233434"
+ vlan_id = (known after apply)
}
+ instance_options {
+ are_legacy_imds_endpoints_disabled = (known after apply)
}
+ launch_options {
+ boot_volume_type = (known after apply)
+ firmware = (known after apply)
+ is_consistent_volume_naming_enabled = (known after apply)
+ is_pv_encryption_in_transit_enabled = (known after apply)
+ network_type = (known after apply)
+ remote_data_volume_type = (known after apply)
}
+ shape_config {
+ gpu_description = (known after apply)
+ gpus = (known after apply)
+ local_disk_description = (known after apply)
+ local_disks = (known after apply)
+ local_disks_total_size_in_gbs = (known after apply)
+ max_vnic_attachments = (known after apply)
+ memory_in_gbs = (known after apply)
+ networking_bandwidth_in_gbps = (known after apply)
+ ocpus = (known after apply)
+ processor_description = (known after apply)
}
+ source_details {
+ boot_volume_size_in_gbs = (known after apply)
+ kms_key_id = (known after apply)
+ source_id = "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa5w2lrmsn6wpjn7fbqv55curiarwsryqhoj4dw5hsixrl37hrinja"
+ source_type = "image"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
root@deploymentmachine:/home/terra#
root@deploymentmachine:/home/terra# terraform apply
[...skipping...]
Enter a value: yes
oci_core_instance.kek: Creating...
oci_core_instance.kek: Still creating... [10s elapsed]
oci_core_instance.kek: Still creating... [20s elapsed]
oci_core_instance.kek: Still creating... [30s elapsed]
oci_core_instance.kek: Still creating... [40s elapsed]
oci_core_instance.kek: Still creating... [50s elapsed]
oci_core_instance.kek: Still creating... [1m0s elapsed]
oci_core_instance.kek: Still creating... [1m10s elapsed]
oci_core_instance.kek: Still creating... [1m20s elapsed]
oci_core_instance.kek: Creation complete after 1m23s [id=ocid1.instance.oc1.eu-frankfurt-1.somerandomstuffthatisfakeherehaha]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
root@deploymentmachine:/home/terra#
root@deploymentmachine:/home/terra# terraform destroy
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# oci_core_instance.kek will be destroyed
[ ... skipping ... ]
Enter a value: yes
oci_core_instance.kek: Destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.antheljt34qs2dycpdlshwvtr2japauj3rs3behdszqepuedbtuvczhd65la]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65ladszqepuedbtuvczhdgrd5la, 10s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65laszqepuedbtuvczhddd6g5la, 20s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65lazqepuedbtuvcddzhssd65la, 30s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65laszqepuedbtuvczhdddd65la, 40s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65labehdszqepuedbtuvczd65la, 50s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65laehdszqepuedbvczhdfd65la, 1m0s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65labehdszqepuedbtuhddfg5la, 1m10s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65labehdszqepuedbtuvczhd5la, 1m20s elapsed]
oci_core_instance.kek: Still destroying... [id=ocid1.instance.oc1.eu-frankfurt-1.anthe...epuedbtuvczhd65laehdszqepuedbtuvcdsd65la, 1m30s elapsed]
oci_core_instance.kek: Destruction complete after 1m34s
Destroy complete! Resources: 1 destroyed.