diff --git a/examples/data-sources/edgecenter_laas_hosts/data-source.tf b/examples/data-sources/edgecenter_laas_hosts/data-source.tf deleted file mode 100644 index 4a8e056b..00000000 --- a/examples/data-sources/edgecenter_laas_hosts/data-source.tf +++ /dev/null @@ -1,20 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -data "edgecenter_project" "pr" { - name = "test" -} - -data "edgecenter_region" "rg" { - name = "ED-10 Preprod" -} - -data "edgecenter_laas_hosts" "hosts" { - region_id = data.edgecenter_region.rg.id - project_id = data.edgecenter_project.pr.id -} - -output "view" { - value = data.edgecenter_laas_hosts.hosts -} diff --git a/examples/data-sources/edgecenter_laas_status/data-source.tf b/examples/data-sources/edgecenter_laas_status/data-source.tf deleted file mode 100644 index dd671dc4..00000000 --- a/examples/data-sources/edgecenter_laas_status/data-source.tf +++ /dev/null @@ -1,20 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -data "edgecenter_project" "pr" { - name = "test" -} - -data "edgecenter_region" "rg" { - name = "ED-10 Preprod" -} - -data "edgecenter_laas_status" "status" { - region_id = data.edgecenter_region.rg.id - project_id = data.edgecenter_project.pr.id -} - -output "view" { - value = data.edgecenter_laas_status.status -} diff --git a/examples/resources/edgecenter_cdn_resource/resource.tf b/examples/resources/edgecenter_cdn_resource/resource.tf index 015f68a6..f8cdfb20 100644 --- a/examples/resources/edgecenter_cdn_resource/resource.tf +++ b/examples/resources/edgecenter_cdn_resource/resource.tf @@ -2,6 +2,20 @@ provider "edgecenter" { permanent_api_token = "251$d3361.............1b35f26d8" } +resource "edgecenter_cdn_origingroup" "origin_group_1" { + name = "origin_group_1" + use_next = true + origin { + source = "example.com" + enabled = true + } + origin { + source = "mirror.example.com" + enabled = true + backup = true + } + consistent_balancing = true +} resource "edgecenter_cdn_resource" "cdn_example_com" { cname = "cdn.example.com" diff --git a/examples/resources/edgecenter_faas_function/import.sh b/examples/resources/edgecenter_faas_function/import.sh deleted file mode 100644 index d76f19f7..00000000 --- a/examples/resources/edgecenter_faas_function/import.sh +++ /dev/null @@ -1,2 +0,0 @@ -# import using :: format -terraform import edgecenter_faas_function.test 1:6:ns:test_func \ No newline at end of file diff --git a/examples/resources/edgecenter_faas_function/resource.tf b/examples/resources/edgecenter_faas_function/resource.tf deleted file mode 100644 index 85fc827a..00000000 --- a/examples/resources/edgecenter_faas_function/resource.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -resource "edgecenter_faas_function" "func" { - project_id = 1 - region_id = 1 - name = "testf" - namespace = "ns4test" - description = "function description" - envs = { - BIG = "EXAMPLE2" - } - runtime = "go1.16.6" - code_text = <:: format -terraform import edgecenter_faas_namespace.test 1:6:ns \ No newline at end of file diff --git a/examples/resources/edgecenter_faas_namespace/resource.tf b/examples/resources/edgecenter_faas_namespace/resource.tf deleted file mode 100644 index 332e5624..00000000 --- a/examples/resources/edgecenter_faas_namespace/resource.tf +++ /dev/null @@ -1,14 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -resource "edgecenter_faas_namespace" "ns" { - project_id = 1 - region_id = 1 - name = "testns" - description = "test description" - envs = { - BIG_ENV = "EXAMPLE" - } -} - diff --git a/examples/resources/edgecenter_laas_topic/import.sh b/examples/resources/edgecenter_laas_topic/import.sh deleted file mode 100644 index 6d2ca5ca..00000000 --- a/examples/resources/edgecenter_laas_topic/import.sh +++ /dev/null @@ -1,2 +0,0 @@ -# import using :: format -terraform import edgecenter_laas_topic.test 1:6:test_topic \ No newline at end of file diff --git a/examples/resources/edgecenter_laas_topic/resource.tf b/examples/resources/edgecenter_laas_topic/resource.tf deleted file mode 100644 index 59889161..00000000 --- a/examples/resources/edgecenter_laas_topic/resource.tf +++ /dev/null @@ -1,10 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -resource "edgecenter_laas_topic" "test" { - region_id = 1 - project_id = 1 - - name = "test" -} diff --git a/examples/resources/edgecenter_lbpool/resource.tf b/examples/resources/edgecenter_lbpool/resource.tf index a9d4c4c0..1fbddf58 100644 --- a/examples/resources/edgecenter_lbpool/resource.tf +++ b/examples/resources/edgecenter_lbpool/resource.tf @@ -2,26 +2,34 @@ provider "edgecenter" { permanent_api_token = "251$d3361.............1b35f26d8" } -resource "edgecenter_loadbalancer" "lb" { +resource "edgecenter_loadbalancerv2" "lb" { project_id = 1 region_id = 1 - name = "test1" + name = "test" flavor = "lb1-1-2" - listener { - name = "test" - protocol = "HTTP" - protocol_port = 80 + metadata_map = { + tag1 = "tag1_value" } } +resource "edgecenter_lblistener" "listener" { + project_id = 1 + region_id = 1 + name = "test" + protocol = "TCP" + protocol_port = 36621 + allowed_cidrs = ["127.0.0.0/24", "192.168.0.0/24"] + loadbalancer_id = edgecenter_loadbalancerv2.lb.id +} + resource "edgecenter_lbpool" "pl" { project_id = 1 region_id = 1 name = "test_pool1" protocol = "HTTP" lb_algorithm = "LEAST_CONNECTIONS" - loadbalancer_id = edgecenter_loadbalancer.lb.id - listener_id = edgecenter_loadbalancer.lb.listener.0.id + loadbalancer_id = edgecenter_loadbalancerv2.lb.id + listener_id = edgecenter_lblistener.listener.id health_monitor { type = "PING" delay = 60 diff --git a/examples/resources/edgecenter_storage_sftp/resource.tf b/examples/resources/edgecenter_storage_sftp/resource.tf deleted file mode 100644 index 1921c167..00000000 --- a/examples/resources/edgecenter_storage_sftp/resource.tf +++ /dev/null @@ -1,9 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -resource "edgecenter_storage_sftp" "example_sftp" { - name = "example" - location = "mia" - ssh_key_id = [199] -} diff --git a/examples/resources/edgecenter_storage_sftp_key/resource.tf b/examples/resources/edgecenter_storage_sftp_key/resource.tf deleted file mode 100644 index 2ef1afbe..00000000 --- a/examples/resources/edgecenter_storage_sftp_key/resource.tf +++ /dev/null @@ -1,8 +0,0 @@ -provider "edgecenter" { - permanent_api_token = "251$d3361.............1b35f26d8" -} - -resource "edgecenter_storage_sftp_key" "terraform_test_key" { - name = "terraform_test_key" - key = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSUGPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XAt3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/EnmZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbxNrRFi9wrf+M7Q== schacon@mylaptop.local" -}