openstack_compute_instance_v2

    0

    0

    lucycodes42

    Terraform snippets

    The code uses the resource "openstack_compute_instance_v2" to create an instance. The instance uses the name "my-instance", and has the description "my-description-${myResourceName}" set. The instance's image is "ad091b52-742f-469e-8f3c-fd81cadf0743" and it uses the flavor "3". Lastly, the instance has a key pair and security groups set.

    Shortcut: tf_openstack_compute_instance_v2

    resource "openstack_compute_instance_v2" "${myResourceName}" {
       name = "my-${myResourceName}"
       description = "my-description-${myResourceName}"
    
       image_id = "ad091b52-742f-469e-8f3c-fd81cadf0743"
       flavor_id = "3"
       key_pair = "my_key_pair_name"
       security_groups = ["default"]
       metadata {
           this = "that"
       }
       network {
           name = "my_network"
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.