diff --git a/examples/go.mod b/examples/go.mod index 07f5db8c..7d61c672 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-fastly/examples/v7 go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.124.0 +require github.com/pulumi/pulumi/pkg/v3 v3.126.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.9.1 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.124.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index ddb55172..8ef90117 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -342,10 +342,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/pkg/v3 v3.124.0 h1:JgUePx6Ga9geBJ1dku6K8GXTrsBYzXMhKIsk+cxeKo8= -github.com/pulumi/pulumi/pkg/v3 v3.124.0/go.mod h1:/XUDPNoIikS3lcQe1HpGuKs73cO5HqBvOdxXFeC3UHM= -github.com/pulumi/pulumi/sdk/v3 v3.124.0 h1:f9Rb2AhLSaacKTaBPbKXPCfviHxTuhEXafhT4E095Y0= -github.com/pulumi/pulumi/sdk/v3 v3.124.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= +github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= +github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= +github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/provider/cmd/pulumi-resource-fastly/schema.json b/provider/cmd/pulumi-resource-fastly/schema.json index d57a4f74..340ee87d 100644 --- a/provider/cmd/pulumi-resource-fastly/schema.json +++ b/provider/cmd/pulumi-resource-fastly/schema.json @@ -6818,7 +6818,7 @@ } }, "fastly:index/serviceWafConfiguration:ServiceWafConfiguration": { - "description": "Defines a set of Web Application Firewall configuration options that can be used to populate a service WAF. This resource will configure rules, thresholds and other settings for a WAF.\n\n\n\u003e **Warning:** This provider will take precedence over any changes you make in the UI or API. Such changes are likely to be reversed if you run the provider again.\n\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rules:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n rules: [{\n modsecRuleId: 1010090,\n revision: 1,\n status: \"log\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100,\n rules=[fastly.ServiceWafConfigurationRuleArgs(\n modsec_rule_id=1010090,\n revision=1,\n status=\"log\",\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n Rules = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleArgs\n {\n ModsecRuleId = 1010090,\n Revision = 1,\n Status = \"log\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t\tRules: fastly.ServiceWafConfigurationRuleArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleArgs{\n\t\t\t\t\tModsecRuleId: pulumi.Int(1010090),\n\t\t\t\t\tRevision: pulumi.Int(1),\n\t\t\t\t\tStatus: pulumi.String(\"log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .rules(ServiceWafConfigurationRuleArgs.builder()\n .modsecRuleId(1010090)\n .revision(1)\n .status(\"log\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n rules:\n - modsecRuleId: 1.01009e+06\n revision: 1\n status: log\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rule exclusions:\n\n\u003e **Warning:** Rule exclusions are part of a **beta release**, which may be subject to breaking changes and improvements over time. For more information, see our [product and feature lifecycle](https://docs.fastly.com/products/fastly-product-lifecycle#beta) descriptions.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n rules: [{\n modsecRuleId: 2029718,\n revision: 1,\n status: \"log\",\n }],\n ruleExclusions: [{\n name: \"index page\",\n exclusionType: \"rule\",\n condition: \"req.url.basename == \\\"index.html\\\"\",\n modsecRuleIds: [2029718],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100,\n rules=[fastly.ServiceWafConfigurationRuleArgs(\n modsec_rule_id=2029718,\n revision=1,\n status=\"log\",\n )],\n rule_exclusions=[fastly.ServiceWafConfigurationRuleExclusionArgs(\n name=\"index page\",\n exclusion_type=\"rule\",\n condition=\"req.url.basename == \\\"index.html\\\"\",\n modsec_rule_ids=[2029718],\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n Rules = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleArgs\n {\n ModsecRuleId = 2029718,\n Revision = 1,\n Status = \"log\",\n },\n },\n RuleExclusions = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleExclusionArgs\n {\n Name = \"index page\",\n ExclusionType = \"rule\",\n Condition = \"req.url.basename == \\\"index.html\\\"\",\n ModsecRuleIds = new[]\n {\n 2029718,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t\tRules: fastly.ServiceWafConfigurationRuleArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleArgs{\n\t\t\t\t\tModsecRuleId: pulumi.Int(2029718),\n\t\t\t\t\tRevision: pulumi.Int(1),\n\t\t\t\t\tStatus: pulumi.String(\"log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRuleExclusions: fastly.ServiceWafConfigurationRuleExclusionArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleExclusionArgs{\n\t\t\t\t\tName: pulumi.String(\"index page\"),\n\t\t\t\t\tExclusionType: pulumi.String(\"rule\"),\n\t\t\t\t\tCondition: pulumi.String(\"req.url.basename == \\\"index.html\\\"\"),\n\t\t\t\t\tModsecRuleIds: pulumi.IntArray{\n\t\t\t\t\t\tpulumi.Int(2029718),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleExclusionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .rules(ServiceWafConfigurationRuleArgs.builder()\n .modsecRuleId(2029718)\n .revision(1)\n .status(\"log\")\n .build())\n .ruleExclusions(ServiceWafConfigurationRuleExclusionArgs.builder()\n .name(\"index page\")\n .exclusionType(\"rule\")\n .condition(\"req.url.basename == \\\"index.html\\\"\")\n .modsecRuleIds(2029718)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n rules:\n - modsecRuleId: 2.029718e+06\n revision: 1\n status: log\n ruleExclusions:\n - name: index page\n exclusionType: rule\n condition: req.url.basename == \"index.html\"\n modsecRuleIds:\n - 2.029718e+06\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rules from data source:\n\n## Import\n\nThis is an example of the import command being applied to the resource named `fastly_service_waf_configuration.waf`\n\nThe resource ID should be the WAF ID.\n\n```sh\n$ pulumi import fastly:index/serviceWafConfiguration:ServiceWafConfiguration waf xxxxxxxxxxxxxxxxxxxx\n```\n\n", + "description": "Defines a set of Web Application Firewall configuration options that can be used to populate a service WAF. This resource will configure rules, thresholds and other settings for a WAF.\n\n\n\u003e **Warning:** This provider will take precedence over any changes you make in the UI or API. Such changes are likely to be reversed if you run the provider again.\n\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rules:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n rules: [{\n modsecRuleId: 1010090,\n revision: 1,\n status: \"log\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100,\n rules=[fastly.ServiceWafConfigurationRuleArgs(\n modsec_rule_id=1010090,\n revision=1,\n status=\"log\",\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n Rules = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleArgs\n {\n ModsecRuleId = 1010090,\n Revision = 1,\n Status = \"log\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t\tRules: fastly.ServiceWafConfigurationRuleArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleArgs{\n\t\t\t\t\tModsecRuleId: pulumi.Int(1010090),\n\t\t\t\t\tRevision: pulumi.Int(1),\n\t\t\t\t\tStatus: pulumi.String(\"log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .rules(ServiceWafConfigurationRuleArgs.builder()\n .modsecRuleId(1010090)\n .revision(1)\n .status(\"log\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n rules:\n - modsecRuleId: 1.01009e+06\n revision: 1\n status: log\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rule exclusions:\n\n\u003e **Warning:** Rule exclusions are part of a **beta release**, which may be subject to breaking changes and improvements over time. For more information, see our [product and feature lifecycle](https://docs.fastly.com/products/fastly-product-lifecycle#beta) descriptions.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst demo = new fastly.ServiceVcl(\"demo\", {\n name: \"demofastly\",\n domains: [{\n name: \"example.com\",\n comment: \"demo\",\n }],\n backends: [{\n address: \"127.0.0.1\",\n name: \"origin1\",\n port: 80,\n }],\n conditions: [\n {\n name: \"WAF_Prefetch\",\n type: \"PREFETCH\",\n statement: \"req.backend.is_origin\",\n },\n {\n name: \"WAF_always_false\",\n statement: \"false\",\n type: \"REQUEST\",\n },\n ],\n responseObjects: [{\n name: \"WAF_Response\",\n status: 403,\n response: \"Forbidden\",\n contentType: \"text/html\",\n content: \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n requestCondition: \"WAF_always_false\",\n }],\n waf: {\n prefetchCondition: \"WAF_Prefetch\",\n responseObject: \"WAF_Response\",\n },\n forceDestroy: true,\n});\nconst waf = new fastly.ServiceWafConfiguration(\"waf\", {\n wafId: demo.waf.apply(waf =\u003e waf?.wafId),\n httpViolationScoreThreshold: 100,\n rules: [{\n modsecRuleId: 2029718,\n revision: 1,\n status: \"log\",\n }],\n ruleExclusions: [{\n name: \"index page\",\n exclusionType: \"rule\",\n condition: \"req.url.basename == \\\"index.html\\\"\",\n modsecRuleIds: [2029718],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\ndemo = fastly.ServiceVcl(\"demo\",\n name=\"demofastly\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n comment=\"demo\",\n )],\n backends=[fastly.ServiceVclBackendArgs(\n address=\"127.0.0.1\",\n name=\"origin1\",\n port=80,\n )],\n conditions=[\n fastly.ServiceVclConditionArgs(\n name=\"WAF_Prefetch\",\n type=\"PREFETCH\",\n statement=\"req.backend.is_origin\",\n ),\n fastly.ServiceVclConditionArgs(\n name=\"WAF_always_false\",\n statement=\"false\",\n type=\"REQUEST\",\n ),\n ],\n response_objects=[fastly.ServiceVclResponseObjectArgs(\n name=\"WAF_Response\",\n status=403,\n response=\"Forbidden\",\n content_type=\"text/html\",\n content=\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n request_condition=\"WAF_always_false\",\n )],\n waf=fastly.ServiceVclWafArgs(\n prefetch_condition=\"WAF_Prefetch\",\n response_object=\"WAF_Response\",\n ),\n force_destroy=True)\nwaf = fastly.ServiceWafConfiguration(\"waf\",\n waf_id=demo.waf.waf_id,\n http_violation_score_threshold=100,\n rules=[fastly.ServiceWafConfigurationRuleArgs(\n modsec_rule_id=2029718,\n revision=1,\n status=\"log\",\n )],\n rule_exclusions=[fastly.ServiceWafConfigurationRuleExclusionArgs(\n name=\"index page\",\n exclusion_type=\"rule\",\n condition=\"req.url.basename == \\\"index.html\\\"\",\n modsec_rule_ids=[2029718],\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var demo = new Fastly.ServiceVcl(\"demo\", new()\n {\n Name = \"demofastly\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n Comment = \"demo\",\n },\n },\n Backends = new[]\n {\n new Fastly.Inputs.ServiceVclBackendArgs\n {\n Address = \"127.0.0.1\",\n Name = \"origin1\",\n Port = 80,\n },\n },\n Conditions = new[]\n {\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_Prefetch\",\n Type = \"PREFETCH\",\n Statement = \"req.backend.is_origin\",\n },\n new Fastly.Inputs.ServiceVclConditionArgs\n {\n Name = \"WAF_always_false\",\n Statement = \"false\",\n Type = \"REQUEST\",\n },\n },\n ResponseObjects = new[]\n {\n new Fastly.Inputs.ServiceVclResponseObjectArgs\n {\n Name = \"WAF_Response\",\n Status = 403,\n Response = \"Forbidden\",\n ContentType = \"text/html\",\n Content = \"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\",\n RequestCondition = \"WAF_always_false\",\n },\n },\n Waf = new Fastly.Inputs.ServiceVclWafArgs\n {\n PrefetchCondition = \"WAF_Prefetch\",\n ResponseObject = \"WAF_Response\",\n },\n ForceDestroy = true,\n });\n\n var waf = new Fastly.ServiceWafConfiguration(\"waf\", new()\n {\n WafId = demo.Waf.Apply(waf =\u003e waf?.WafId),\n HttpViolationScoreThreshold = 100,\n Rules = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleArgs\n {\n ModsecRuleId = 2029718,\n Revision = 1,\n Status = \"log\",\n },\n },\n RuleExclusions = new[]\n {\n new Fastly.Inputs.ServiceWafConfigurationRuleExclusionArgs\n {\n Name = \"index page\",\n ExclusionType = \"rule\",\n Condition = \"req.url.basename == \\\"index.html\\\"\",\n ModsecRuleIds = new[]\n {\n 2029718,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdemo, err := fastly.NewServiceVcl(ctx, \"demo\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"demofastly\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t\tComment: pulumi.String(\"demo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBackends: fastly.ServiceVclBackendArray{\n\t\t\t\t\u0026fastly.ServiceVclBackendArgs{\n\t\t\t\t\tAddress: pulumi.String(\"127.0.0.1\"),\n\t\t\t\t\tName: pulumi.String(\"origin1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t},\n\t\t\tConditions: fastly.ServiceVclConditionArray{\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\t\tType: pulumi.String(\"PREFETCH\"),\n\t\t\t\t\tStatement: pulumi.String(\"req.backend.is_origin\"),\n\t\t\t\t},\n\t\t\t\t\u0026fastly.ServiceVclConditionArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t\tStatement: pulumi.String(\"false\"),\n\t\t\t\t\tType: pulumi.String(\"REQUEST\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResponseObjects: fastly.ServiceVclResponseObjectArray{\n\t\t\t\t\u0026fastly.ServiceVclResponseObjectArgs{\n\t\t\t\t\tName: pulumi.String(\"WAF_Response\"),\n\t\t\t\t\tStatus: pulumi.Int(403),\n\t\t\t\t\tResponse: pulumi.String(\"Forbidden\"),\n\t\t\t\t\tContentType: pulumi.String(\"text/html\"),\n\t\t\t\t\tContent: pulumi.String(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\"),\n\t\t\t\t\tRequestCondition: pulumi.String(\"WAF_always_false\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tWaf: \u0026fastly.ServiceVclWafArgs{\n\t\t\t\tPrefetchCondition: pulumi.String(\"WAF_Prefetch\"),\n\t\t\t\tResponseObject: pulumi.String(\"WAF_Response\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceWafConfiguration(ctx, \"waf\", \u0026fastly.ServiceWafConfigurationArgs{\n\t\t\tWafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) {\n\t\t\t\treturn \u0026waf.WafId, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tHttpViolationScoreThreshold: pulumi.Int(100),\n\t\t\tRules: fastly.ServiceWafConfigurationRuleArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleArgs{\n\t\t\t\t\tModsecRuleId: pulumi.Int(2029718),\n\t\t\t\t\tRevision: pulumi.Int(1),\n\t\t\t\t\tStatus: pulumi.String(\"log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRuleExclusions: fastly.ServiceWafConfigurationRuleExclusionArray{\n\t\t\t\t\u0026fastly.ServiceWafConfigurationRuleExclusionArgs{\n\t\t\t\t\tName: pulumi.String(\"index page\"),\n\t\t\t\t\tExclusionType: pulumi.String(\"rule\"),\n\t\t\t\t\tCondition: pulumi.String(\"req.url.basename == \\\"index.html\\\"\"),\n\t\t\t\t\tModsecRuleIds: pulumi.IntArray{\n\t\t\t\t\t\tpulumi.Int(2029718),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceVclBackendArgs;\nimport com.pulumi.fastly.inputs.ServiceVclConditionArgs;\nimport com.pulumi.fastly.inputs.ServiceVclResponseObjectArgs;\nimport com.pulumi.fastly.inputs.ServiceVclWafArgs;\nimport com.pulumi.fastly.ServiceWafConfiguration;\nimport com.pulumi.fastly.ServiceWafConfigurationArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleArgs;\nimport com.pulumi.fastly.inputs.ServiceWafConfigurationRuleExclusionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var demo = new ServiceVcl(\"demo\", ServiceVclArgs.builder()\n .name(\"demofastly\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .comment(\"demo\")\n .build())\n .backends(ServiceVclBackendArgs.builder()\n .address(\"127.0.0.1\")\n .name(\"origin1\")\n .port(80)\n .build())\n .conditions( \n ServiceVclConditionArgs.builder()\n .name(\"WAF_Prefetch\")\n .type(\"PREFETCH\")\n .statement(\"req.backend.is_origin\")\n .build(),\n ServiceVclConditionArgs.builder()\n .name(\"WAF_always_false\")\n .statement(\"false\")\n .type(\"REQUEST\")\n .build())\n .responseObjects(ServiceVclResponseObjectArgs.builder()\n .name(\"WAF_Response\")\n .status(\"403\")\n .response(\"Forbidden\")\n .contentType(\"text/html\")\n .content(\"\u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\")\n .requestCondition(\"WAF_always_false\")\n .build())\n .waf(ServiceVclWafArgs.builder()\n .prefetchCondition(\"WAF_Prefetch\")\n .responseObject(\"WAF_Response\")\n .build())\n .forceDestroy(true)\n .build());\n\n var waf = new ServiceWafConfiguration(\"waf\", ServiceWafConfigurationArgs.builder()\n .wafId(demo.waf().applyValue(waf -\u003e waf.wafId()))\n .httpViolationScoreThreshold(100)\n .rules(ServiceWafConfigurationRuleArgs.builder()\n .modsecRuleId(2029718)\n .revision(1)\n .status(\"log\")\n .build())\n .ruleExclusions(ServiceWafConfigurationRuleExclusionArgs.builder()\n .name(\"index page\")\n .exclusionType(\"rule\")\n .condition(\"req.url.basename == \\\"index.html\\\"\")\n .modsecRuleIds(2029718)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n demo:\n type: fastly:ServiceVcl\n properties:\n name: demofastly\n domains:\n - name: example.com\n comment: demo\n backends:\n - address: 127.0.0.1\n name: origin1\n port: 80\n conditions:\n - name: WAF_Prefetch\n type: PREFETCH\n statement: req.backend.is_origin\n - name: WAF_always_false\n statement: 'false'\n type: REQUEST\n responseObjects:\n - name: WAF_Response\n status: '403'\n response: Forbidden\n contentType: text/html\n content: \u003chtml\u003e\u003cbody\u003eForbidden\u003c/body\u003e\u003c/html\u003e\n requestCondition: WAF_always_false\n waf:\n prefetchCondition: WAF_Prefetch\n responseObject: WAF_Response\n forceDestroy: true\n waf:\n type: fastly:ServiceWafConfiguration\n properties:\n wafId: ${demo.waf.wafId}\n httpViolationScoreThreshold: 100\n rules:\n - modsecRuleId: 2.029718e+06\n revision: 1\n status: log\n ruleExclusions:\n - name: index page\n exclusionType: rule\n condition: req.url.basename == \"index.html\"\n modsecRuleIds:\n - 2.029718e+06\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nUsage with rules from data source:\n\n## Import\n\nThis is an example of the import command being applied to the resource named `fastly_service_waf_configuration.waf`\n\nThe resource ID should be the WAF ID.\n\n```sh\n$ pulumi import fastly:index/serviceWafConfiguration:ServiceWafConfiguration waf xxxxxxxxxxxxxxxxxxxx\n```\n\n", "properties": { "activate": { "type": "boolean", diff --git a/provider/go.mod b/provider/go.mod index d0c71ada..452d1c0c 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,8 +4,8 @@ go 1.21.12 require ( github.com/fastly/terraform-provider-fastly v0.0.0 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.0 - github.com/pulumi/pulumi/sdk/v3 v3.124.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.1-0.20240724013245-33763d1356a3 + github.com/pulumi/pulumi/sdk/v3 v3.126.0 ) require ( @@ -167,7 +167,7 @@ require ( github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect github.com/pulumi/pulumi-yaml v1.9.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.124.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.126.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/provider/go.sum b/provider/go.sum index 323bd5a5..ef76a1d5 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1913,20 +1913,20 @@ github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA= github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= -github.com/pulumi/providertest v0.0.13 h1:9CAaoviOTuCVHDI15h3znXa5JsKYtXLYHIIdxOCzo3Y= -github.com/pulumi/providertest v0.0.13/go.mod h1:REAoaN+hGOtdWJGirfWYqcSjCejlbGfzyVTUuemJTuE= +github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8= +github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.0 h1:XgsT5w1KHhjP3ChPC1eVY6A47cdg1EPq6JzbQruvUHU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.0/go.mod h1:468sr8NULk9QEKwVlMLYy3P+gtWjtgaxLJY1F7fTsak= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.1-0.20240724013245-33763d1356a3 h1:rL0kjTGGKNapnemmh/mcJCNRWsemsHYaO18Cc/rXP+0= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.87.1-0.20240724013245-33763d1356a3/go.mod h1:QSDiqiCMMbfzrsp3oyRPWgSVE/dkVH5ujxoFappqjdo= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= github.com/pulumi/pulumi-yaml v1.9.1 h1:JPeI80M23SPactxgnCFS1casZlSr7ZhAXwSx4H55QQ4= github.com/pulumi/pulumi-yaml v1.9.1/go.mod h1:OH0R34yJxA5u6zjYBN4JXcWoEvfkRoOVWi6viu8buoA= -github.com/pulumi/pulumi/pkg/v3 v3.124.0 h1:JgUePx6Ga9geBJ1dku6K8GXTrsBYzXMhKIsk+cxeKo8= -github.com/pulumi/pulumi/pkg/v3 v3.124.0/go.mod h1:/XUDPNoIikS3lcQe1HpGuKs73cO5HqBvOdxXFeC3UHM= -github.com/pulumi/pulumi/sdk/v3 v3.124.0 h1:f9Rb2AhLSaacKTaBPbKXPCfviHxTuhEXafhT4E095Y0= -github.com/pulumi/pulumi/sdk/v3 v3.124.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= +github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= +github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= +github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= diff --git a/sdk/go.mod b/sdk/go.mod index a6745029..88167077 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.124.0 + github.com/pulumi/pulumi/sdk/v3 v3.126.0 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index acd4c150..c4e7aede 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.124.0 h1:f9Rb2AhLSaacKTaBPbKXPCfviHxTuhEXafhT4E095Y0= -github.com/pulumi/pulumi/sdk/v3 v3.124.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= +github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/go/fastly/serviceWafConfiguration.go b/sdk/go/fastly/serviceWafConfiguration.go index 52baba20..72143cdb 100644 --- a/sdk/go/fastly/serviceWafConfiguration.go +++ b/sdk/go/fastly/serviceWafConfiguration.go @@ -79,9 +79,9 @@ import ( // return err // } // _, err = fastly.NewServiceWafConfiguration(ctx, "waf", &fastly.ServiceWafConfigurationArgs{ -// WafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { +// WafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { // return &waf.WafId, nil -// }).(pulumi.StringPtrOutput), +// }).(pulumi.StringPtrOutput)), // HttpViolationScoreThreshold: pulumi.Int(100), // }) // if err != nil { @@ -154,9 +154,9 @@ import ( // return err // } // _, err = fastly.NewServiceWafConfiguration(ctx, "waf", &fastly.ServiceWafConfigurationArgs{ -// WafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { +// WafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { // return &waf.WafId, nil -// }).(pulumi.StringPtrOutput), +// }).(pulumi.StringPtrOutput)), // HttpViolationScoreThreshold: pulumi.Int(100), // Rules: fastly.ServiceWafConfigurationRuleArray{ // &fastly.ServiceWafConfigurationRuleArgs{ @@ -238,9 +238,9 @@ import ( // return err // } // _, err = fastly.NewServiceWafConfiguration(ctx, "waf", &fastly.ServiceWafConfigurationArgs{ -// WafId: demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { +// WafId: pulumi.String(demo.Waf.ApplyT(func(waf fastly.ServiceVclWaf) (*string, error) { // return &waf.WafId, nil -// }).(pulumi.StringPtrOutput), +// }).(pulumi.StringPtrOutput)), // HttpViolationScoreThreshold: pulumi.Int(100), // Rules: fastly.ServiceWafConfigurationRuleArray{ // &fastly.ServiceWafConfigurationRuleArgs{ diff --git a/sdk/python/pulumi_fastly/_utilities.py b/sdk/python/pulumi_fastly/_utilities.py index c92fd32f..d14b49ac 100644 --- a/sdk/python/pulumi_fastly/_utilities.py +++ b/sdk/python/pulumi_fastly/_utilities.py @@ -13,10 +13,12 @@ import sys import typing import warnings +import base64 import pulumi import pulumi.runtime from pulumi.runtime.sync_await import _sync_await +from pulumi.runtime.proto import resource_pb2 from semver import VersionInfo as SemverVersion from parver import Version as PEP440Version