From f529cae42abae9a0da05590bef234ec19ab875cf Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Wed, 20 Jul 2016 09:37:17 -0600 Subject: [PATCH] provider/openstack: Documenting resources that support importing (#7716) Also removing some unneeded region arguments in the examples. --- .../openstack/r/blockstorage_volume_v1.html.markdown | 8 ++++++++ .../openstack/r/blockstorage_volume_v2.html.markdown | 8 ++++++++ .../openstack/r/compute_floatingip_v2.html.markdown | 9 ++++++++- .../openstack/r/compute_keypair_v2.html.markdown | 8 ++++++++ .../openstack/r/compute_secgroup_v2.html.markdown | 8 ++++++++ .../openstack/r/compute_servergroup_v2.html.markdown | 8 ++++++++ .../providers/openstack/r/fw_firewall_v1.html.markdown | 10 ++++++++-- .../providers/openstack/r/fw_policy_v1.html.markdown | 9 ++++++++- .../providers/openstack/r/fw_rule_v1.html.markdown | 8 ++++++++ .../providers/openstack/r/lb_member_v1.html.markdown | 8 ++++++++ .../providers/openstack/r/lb_monitor_v1.html.markdown | 8 ++++++++ .../providers/openstack/r/lb_pool_v1.html.markdown | 8 ++++++++ .../docs/providers/openstack/r/lb_vip_v1.html.markdown | 8 ++++++++ .../openstack/r/networking_floatingip_v2.html.markdown | 9 ++++++++- .../openstack/r/networking_network_v2.html.markdown | 8 ++++++++ .../openstack/r/networking_port_v2.html.markdown | 8 ++++++++ .../r/networking_router_interface_v2.html.markdown | 2 -- .../openstack/r/networking_router_v2.html.markdown | 1 - .../r/networking_secgroup_rule_v2.html.markdown | 8 ++++++++ .../openstack/r/networking_secgroup_v2.html.markdown | 8 ++++++++ .../openstack/r/networking_subnet_v2.html.markdown | 8 ++++++++ 21 files changed, 152 insertions(+), 8 deletions(-) diff --git a/website/source/docs/providers/openstack/r/blockstorage_volume_v1.html.markdown b/website/source/docs/providers/openstack/r/blockstorage_volume_v1.html.markdown index 70ab709a0..bc6e1cd9a 100644 --- a/website/source/docs/providers/openstack/r/blockstorage_volume_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/blockstorage_volume_v1.html.markdown @@ -73,3 +73,11 @@ The following attributes are exported: * `attachment` - If a volume is attached to an instance, this attribute will display the Attachment ID, Instance ID, and the Device as the Instance sees it. + +## Import + +Volumes can be imported using the `id`, e.g. + +``` +terraform import openstack_blockstorage_volume_v1.volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d +``` diff --git a/website/source/docs/providers/openstack/r/blockstorage_volume_v2.html.markdown b/website/source/docs/providers/openstack/r/blockstorage_volume_v2.html.markdown index edbe592f7..dee3a4f0a 100644 --- a/website/source/docs/providers/openstack/r/blockstorage_volume_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/blockstorage_volume_v2.html.markdown @@ -78,3 +78,11 @@ The following attributes are exported: * `attachment` - If a volume is attached to an instance, this attribute will display the Attachment ID, Instance ID, and the Device as the Instance sees it. + +## Import + +Volumes can be imported using the `id`, e.g. + +``` +terraform import openstack_blockstorage_volume_v2.volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d +``` diff --git a/website/source/docs/providers/openstack/r/compute_floatingip_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_floatingip_v2.html.markdown index ce7638800..fc4359b22 100644 --- a/website/source/docs/providers/openstack/r/compute_floatingip_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_floatingip_v2.html.markdown @@ -17,7 +17,6 @@ but only networking floating IPs can be used with load balancers. ``` resource "openstack_compute_floatingip_v2" "floatip_1" { - region = "" pool = "public" } ``` @@ -44,3 +43,11 @@ The following attributes are exported: * `address` - The actual floating IP address itself. * `fixed_ip` - The fixed IP address corresponding to the floating IP. * `instance_id` - UUID of the compute instance associated with the floating IP. + +## Import + +Floating IPs can be imported using the `id`, e.g. + +``` +terraform import openstack_compute_floatingip_v2.floatip_1 89c60255-9bd6-460c-822a-e2b959ede9d2 +``` diff --git a/website/source/docs/providers/openstack/r/compute_keypair_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_keypair_v2.html.markdown index 0c3beae27..991fdfb8f 100644 --- a/website/source/docs/providers/openstack/r/compute_keypair_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_keypair_v2.html.markdown @@ -41,3 +41,11 @@ The following attributes are exported: * `region` - See Argument Reference above. * `name` - See Argument Reference above. * `public_key` - See Argument Reference above. + +## Import + +Keypairs can be imported using the `name`, e.g. + +``` +terraform import openstack_compute_keypair_v2.my-keypair test-keypair +``` diff --git a/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown index 2005c9aea..a9c1c8385 100644 --- a/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown @@ -114,3 +114,11 @@ resource "openstack_compute_instance_v2" "test-server" { security_groups = ["${openstack_compute_secgroup_v2.secgroup_1.name}"] } ``` + +## Import + +Security Groups can be imported using the `id`, e.g. + +``` +terraform import openstack_compute_secgroup_v2.my_secgroup 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf +``` diff --git a/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown index 0e64db81f..f3af0a5f6 100644 --- a/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown @@ -51,3 +51,11 @@ The following attributes are exported: * `name` - See Argument Reference above. * `policies` - See Argument Reference above. * `members` - The instances that are part of this server group. + +## Import + +Server Groups can be imported using the `id`, e.g. + +``` +terraform import openstack_compute_servergroup_v2.test-sg 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf +``` diff --git a/website/source/docs/providers/openstack/r/fw_firewall_v1.html.markdown b/website/source/docs/providers/openstack/r/fw_firewall_v1.html.markdown index 07a1aa683..d3a1e9739 100644 --- a/website/source/docs/providers/openstack/r/fw_firewall_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/fw_firewall_v1.html.markdown @@ -32,14 +32,12 @@ resource "openstack_fw_rule_v1" "rule_2" { } resource "openstack_fw_policy_v1" "policy_1" { - region = "" name = "my-policy" rules = ["${openstack_fw_rule_v1.rule_1.id}", "${openstack_fw_rule_v1.rule_2.id}"] } resource "openstack_fw_firewall_v1" "firewall_1" { - region = "" name = "my-firewall" policy_id = "${openstack_fw_policy_v1.policy_1.id}" } @@ -81,3 +79,11 @@ The following attributes are exported: * `description` - See Argument Reference above. * `admin_state_up` - See Argument Reference above. * `tenant_id` - See Argument Reference above. + +## Import + +Firewalls can be imported using the `id`, e.g. + +``` +terraform import openstack_fw_firewall_v1.firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97 +``` diff --git a/website/source/docs/providers/openstack/r/fw_policy_v1.html.markdown b/website/source/docs/providers/openstack/r/fw_policy_v1.html.markdown index 4c6b52e26..e8be6f4c2 100644 --- a/website/source/docs/providers/openstack/r/fw_policy_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/fw_policy_v1.html.markdown @@ -32,7 +32,6 @@ resource "openstack_fw_rule_v1" "rule_2" { } resource "openstack_fw_policy_v1" "policy_1" { - region = "" name = "my-policy" rules = ["${openstack_fw_rule_v1.rule_1.id}", "${openstack_fw_rule_v1.rule_2.id}"] @@ -78,3 +77,11 @@ The following attributes are exported: * `description` - See Argument Reference above. * `audited` - See Argument Reference above. * `shared` - See Argument Reference above. + +## Import + +Firewall Policies can be imported using the `id`, e.g. + +``` +terraform import openstack_fw_policy_v1.policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0 +``` diff --git a/website/source/docs/providers/openstack/r/fw_rule_v1.html.markdown b/website/source/docs/providers/openstack/r/fw_rule_v1.html.markdown index 22156d763..a6c55f96b 100644 --- a/website/source/docs/providers/openstack/r/fw_rule_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/fw_rule_v1.html.markdown @@ -88,3 +88,11 @@ The following attributes are exported: * `destination_port` - See Argument Reference above. * `enabled` - See Argument Reference above. * `tenant_id` - See Argument Reference above. + +## Import + +Firewall Rules can be imported using the `id`, e.g. + +``` +terraform import openstack_fw_rule_v1.rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327 +``` diff --git a/website/source/docs/providers/openstack/r/lb_member_v1.html.markdown b/website/source/docs/providers/openstack/r/lb_member_v1.html.markdown index e4d1f303c..d11366d6a 100644 --- a/website/source/docs/providers/openstack/r/lb_member_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/lb_member_v1.html.markdown @@ -56,3 +56,11 @@ The following attributes are exported: * `admin_state_up` - See Argument Reference above. * `weight` - The load balancing weight of the member. This is currently unable to be set through Terraform. + +## Import + +Load Balancer Members can be imported using the `id`, e.g. + +``` +terraform import openstack_lb_member_v1.member_1 a7498676-4fe4-4243-a864-2eaaf18c73df +``` diff --git a/website/source/docs/providers/openstack/r/lb_monitor_v1.html.markdown b/website/source/docs/providers/openstack/r/lb_monitor_v1.html.markdown index cbf6b2b87..e210ad3d9 100644 --- a/website/source/docs/providers/openstack/r/lb_monitor_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/lb_monitor_v1.html.markdown @@ -80,3 +80,11 @@ The following attributes are exported: * `expected_codes` - See Argument Reference above. * `admin_state_up` - See Argument Reference above. * `tenant_id` - See Argument Reference above. + +## Import + +Load Balancer Members can be imported using the `id`, e.g. + +``` +terraform import openstack_lb_monitor_v1.monitor_1 119d7530-72e9-449a-aa97-124a5ef1992c +``` diff --git a/website/source/docs/providers/openstack/r/lb_pool_v1.html.markdown b/website/source/docs/providers/openstack/r/lb_pool_v1.html.markdown index c1439421d..cab6e9d5b 100644 --- a/website/source/docs/providers/openstack/r/lb_pool_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/lb_pool_v1.html.markdown @@ -178,3 +178,11 @@ The following attributes are exported: ## Notes The `member` block is deprecated in favor of the `openstack_lb_member_v1` resource. + +## Import + +Load Balancer Pools can be imported using the `id`, e.g. + +``` +terraform import openstack_lb_pool_v1.pool_1 b255e6ba-02ad-43e6-8951-3428ca26b713 +``` diff --git a/website/source/docs/providers/openstack/r/lb_vip_v1.html.markdown b/website/source/docs/providers/openstack/r/lb_vip_v1.html.markdown index 178806be7..8e1d64561 100644 --- a/website/source/docs/providers/openstack/r/lb_vip_v1.html.markdown +++ b/website/source/docs/providers/openstack/r/lb_vip_v1.html.markdown @@ -98,3 +98,11 @@ The following attributes are exported: * `floating_ip` - See Argument Reference above. * `admin_state_up` - See Argument Reference above. * `port_id` - Port UUID for this VIP at associated floating IP (if any). + +## Import + +Load Balancer VIPs can be imported using the `id`, e.g. + +``` +terraform import openstack_lb_vip_v1.vip_1 50e16b26-89c1-475e-a492-76167182511e +``` diff --git a/website/source/docs/providers/openstack/r/networking_floatingip_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_floatingip_v2.html.markdown index 2813c815e..6106f2d19 100644 --- a/website/source/docs/providers/openstack/r/networking_floatingip_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_floatingip_v2.html.markdown @@ -17,7 +17,6 @@ but only compute floating IPs can be used with compute instances. ``` resource "openstack_networking_floatingip_v2" "floatip_1" { - region = "" pool = "public" } ``` @@ -56,3 +55,11 @@ The following attributes are exported: * `port_id` - ID of associated port. * `tenant_id` - the ID of the tenant in which to create the floating IP. * `fixed_ip` - The fixed IP which the floating IP maps to. + +## Import + +Floating IPs can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_floatingip_v2.floatip_1 2c7f39f3-702b-48d1-940c-b50384177ee1 +``` diff --git a/website/source/docs/providers/openstack/r/networking_network_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_network_v2.html.markdown index 27c3b4868..5ce7dcec5 100644 --- a/website/source/docs/providers/openstack/r/networking_network_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_network_v2.html.markdown @@ -91,3 +91,11 @@ The following attributes are exported: * `shared` - See Argument Reference above. * `tenant_id` - See Argument Reference above. * `admin_state_up` - See Argument Reference above. + +## Import + +Networks can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_network_v2.network_1 d90ce693-5ccf-4136-a0ed-152ce412b6b9 +``` diff --git a/website/source/docs/providers/openstack/r/networking_port_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_port_v2.html.markdown index 6215951b0..4b8134b38 100644 --- a/website/source/docs/providers/openstack/r/networking_port_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_port_v2.html.markdown @@ -86,6 +86,14 @@ The following attributes are exported: * `device_id` - See Argument Reference above. * `fixed_ip/ip_address` - See Argument Reference above. +## Import + +Ports can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_port_v2.port_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1 +``` + ## Notes ### Ports and Instances diff --git a/website/source/docs/providers/openstack/r/networking_router_interface_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_router_interface_v2.html.markdown index 13046d64d..80c698ae2 100644 --- a/website/source/docs/providers/openstack/r/networking_router_interface_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_router_interface_v2.html.markdown @@ -25,13 +25,11 @@ resource "openstack_networking_subnet_v2" "subnet_1" { } resource "openstack_networking_router_v2" "router_1" { - region = "" name = "my_router" external_gateway = "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f" } resource "openstack_networking_router_interface_v2" "router_interface_1" { - region = "" router_id = "${openstack_networking_router_v2.router_1.id}" subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}" } diff --git a/website/source/docs/providers/openstack/r/networking_router_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_router_v2.html.markdown index 5540adb62..7c4e36a7e 100644 --- a/website/source/docs/providers/openstack/r/networking_router_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_router_v2.html.markdown @@ -14,7 +14,6 @@ Manages a V2 router resource within OpenStack. ``` resource "openstack_networking_router_v2" "router_1" { - region = "" name = "my_router" external_gateway = "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f" } diff --git a/website/source/docs/providers/openstack/r/networking_secgroup_rule_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_secgroup_rule_v2.html.markdown index e80ac6cf1..b0c4e7b3f 100644 --- a/website/source/docs/providers/openstack/r/networking_secgroup_rule_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_secgroup_rule_v2.html.markdown @@ -87,3 +87,11 @@ The following attributes are exported: * `remote_group_id` - See Argument Reference above. * `security_group_id` - See Argument Reference above. * `tenant_id` - See Argument Reference above. + +## Import + +Security Group Rules can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_secgroup_rule_v2.secgroup_rule_1 aeb68ee3-6e9d-4256-955c-9584a6212745 +``` diff --git a/website/source/docs/providers/openstack/r/networking_secgroup_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_secgroup_v2.html.markdown index ca49e4b66..b964c2934 100644 --- a/website/source/docs/providers/openstack/r/networking_secgroup_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_secgroup_v2.html.markdown @@ -48,3 +48,11 @@ The following attributes are exported: * `name` - See Argument Reference above. * `description` - See Argument Reference above. * `tenant_id` - See Argument Reference above. + +## Import + +Security Groups can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_secgroup_v2.secgroup_1 38809219-5e8a-4852-9139-6f461c90e8bc +``` diff --git a/website/source/docs/providers/openstack/r/networking_subnet_v2.html.markdown b/website/source/docs/providers/openstack/r/networking_subnet_v2.html.markdown index d32d3d6cd..a990d2e96 100644 --- a/website/source/docs/providers/openstack/r/networking_subnet_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/networking_subnet_v2.html.markdown @@ -100,3 +100,11 @@ The following attributes are exported: * `enable_dhcp` - See Argument Reference above. * `dns_nameservers` - See Argument Reference above. * `host_routes` - See Argument Reference above. + +## Import + +Subnets can be imported using the `id`, e.g. + +``` +terraform import openstack_networking_subnet_v2.subnet_1 da4faf16-5546-41e4-8330-4d0002b74048 +```