diff --git a/.gitignore b/.gitignore index 69a1656a3..ba135242b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ vendor/ # Test exclusions !command/test-fixtures/**/*.tfstate !command/test-fixtures/**/.terraform/ + +examples/*.tfvars \ No newline at end of file diff --git a/docs/resources/csbs_backup_policy_v1.md b/docs/resources/csbs_backup_policy_v1.md index 28a4dd2ec..50df43dab 100644 --- a/docs/resources/csbs_backup_policy_v1.md +++ b/docs/resources/csbs_backup_policy_v1.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_csbs_backup_policy_v1" # flexibleengine_csbs_backup_policy_v1 -Provides an FlexibleEngine Backup Policy of Resources. +Provides a FlexibleEngine Backup Policy of Resources. ## Example Usage diff --git a/docs/resources/csbs_backup_v1.md b/docs/resources/csbs_backup_v1.md index 5b25d4a3b..c375161eb 100644 --- a/docs/resources/csbs_backup_v1.md +++ b/docs/resources/csbs_backup_v1.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_csbs_backup_v1" # flexibleengine_csbs_backup_v1 -Provides an FlexibleEngine Backup of Resources. +Provides a FlexibleEngine Backup of Resources. ## Example Usage diff --git a/docs/resources/rts_stack_v1.md b/docs/resources/rts_stack_v1.md index 22ce1b2a2..0a25eb4d9 100644 --- a/docs/resources/rts_stack_v1.md +++ b/docs/resources/rts_stack_v1.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_rts_stack_v1" # flexibleengine_rts_stack_v1 -Provides an FlexibleEngine Stack. +Provides a FlexibleEngine Stack. ## Example Usage diff --git a/examples/README.md b/examples/README.md index 688a729b1..ccca14b6a 100755 --- a/examples/README.md +++ b/examples/README.md @@ -1,36 +1,63 @@ # FULL Terraform flexibleengine Example This script will create the following resources (if enabled): -* Volumes -* Floating IPs -* Neutron Ports -* Instances + +* VPC +* VPC Subnet * Keypair -* Network -* Subnet -* Router -* Router Interface -* Loadbalancer -* Templates +* Instances * Security Group (Allow ICMP, 80/tcp, 22/tcp) +* Volumes +* EIP +* Loadbalancer +* Backup Policies and Backups + +## Usage -## Resource Creation +This example will, by default not create Volumes. This is to show how to enable resources via parameters. +To enable Volume creation, set the **disk__size_gb** variable to a value > 10. -This example will, by default not create Volumes. This is to show how to enable resources via parameters. To enable Volume creation, set the **disk__size_gb** variable to a value > 10. +Add your variables to a file called **terraform.tfvars** or set them as environment variables. + +```shell +export TF_VAR_access_key=your_access_key +export TF_VAR_secret_key=your_secret_key +export TF_VAR_domain_name=your_domain_name +``` + +Then run the following commands: + +```shell +terraform init +terraform plan +terraform apply +``` + +Observe the output of the apply command, it will show you the external IP address of the loadbalancer. + +##  Destroy + +```shell +terraform destroy +``` + +You can encounter an error when destroying the bucket, this is because the bucket is not empty. You can delet +e the objects manually in the console and run the destroy command again. ## Available Variables ### Required -* **username** (your flexibleengine username) -* **password** (your flexibleengine password) +* **access_key** (your flexibleengine access_key) +* **secret_key** (your flexibleengine secret_key) * **domain_name** (your flexibleengine domain name) * You must have a **ssh_pub_key** file defined, or terraform will complain, see default path below. ### Optional -* **project** (this will prefix all your resources, _default=terraform_) -* **ssh_pub_key** (the path to the ssh public key you want to deploy, _default=~/.ssh/id_rsa.pub_) -* **instance_count** (affects the number of Floating IPs, Instances, Volumes and Ports, _default=1_) -* **flavor_name** (flavor of the created instances, _default=s1.medium_) -* **image_name** (image used for creating instances, _default=Standard_CentOS_7_latest_) -* **disk_size_gb** (size of the volumes in gigabytes, _default=None_) + +* **project** (this will prefix all your resources, *default=terraform*) +* **ssh_pub_key** (the path to the ssh public key you want to deploy, *default=~/.ssh/id_rsa.pub*) +* **instance_count** (affects the number of Floating IPs, Instances, Volumes and Ports, *default=1*) +* **flavor_name** (flavor of the created instances, *default=s6.medium.2*) +* **image_name** (image used for creating instances, *default=OBS Ubuntu 22.04*) +* **disk_size_gb** (size of the volumes in gigabytes, *default=None*) diff --git a/examples/antiddos.tf b/examples/antiddos.tf index 1fab6c7e4..506a886f0 100644 --- a/examples/antiddos.tf +++ b/examples/antiddos.tf @@ -1,20 +1,26 @@ -resource "flexibleengine_vpc_eip_v1" "eip_1" { +resource "flexibleengine_vpc_eip" "eip_1" { publicip { type = "5_bgp" } bandwidth { - name = "test" - size = 8 - share_type = "PER" + name = "test" + size = 8 + share_type = "PER" charge_mode = "traffic" } } +resource "flexibleengine_vpc_eip_associate" "associated" { + public_ip = flexibleengine_vpc_eip.eip_1.address + fixed_ip = flexibleengine_lb_loadbalancer_v2.loadbalancer.vip_address + network_id = flexibleengine_vpc_subnet_v1.subnet.id +} + resource "flexibleengine_antiddos_v1" "antiddos_1" { - floating_ip_id = "${flexibleengine_vpc_eip_v1.eip_1.id}" - enable_l7 = true - traffic_pos_id = 1 - http_request_pos_id = 2 + floating_ip_id = flexibleengine_vpc_eip.eip_1.id + enable_l7 = true + traffic_pos_id = 1 + http_request_pos_id = 2 cleaning_access_pos_id = 1 - app_type_id = 0 -} \ No newline at end of file + app_type_id = 0 +} diff --git a/examples/csbs_backup.tf b/examples/csbs_backup.tf index 6d7a09c56..5bcb88c14 100644 --- a/examples/csbs_backup.tf +++ b/examples/csbs_backup.tf @@ -1,5 +1,6 @@ -resource "flexibleengine_csbs_backup_v1" "backup_v1" { - backup_name = "${var.project}-backup" - resource_id = "${flexibleengine_compute_instance_v2.webserver.id}" - resource_type = "OS::Nova::Server" -} \ No newline at end of file +# resource "flexibleengine_csbs_backup_v1" "backup_v1" { +# count = var.instance_count +# backup_name = "${var.project}-${flexibleengine_compute_instance_v2.webserver.*.name[count.index]}-backup" +# resource_id = flexibleengine_compute_instance_v2.webserver.*.id[count.index] +# resource_type = "OS::Nova::Server" +# } diff --git a/examples/csbs_backup_policy.tf b/examples/csbs_backup_policy.tf index 7b6b7dd63..c6d040bcf 100644 --- a/examples/csbs_backup_policy.tf +++ b/examples/csbs_backup_policy.tf @@ -1,16 +1,20 @@ resource "flexibleengine_csbs_backup_policy_v1" "backup_policy_v1" { - name = "${var.project}-policy" - resource { - id = "${flexibleengine_compute_instance_v2.webserver.id}" - type = "OS::Nova::Server" - name = "resource1" + name = "${var.project}-csbs-policy" + dynamic "resource" { + for_each = flexibleengine_compute_instance_v2.webserver.*.id + content { + id = resource.value + type = "OS::Nova::Server" + name = flexibleengine_compute_instance_v2.webserver.*.name[resource.key] + } } + scheduled_operation { - name = "mybackup" - enabled = true - description = "My backup policy" - operation_type = "backup" - max_backups = 2 - trigger_pattern = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nRRULE:FREQ=WEEKLY;BYDAY=TH;BYHOUR=12;BYMINUTE=27\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" + name = "mybackup" + enabled = true + description = "My backup policy" + operation_type = "backup" + max_backups = 2 + trigger_pattern = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nRRULE:FREQ=WEEKLY;BYDAY=TH;BYHOUR=12;BYMINUTE=27\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" } } diff --git a/examples/cts_tracker.tf b/examples/cts_tracker.tf index ee4560457..9c2afc125 100644 --- a/examples/cts_tracker.tf +++ b/examples/cts_tracker.tf @@ -1,18 +1,20 @@ +resource "random_string" "bucket" { + length = 16 + upper = false + override_special = "-" +} + resource "flexibleengine_s3_bucket" "bucket" { - bucket = "tf-test-bucket" - acl = "public-read" + bucket = "${var.project}-${random_string.bucket.result}-bucket" + acl = "public-read" } + resource "flexibleengine_smn_topic_v2" "topic_1" { - name = "topic_check" - display_name = "The display name of topic_1" + name = "topic_check" + display_name = "The display name of topic_1" } resource "flexibleengine_cts_tracker_v1" "tracker_v1" { - bucket_name = "${flexibleengine_s3_bucket.bucket.bucket}" - file_prefix_name = "yO8Q" - is_support_smn = true - topic_id = "${flexibleengine_smn_topic_v2.topic_1.id}" - is_send_all_key_operation = false - operations = ["delete","create","login"] - need_notify_user_list = ["user1"] -} \ No newline at end of file + bucket_name = flexibleengine_s3_bucket.bucket.bucket + file_prefix_name = "yO8Q" +} diff --git a/examples/instances.tf b/examples/instances.tf index f48c94069..53d8005e3 100755 --- a/examples/instances.tf +++ b/examples/instances.tf @@ -1,20 +1,21 @@ resource "flexibleengine_compute_instance_v2" "webserver" { - count = "${var.instance_count}" - name = "${var.project}-webserver${format("%02d", count.index+1)}" - image_name = "${var.image_name}" - flavor_name = "${var.flavor_name}" - key_pair = "${flexibleengine_compute_keypair_v2.keypair.name}" + count = var.instance_count + name = "${var.project}-webserver${format("%02d", count.index + 1)}" + image_name = var.image_name + flavor_name = var.flavor_name + key_pair = flexibleengine_compute_keypair_v2.keypair.name + user_data = "#cloud-config\npackage_update: true\npackages: ['nginx-light']\n" security_groups = [ - "${flexibleengine_compute_secgroup_v2.secgrp_web.name}" + "${flexibleengine_networking_secgroup_v2.secgrp_web.name}" ] network { - uuid = "${flexibleengine_networking_network_v2.network.id}" + uuid = flexibleengine_vpc_subnet_v1.subnet.id } } resource "flexibleengine_compute_volume_attach_v2" "volume_attach" { - count = "${var.disk_size_gb > 0 ? var.instance_count : 0}" - instance_id = "${element(flexibleengine_compute_instance_v2.webserver.*.id, count.index)}" - volume_id = "${element(flexibleengine_blockstorage_volume_v2.volume.*.id, count.index)}" + count = var.disk_size_gb > 0 ? var.instance_count : 0 + instance_id = element(flexibleengine_compute_instance_v2.webserver.*.id, count.index) + volume_id = element(flexibleengine_blockstorage_volume_v2.volume.*.id, count.index) } diff --git a/examples/keypairs.tf b/examples/keypairs.tf index 9d3b284a1..310aacb0a 100755 --- a/examples/keypairs.tf +++ b/examples/keypairs.tf @@ -1,5 +1,4 @@ resource "flexibleengine_compute_keypair_v2" "keypair" { - count = "${var.instance_count}" name = "${var.project}-terraform_key" - public_key = "${file("${var.ssh_pub_key}")}" + public_key = file("${var.ssh_pub_key}") } diff --git a/examples/loadbalancer.tf b/examples/loadbalancer.tf index c5ca2c1d4..55e55f579 100755 --- a/examples/loadbalancer.tf +++ b/examples/loadbalancer.tf @@ -1,39 +1,33 @@ resource "flexibleengine_lb_loadbalancer_v2" "loadbalancer" { - count = "${var.instance_count}" name = "${var.project}-loadbalancer" - vip_subnet_id = "${flexibleengine_networking_subnet_v2.subnet.id}" + vip_subnet_id = flexibleengine_vpc_subnet_v1.subnet.ipv4_subnet_id admin_state_up = "true" - depends_on = ["flexibleengine_networking_router_interface_v2.interface"] + depends_on = [flexibleengine_vpc_subnet_v1.subnet] } resource "flexibleengine_lb_listener_v2" "listener" { - name = "${var.project}-listener" - count = "${var.instance_count}" - protocol = "HTTP" - protocol_port = 80 - loadbalancer_id = "${flexibleengine_lb_loadbalancer_v2.loadbalancer.id}" - admin_state_up = "true" - #connection_limit = "-1" + name = "${var.project}-listener" + protocol = "HTTP" + protocol_port = 80 + loadbalancer_id = flexibleengine_lb_loadbalancer_v2.loadbalancer.id } resource "flexibleengine_lb_pool_v2" "pool" { protocol = "HTTP" - count = "${var.instance_count}" lb_method = "ROUND_ROBIN" - listener_id = "${flexibleengine_lb_listener_v2.listener.id}" + listener_id = flexibleengine_lb_listener_v2.listener.id } resource "flexibleengine_lb_member_v2" "member" { - count = "${var.instance_count}" - address = "${element(flexibleengine_compute_instance_v2.webserver.*.access_ip_v4, count.index)}" - pool_id = "${flexibleengine_lb_pool_v2.pool.id}" - subnet_id = "${flexibleengine_networking_subnet_v2.subnet.id}" + count = var.instance_count + address = element(flexibleengine_compute_instance_v2.webserver.*.access_ip_v4, count.index) + pool_id = flexibleengine_lb_pool_v2.pool.id + subnet_id = flexibleengine_vpc_subnet_v1.subnet.ipv4_subnet_id protocol_port = 80 } resource "flexibleengine_lb_monitor_v2" "monitor" { - pool_id = "${flexibleengine_lb_pool_v2.pool.id}" - count = "${var.instance_count}" + pool_id = flexibleengine_lb_pool_v2.pool.id type = "HTTP" url_path = "/" expected_codes = "200" diff --git a/examples/network.tf b/examples/network.tf index deb230ad0..a283a7533 100755 --- a/examples/network.tf +++ b/examples/network.tf @@ -1,14 +1,13 @@ -resource "flexibleengine_networking_network_v2" "network" { - count = "${var.instance_count}" - name = "${var.project}-network" - admin_state_up = "true" +resource "flexibleengine_vpc_v1" "vpc" { + name = "${var.project}-vpc" + cidr = var.vpc_cidr } -resource "flexibleengine_networking_subnet_v2" "subnet" { - name = "${var.project}-subnet" - count = "${var.instance_count}" - network_id = "${flexibleengine_networking_network_v2.network.id}" - cidr = "${var.subnet_cidr}" - ip_version = 4 - dns_nameservers = ["8.8.8.8", "8.8.4.4"] +resource "flexibleengine_vpc_subnet_v1" "subnet" { + name = "${var.project}-subnet" + cidr = var.subnet_cidr + gateway_ip = var.gateway_ip + vpc_id = flexibleengine_vpc_v1.vpc.id + dns_list = ["1.1.1.1", "9.9.9.9"] + } diff --git a/examples/outputs.tf b/examples/outputs.tf new file mode 100644 index 000000000..adf702f65 --- /dev/null +++ b/examples/outputs.tf @@ -0,0 +1,3 @@ +output "webserver_url" { + value = "http://${flexibleengine_vpc_eip.eip_1.address}/" +} diff --git a/examples/provider.tf b/examples/provider.tf index c79fe6e0d..da596fb94 100755 --- a/examples/provider.tf +++ b/examples/provider.tf @@ -1,7 +1,22 @@ +terraform { + required_providers { + flexibleengine = { + source = "FlexibleEngineCloud/flexibleengine" + version = "1.35.1" + } + random = { + source = "hashicorp/random" + } + } +} + + +provider "random" {} + provider "flexibleengine" { - user_name = "${var.username}" - password = "${var.password}" - tenant_name = "${var.tenant_name}" - domain_name = "${var.domain_name}" - auth_url = "${var.endpoint}" + access_key = var.access_key + secret_key = var.secret_key + tenant_name = var.tenant_name + domain_name = var.domain_name + region = var.region } diff --git a/examples/router.tf b/examples/router.tf deleted file mode 100755 index b56f98aed..000000000 --- a/examples/router.tf +++ /dev/null @@ -1,13 +0,0 @@ -resource "flexibleengine_networking_router_v2" "router" { - count = "${var.instance_count}" - name = "${var.project}-router" - admin_state_up = "true" - external_gateway = "0a2228f2-7f8a-45f1-8e09-9039e1d09975" -} - -resource "flexibleengine_networking_router_interface_v2" "interface" { - count = "${var.instance_count}" - router_id = "${flexibleengine_networking_router_v2.router.id}" - subnet_id = "${flexibleengine_networking_subnet_v2.subnet.id}" -} - diff --git a/examples/secgroups.tf b/examples/secgroups.tf index 0c16989af..6a8ce2568 100755 --- a/examples/secgroups.tf +++ b/examples/secgroups.tf @@ -1,26 +1,32 @@ -resource "flexibleengine_compute_secgroup_v2" "secgrp_web" { - count = "${var.instance_count}" +resource "flexibleengine_networking_secgroup_v2" "secgrp_web" { name = "${var.project}-secgrp-web-elb" description = "Webserver Security Group" +} - rule { - from_port = 22 - to_port = 22 - ip_protocol = "tcp" - cidr = "0.0.0.0/0" - } +resource "flexibleengine_networking_secgroup_rule_v2" "secgrp_web_rule_1" { + security_group_id = flexibleengine_networking_secgroup_v2.secgrp_web.id + direction = "ingress" + ethertype = "IPv4" + protocol = "tcp" + remote_ip_prefix = "0.0.0.0/0" + port_range_min = 22 + port_range_max = 22 +} - rule { - from_port = 80 - to_port = 80 - ip_protocol = "tcp" - cidr = "0.0.0.0/0" - } +resource "flexibleengine_networking_secgroup_rule_v2" "secgrp_web_rule_2" { + security_group_id = flexibleengine_networking_secgroup_v2.secgrp_web.id + direction = "ingress" + ethertype = "IPv4" + protocol = "tcp" + remote_ip_prefix = "0.0.0.0/0" + port_range_min = 80 + port_range_max = 80 +} - rule { - from_port = -1 - to_port = -1 - ip_protocol = "icmp" - cidr = "0.0.0.0/0" - } +resource "flexibleengine_networking_secgroup_rule_v2" "secgrp_web_rule_3" { + security_group_id = flexibleengine_networking_secgroup_v2.secgrp_web.id + direction = "ingress" + ethertype = "IPv4" + protocol = "icmp" + remote_ip_prefix = "0.0.0.0/0" } diff --git a/examples/variables.tf b/examples/variables.tf index dfd7e73c8..d72dd1e50 100755 --- a/examples/variables.tf +++ b/examples/variables.tf @@ -1,12 +1,12 @@ ### FlexibleEngine Credentials -variable "username" { +variable "access_key" { # If you don't fill this in, you will be prompted for it - #default = "your_username" + #default = "your_access_key" } -variable "password" { +variable "secret_key" { # If you don't fill this in, you will be prompted for it - #default = "your_password' + #default = "your_secret_key' } variable "domain_name" { @@ -18,13 +18,8 @@ variable "tenant_name" { default = "eu-west-0" } -variable "endpoint" { - default = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" -} - -### OTC Specific Settings -variable "external_network" { - default = "admin_external_net" +variable "region" { + default = "eu-west-0" } ### Project Settings @@ -32,21 +27,20 @@ variable "project" { default = "terraform" } -variable "subnet_cidr" { +variable "vpc_cidr" { default = "192.168.10.0/24" } -variable "ssh_pub_key" { - default = "~/.ssh/id_rsa.pub" +variable "subnet_cidr" { + default = "192.168.10.0/24" } -### DNS Settings -variable "dnszone" { - default = "" +variable "gateway_ip" { + default = "192.168.10.1" } -variable "dnsname" { - default = "webserver" +variable "ssh_pub_key" { + default = "~/.ssh/id_rsa.pub" } ### VM (Instance) Settings @@ -59,9 +53,9 @@ variable "disk_size_gb" { } variable "flavor_name" { - default = "s1.medium" + default = "s6.medium.2" } variable "image_name" { - default = "Standard_CentOS_7_latest" + default = "OBS Ubuntu 22.04" } diff --git a/examples/vbs.tf b/examples/vbs.tf index 4a29b8210..288fed7b4 100644 --- a/examples/vbs.tf +++ b/examples/vbs.tf @@ -1,31 +1,21 @@ resource "flexibleengine_vbs_backup_policy_v2" "vbs" { - name = "${var.project}-backup-policy${format("%02d", count.index+1)}" - start_time = "12:00" - status = "ON" + name = "${var.project}-vbs-policy" + start_time = "12:00" + status = "ON" retain_first_backup = "N" - rentention_num = 2 - frequency = 1 -} - -data "flexibleengine_vbs_backup_policy_v2" "policies" { - id = "${flexibleengine_vbs_backup_policy_v2.vbs.id}" + rentention_num = 2 + frequency = 1 + resources = flexibleengine_blockstorage_volume_v2.volume.*.id } resource "flexibleengine_blockstorage_volume_v2" "volume" { - count = "${var.disk_size_gb > 0 ? var.instance_count : 0}" - name = "${var.project}-disk${format("%02d", count.index+1)}" - size = "${var.disk_size_gb}" - tags { - foo = "bar" - key = "value" - } -} - -resource "flexibleengine_vbs_backup_v2" "backups_1" { - volume_id = "${flexibleengine_blockstorage_volume_v2.volume.id}" - name = "${var.project}-backup${format("%02d", count.index+1)}" + count = var.disk_size_gb > 0 ? var.instance_count : 0 + name = "${var.project}-disk${format("%02d", count.index + 1)}" + size = var.disk_size_gb } -data "flexibleengine_vbs_backup_v2" "backups" { - id = "${flexibleengine_vbs_backup_v2.backups_1.id}" -} \ No newline at end of file +# resource "flexibleengine_vbs_backup_v2" "backups_1" { +# count = var.disk_size_gb > 0 ? var.instance_count : 0 +# volume_id = flexibleengine_blockstorage_volume_v2.volume.*.id[count.index] +# name = "${var.project}-${flexibleengine_blockstorage_volume_v2.volume.*.name[count.index]}-backup" +# } diff --git a/examples/volumes.tf b/examples/volumes.tf deleted file mode 100755 index ba69705ce..000000000 --- a/examples/volumes.tf +++ /dev/null @@ -1,5 +0,0 @@ -resource "flexibleengine_blockstorage_volume_v2" "volume" { - count = "${var.disk_size_gb > 0 ? var.instance_count : 0}" - name = "${var.project}-disk${format("%02d", count.index+1)}" - size = "${var.disk_size_gb}" -} diff --git a/flexibleengine/compute_bms_v2_server_addresses.go b/flexibleengine/compute_bms_v2_server_addresses.go index c3a7fe63f..1b52e267e 100644 --- a/flexibleengine/compute_bms_v2_server_addresses.go +++ b/flexibleengine/compute_bms_v2_server_addresses.go @@ -1,5 +1,5 @@ // This set of code handles all functions required to configure addresses -// on an flexibleengine_compute_bms_server_v2 datasource. +// on a flexibleengine_compute_bms_server_v2 datasource. // // This is a complicated task because it's not possible to obtain all // information in a single API call. In fact, it even traverses multiple @@ -53,7 +53,7 @@ type ServerNetwork struct { // This would be simple, except we have ensure both the network name and // network ID have been determined. This isn't just for the convenience of a // user specifying a human-readable network name, but the network information -// returned by an Flexibleengine instance only has the network name set! So if a +// returned by a Flexibleengine instance only has the network name set! So if a // user specified a network ID, there's no way to correlate it to the instance // unless we know both the name and ID. // diff --git a/flexibleengine/compute_instance_v2_networking.go b/flexibleengine/compute_instance_v2_networking.go index 1dfc881d7..2c79b7f4f 100644 --- a/flexibleengine/compute_instance_v2_networking.go +++ b/flexibleengine/compute_instance_v2_networking.go @@ -1,5 +1,5 @@ // This set of code handles all functions required to configure networking -// on an flexibleengine_compute_instance_v2 resource. +// on a flexibleengine_compute_instance_v2 resource. // // This is a complicated task because it's not possible to obtain all // information in a single API call. In fact, it even traverses multiple diff --git a/flexibleengine/compute_util.go b/flexibleengine/compute_util.go index 01a0e9afc..1745de55e 100644 --- a/flexibleengine/compute_util.go +++ b/flexibleengine/compute_util.go @@ -235,7 +235,7 @@ func setBMSImageInfo(client *golangsdk.ServiceClient, server *bms.Server, d *sch } // computeV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an FlexibleEngine instance. +// a FlexibleEngine instance. func computeV2StateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc { return func() (interface{}, string, error) { s, err := servers.Get(client, instanceID).Extract() diff --git a/flexibleengine/resource_flexibleengine_blockstorage_volume_v2.go b/flexibleengine/resource_flexibleengine_blockstorage_volume_v2.go index f7754d957..8f0c57b77 100644 --- a/flexibleengine/resource_flexibleengine_blockstorage_volume_v2.go +++ b/flexibleengine/resource_flexibleengine_blockstorage_volume_v2.go @@ -404,7 +404,7 @@ func resourceVolumeMetadataV2(d *schema.ResourceData) map[string]string { } // VolumeV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an FlexibleEngine volume. +// a FlexibleEngine volume. func VolumeV2StateRefreshFunc(client *golangsdk.ServiceClient, volumeID string) resource.StateRefreshFunc { return func() (interface{}, string, error) { v, err := volumes.Get(client, volumeID).Extract() diff --git a/flexibleengine/value_specs.go b/flexibleengine/value_specs.go index 0345cbb03..86ab981b4 100644 --- a/flexibleengine/value_specs.go +++ b/flexibleengine/value_specs.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -// FirewallGroup is an FlexibleEngine firewall group. +// FirewallGroup is a FlexibleEngine firewall group. type FirewallGroup struct { firewall_groups.FirewallGroup routerinsertion.FirewallGroupExt