sacloud / terraform-provider-sakuracloud

Terraform provider for SakuraCloud
https://docs.usacloud.jp/terraform
Apache License 2.0
71 stars 23 forks source link

ウェブアクセラレータ ACL機能 #1166

Closed yamamoto-febc closed 5 months ago

yamamoto-febc commented 5 months ago

ウェブアクセラレータのACL機能への対応

利用例

data sakuracloud_webaccel "site" {
  name = "your-site-name"
}

resource sakuracloud_webaccel_acl "acl" {
  site_id = data.sakuracloud_webaccel.site.id

  acl = join("\n", [
    "deny 192.0.2.5/25",
    "deny 198.51.100.0",
    "allow all",
  ])
}

テスト結果

$ SAKURACLOUD_WEBACCEL_SITE_NAME="xxx" TESTARGS="-run=TestAccResourceSakuraCloudWebAccelACL_basic" make testacc
running 'go test' with TESTACC=1...
TF_ACC=1 SAKURACLOUD_APPEND_USER_AGENT="(Acceptance Test)" go test -v -run=TestAccResourceSakuraCloudWebAccelACL_basic -timeout 240m ./...
?       github.com/sacloud/terraform-provider-sakuracloud   [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/internal/defaults [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/internal/desc [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/internal/ftps [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/tools/hash    [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/tools/tfdocgen/cmd/gen-sakuracloud-docs   [no test files]
?       github.com/sacloud/terraform-provider-sakuracloud/version   [no test files]
=== RUN   TestAccResourceSakuraCloudWebAccelACL_basic
=== PAUSE TestAccResourceSakuraCloudWebAccelACL_basic
=== CONT  TestAccResourceSakuraCloudWebAccelACL_basic
--- PASS: TestAccResourceSakuraCloudWebAccelACL_basic (5.96s)
PASS
ok      github.com/sacloud/terraform-provider-sakuracloud/sakuracloud   6.500s