diff --git a/.goreleaser.yml b/.goreleaser.yml index 96e066d11..73f70d237 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -29,12 +29,8 @@ builds: ignore: - goos: darwin goarch: '386' - - goos: darwin - goarch: 'arm64' - goos: windows goarch: 'arm64' -# - goos: freebsd -# goarch: '386' binary: '{{ .ProjectName }}_v{{ .Version }}' archives: - format: zip diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b1d9320..b7f9a49cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # RELEASE NOTES +## 2.1.0 (Jun 2, 2022) + +#### FEATURES/ENHANCEMENTS: + +* Support for Darwin ARM64 architecture ([GH#236](https://github.com/akamai/terraform-provider-akamai/issues/236)) + +* Image and Video Manager + * New data sources: + * `akamai_imaging_policy_image` - generate JSON for image policy + * `akamai_imaging_policy_video` - generate JSON for video policy + * Add `ImQuery` transformation + * Add `Composite` transformation to `PostBreakpointTransformations` + +#### BUG FIXES: + +* PAPI + * Update documentation for `akamai_property_rules_template` + * Track remote changes in property rules ([#305](https://github.com/akamai/terraform-provider-akamai/issues/305)) + +* IAM + * `akamai_iam_user`: remove phone number validation, to allow international phone number format + ## 2.0.0 (Apr 28, 2022) #### BREAKING CHANGES: diff --git a/build/internal/releaser/Dockerfile b/build/internal/releaser/Dockerfile index 0f2724ccd..27c600068 100644 --- a/build/internal/releaser/Dockerfile +++ b/build/internal/releaser/Dockerfile @@ -11,6 +11,9 @@ ARG SSH_KNOWN_HOSTS COPY AkamaiCorpRoot-G1.pem /usr/local/share/ca-certificates/AkamaiCorpRoot-G1.pem COPY .edgerc /root/.edgerc +COPY clone_repos.bash /usr/local/bin/clone_repos.bash +COPY goreleaser_build.bash /usr/local/bin/goreleaser_build.bash +COPY smoke_tests.bash /usr/local/bin/smoke_tests.bash RUN apt update && apt install -y curl git gcc ca-certificates openssh-client gnupg \ && echo "deb [arch=amd64] https://apt.releases.hashicorp.com focal main" >> /etc/apt/sources.list \ diff --git a/build/internal/releaser/clone_repos.bash b/build/internal/releaser/clone_repos.bash new file mode 100755 index 000000000..57f38c060 --- /dev/null +++ b/build/internal/releaser/clone_repos.bash @@ -0,0 +1,10 @@ +echo "$SSH_KNOWN_HOSTS" >/root/.ssh/known_hosts +echo "$SSH_PUB_KEY" >/root/.ssh/id_rsa.pub +echo "$SSH_PRV_KEY" >/root/.ssh/id_rsa +chmod 700 /root/.ssh +chmod 600 /root/.ssh/id_rsa +chmod 644 /root/.ssh/id_rsa.pub +chmod 644 /root/.ssh/known_hosts +cd /workspace +git clone ssh://git@git.source.akamai.com:7999/devexp/akamaiopen-edgegrid-golang.git +git clone ssh://git@git.source.akamai.com:7999/devexp/terraform-provider-akamai.git diff --git a/build/internal/releaser/goreleaser.bash b/build/internal/releaser/goreleaser.bash index a27aa09f9..a38e73c2c 100755 --- a/build/internal/releaser/goreleaser.bash +++ b/build/internal/releaser/goreleaser.bash @@ -43,25 +43,13 @@ docker container run --name "${CONTAINER}" -d -it \ -e SSH_PRV_KEY="${SSH_PRV_KEY}" \ -e SSH_KNOWN_HOSTS="${SSH_KNOWN_HOSTS}" "${IMAGE}" -echo "cloning repositories and executing goreleaser:" -docker container exec "${CONTAINER}" bash -c 'echo "$SSH_KNOWN_HOSTS" > /root/.ssh/known_hosts; - echo "$SSH_PUB_KEY" > /root/.ssh/id_rsa.pub; - echo "$SSH_PRV_KEY" > /root/.ssh/id_rsa; - chmod 700 /root/.ssh; - chmod 600 /root/.ssh/id_rsa; - chmod 644 /root/.ssh/id_rsa.pub; - chmod 644 /root/.ssh/known_hosts; - cd /workspace; - git clone ssh://git@git.source.akamai.com:7999/devexp/akamaiopen-edgegrid-golang.git; - git clone ssh://git@git.source.akamai.com:7999/devexp/terraform-provider-akamai.git; - cd terraform-provider-akamai; - go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v2=../akamaiopen-edgegrid-golang/; - git tag v10.0.0; - goreleaser build --single-target --skip-validate --config ./.goreleaser.yml --output /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/10.0.0/linux_amd64/terraform-provider-akamai_v10.0.0' +echo "cloning repositories:" +docker container exec "${CONTAINER}" bash -c clone_repos.bash + +echo "executing goreleaser build:" +docker container exec "${CONTAINER}" bash -c goreleaser_build.bash echo "smoke test:" -docker container exec ${CONTAINER} bash -c 'cd /workspace/terraform-provider-akamai/examples/akamai_cp_code; - terraform init; - terraform plan' +docker container exec ${CONTAINER} bash -c smoke_tests.bash clean_up diff --git a/build/internal/releaser/goreleaser_build.bash b/build/internal/releaser/goreleaser_build.bash new file mode 100755 index 000000000..5fda66e3c --- /dev/null +++ b/build/internal/releaser/goreleaser_build.bash @@ -0,0 +1,4 @@ +cd /workspace/terraform-provider-akamai +go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v2=../akamaiopen-edgegrid-golang/ +git tag v10.0.0 +goreleaser build --single-target --skip-validate --config ./.goreleaser.yml --output /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/10.0.0/linux_amd64/terraform-provider-akamai_v10.0.0 diff --git a/build/internal/releaser/smoke_tests.bash b/build/internal/releaser/smoke_tests.bash new file mode 100755 index 000000000..fbae323ce --- /dev/null +++ b/build/internal/releaser/smoke_tests.bash @@ -0,0 +1,4 @@ +cd /workspace/terraform-provider-akamai/examples/akamai_cp_code +git status | grep "nothing to commit, working tree clean" +terraform init +terraform plan diff --git a/docs/data-sources/authorities_set.md b/docs/data-sources/authorities_set.md index 9a920d9ba..efb025b28 100644 --- a/docs/data-sources/authorities_set.md +++ b/docs/data-sources/authorities_set.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: authorities_set" -subcategory: "DNS" +subcategory: "Edge DNS" description: |- DNS Authorities Set --- diff --git a/docs/data-sources/iam_contact_types.md b/docs/data-sources/iam_contact_types.md index eaff7e3bb..edbdd5c18 100644 --- a/docs/data-sources/iam_contact_types.md +++ b/docs/data-sources/iam_contact_types.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_contact_types" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Contact Types --- diff --git a/docs/data-sources/iam_countries.md b/docs/data-sources/iam_countries.md index f55fb533a..5fe635d92 100644 --- a/docs/data-sources/iam_countries.md +++ b/docs/data-sources/iam_countries.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_countries" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Countries --- diff --git a/docs/data-sources/iam_groups.md b/docs/data-sources/iam_groups.md index c022a6f50..6388b07f4 100644 --- a/docs/data-sources/iam_groups.md +++ b/docs/data-sources/iam_groups.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_groups" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Groups --- diff --git a/docs/data-sources/iam_roles.md b/docs/data-sources/iam_roles.md index 032dca475..6bd444fc6 100644 --- a/docs/data-sources/iam_roles.md +++ b/docs/data-sources/iam_roles.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_roles" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Roles --- diff --git a/docs/data-sources/iam_states.md b/docs/data-sources/iam_states.md index 37881f703..9c6a7929e 100644 --- a/docs/data-sources/iam_states.md +++ b/docs/data-sources/iam_states.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_states" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM States --- diff --git a/docs/data-sources/iam_supported_langs.md b/docs/data-sources/iam_supported_langs.md index 3ec07383b..9eabfa177 100644 --- a/docs/data-sources/iam_supported_langs.md +++ b/docs/data-sources/iam_supported_langs.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_supported_langs" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Supported Languages --- diff --git a/docs/data-sources/iam_timeout_policies.md b/docs/data-sources/iam_timeout_policies.md index ec8534b40..48b3d3265 100644 --- a/docs/data-sources/iam_timeout_policies.md +++ b/docs/data-sources/iam_timeout_policies.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_timeout_policies" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Timeout Policies --- diff --git a/docs/data-sources/iam_timezones.md b/docs/data-sources/iam_timezones.md index 73b64a9f9..204773f1e 100644 --- a/docs/data-sources/iam_timezones.md +++ b/docs/data-sources/iam_timezones.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: akamai_iam_timezones" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- IAM Timeout Policies --- diff --git a/docs/data-sources/imaging_policy_image.md b/docs/data-sources/imaging_policy_image.md new file mode 100644 index 000000000..59f74975a --- /dev/null +++ b/docs/data-sources/imaging_policy_image.md @@ -0,0 +1,332 @@ +--- +layout: "akamai" +page_title: "Akamai: akamai_imaging_policy_image" +subcategory: "Image and Video Manager" +description: |- + Image policy data +--- + +# akamai_imaging_policy_image (Beta) + +Specifies details for an image policy, such as transformations to apply and variations in image size and formats. + +## Example usage + +### Basic usage + +This example shows a simple image policy with image transformations that doesn’t contain variables. + +```hcl +data "akamai_imaging_policy_image" "image_policy" { + policy { + rollout_duration = 3601 + breakpoints { + widths = [ + 320, + 640, + 1024, + 2048, + 5000 + ] + } + output { + perceptual_quality = "mediumHigh" + } + transformations { + max_colors { + colors = var.colors + } + } + transformations { + blur { + sigma = var.sigma + } + } + transformations { + max_colors { + colors = 5 + } + } + } +} +``` + +### Usage with transformation nesting and variables + +This example shows how you can nest transformations and use variables for your policy settings: + +```hcl +data "akamai_imaging_policy_image" "image_policy" { + policy { + rollout_duration = 3600 + breakpoints { + widths = [280, 1080] + } + output { + adaptive_quality = 50 + perceptual_quality = "mediumHigh" + } + transformations { + region_of_interest_crop { + gravity = "Center" + height = 8 + region_of_interest { + rectangle_shape { + anchor { + point_shape { + x = 4 + y = 5 + } + } + height = 9 + width = 8 + } + } + style = "fill" + width = 7 + } + } + transformations { + append { + gravity = "Center" + gravity_priority = "horizontal" + image { + text_image { + fill = "#000000" + size = 72 + stroke = "#FFFFFF" + stroke_size = 0 + text = "test" + transformation { + compound { + } + } + } + } + preserve_minor_dimension = true + } + } + transformations { + trim { + fuzz = 0.08 + padding = 0 + } + } + transformations { + if_dimension { + default { + + compound { + if_dimension { + default { + + compound { + if_dimension { + default { + + compound { + if_dimension { + default { + + compound { + resize { + aspect = "fit" + height_var = "ResizeDim" + type = "normal" + width_var = "ResizeDim" + } + } + compound { + crop { + allow_expansion = true + gravity = "Center" + height_var = "ResizeDim" + width_var = "ResizeDim" + x_position = 0 + y_position = 0 + } + } + compound { + background_color { + color = "#ffffff" + } + } + } + dimension = "height" + greater_than { + + compound { + resize { + aspect = "fit" + height_var = "ResizeDimWithBorder" + type = "normal" + width_var = "ResizeDimWithBorder" + } + } + compound { + crop { + allow_expansion = true + gravity = "Center" + height_var = "ResizeDim" + width_var = "ResizeDim" + x_position = 0 + y_position = 0 + } + } + compound { + background_color { + color = "#ffffff" + } + } + } + value_var = "MaxDimOld" + } + } + } + dimension = "height" + less_than { + + compound { + resize { + aspect = "fit" + height_var = "ResizeDimWithBorder" + type = "normal" + width_var = "ResizeDimWithBorder" + } + } + compound { + crop { + allow_expansion = true + gravity = "Center" + height_var = "ResizeDim" + width_var = "ResizeDim" + x_position = 0 + y_position = 0 + } + } + compound { + background_color { + color = "#ffffff" + } + } + } + value_var = "MinDim" + } + } + } + dimension = "width" + less_than { + + compound { + resize { + aspect = "fit" + height_var = "ResizeDimWithBorder" + type = "normal" + width_var = "ResizeDimWithBorder" + } + } + compound { + crop { + allow_expansion = true + gravity = "Center" + height_var = "ResizeDim" + width_var = "ResizeDim" + x_position = 0 + y_position = 0 + } + } + compound { + background_color { + color = "#ffffff" + } + } + } + value_var = "MinDim" + } + } + } + dimension = "width" + value_var = "MaxDimOld" + } + } + variables { + + default_value = "280" + name = "ResizeDim" + type = "number" + } + variables { + + default_value = "260" + name = "ResizeDimWithBorder" + type = "number" + } + variables { + + default_value = "" + name = "VariableWithoutDefaultValue" + type = "string" + } + variables { + + default_value = "1000" + enum_options { + + id = "1" + value = "value1" + } + enum_options { + + id = "2" + value = "value2" + } + name = "MinDim" + type = "number" + } + variables { + + default_value = "1450" + name = "MinDimNew" + type = "number" + } + variables { + + default_value = "1500" + name = "MaxDimOld" + type = "number" + } + } +} +``` + +## Argument reference + +This data source supports these arguments: + +* `policy` - (Required) The image policy. + * `breakpoints` - (Optional) The breakpoint widths (in pixels) to use to create derivative images. + * `widths` - (Optional) The list of breakpoint widths to use, separated by commas. + * `hosts` - (Optional) The hosts that are allowed for image URLs within transformations or variables. + * `output` - (Optional) The output quality and formats that are created for each resized image. If unspecified, image formats are created to support all browsers at the default quality level (`85`)including formats such as WEBP, JPEG2000 and JPEG-XR for specific browsers. + * `adaptive_quality` - (Optional) The quality value that is applied to an image when Image and Video Manager detects a slow connection (RTT > 300 ms). This value (1-100) overrides the derivative quality value. Specifying a lower value can reduce load times for users with slow connections without impacting the quality of images for users with standard connections. + * `perceptual_quality` - (Optional) The perceptual quality to use when comparing resulting images. Perceptual quality tunes each image format's quality parameter dynamically based on the human-perceived quality of the output image. The visual quality of derivative videos after they have been compressed to maximize byte savings. You can select one of five perceptual quality values: `high`, `mediumHigh`, `medium`, `mediumLow`, or `low`. `high` results in the highest visual quality with the least byte savings, while ‘low’ results in lower visual quality with the greatest byte savings. Either `perceptual quality can be set or `quality`, but not both. If setting a variable for this argument, use `perceptual_quality_var` instead. + * `perceptual_quality_floor` - (Optional) The minimum image quality to respect when perceptual quality is set. Image quality will not be reduced below this value even if it is determined that a further compressed image would be acceptably visually similar. Set a value between 1-100. + * `quality` - The specified quality of the output images expressed as a value from 1-100. Either `perceptual quality can be set or `quality`, but not both. If neither is set, `quality` is the default. If setting a variable for this argument, use `quality_var` instead. + * `post_breakpoint_transformations` - (Optional) The set of post-processing transformations applied to the image after image and quality settings have been applied. This is a subset of the complete list of transformations and includes: `background_color`, `blur`, `chroma_key`, `composite`, `compound`, `contrast`, `goop`, `grayscale`, `hsl`, `hsv`, `if_dimension`, `if_orientation`, `max_colors`, `mirror`, `mono_hue`, `opacity`, `remove_color`, `unsharp_mask`. For information about these transformations and their supporting arguments, see [Transform Images](../guides/transform_images.md). + * `rollout_duration` - (Optional) The amount of time in seconds that it takes for the policy to roll out. During the rollout, the proportion of images with the new policy applied continually increases until cached videos associated with the previous version of the policy are no longer being served. The default is 3600 seconds. + * `transformations` - (Optional) The set of image transformations applied to the original image. If unspecified, no operations are performed. For information about available transformations and their supporting arguments, see [Transform Images](../guides/transform_images.md). + * `variables` - (Optional) The variable declarations for variables used within the policy. Any variable declared here can be invoked in transformations as a [Variable](#variable) object so that you don't have to specify values separately. You can also pass in these variable names and values dynamically as query parameters in the image's request URL. + * `name` - (Required) The name of the variable which is also available as the query parameter name to set the variable's value dynamically. Can be up to 50 alphanumeric characters. + * `type` - (Required) The type of value for the variable. + * `default_value` - (Required) The default value of the variable if no query parameter is provided. It needs to be one of the `enum_options` if any are provided. + * `enum_options` - (Optional) Limits the set of possible values for a variable. + * `id` - (Required) The unique identifier for each enum value. Can be up to 50 alphanumeric characters. + * `value` - (Required) The value of the variable when the `id` is provided. + * `postfix` - (Optional) A postfix added to the value provided for the variable, or to the default value. + * `prefix` - (Optional) A prefix added to the value provided for the variable, or to the default value. + +## Attributes reference + +This data source returns this attribute: + +* `json` - A JSON encoded policy. diff --git a/docs/data-sources/imaging_policy_video.md b/docs/data-sources/imaging_policy_video.md new file mode 100644 index 000000000..69818d641 --- /dev/null +++ b/docs/data-sources/imaging_policy_video.md @@ -0,0 +1,100 @@ +--- +layout: "akamai" +page_title: "Akamai: akamai_imaging_policy_video" +subcategory: "Image and Video Manager" +description: |- + Video policy data +--- + +# akamai_imaging_policy_video (Beta) + +Specifies details for a video policy, such as variations in image size and formats. + +## Example usage + +### Basic usage + +This example shows a very simple video policy that doesn’t contain variables. + +```hcl +data "akamai_imaging_policy_video" "video_policy" { + policy { + rollout_duration = 3602 + breakpoints { + widths = [ + 1280, 1920 + ] + } + output { + placeholder_video_url = "https://images.im-test.edgesuite.net/specs/im_videos/J7865_DM2360_v.mp4" + } + } +} +``` + +### Usage with variables + +This example shows how you can use variables for your policy settings: + +```hcl +data "akamai_imaging_policy_video" "video_policy" { + policy { + rollout_duration = 3602 + hosts = [ + "example.com", "example_test.com" + ] + variables { + name = "hosts" + type = "bool" + default_value = "true" + } + variables { + name = "defaultWidths" + type = "number" + default_value = "320" + } + variables { + name = "newVar1" + type = "perceptualQuality" + default_value = "mediumHigh" + } + output { + perceptual_quality_var = "newVar1" + } + breakpoints { + widths = [ + 320, 640, 1024, 2048, 5000 + ] + } + } +} +``` + + +## Argument reference + +This data source supports these arguments: + +* `policy` - (Required) The video policy. + * `breakpoints` - (Optional) The breakpoint widths in pixels used to create derivative videos. + * `hosts` - (Optional) The hosts that are allowed for video URLs within variables. + * `output` - (Optional) The output quality of each resized video. + * `perceptual_quality` - (Optional) The visual quality of derivative videos after they have been compressed to maximize byte savings. You can select one of five perceptual quality values: `high`, `mediumHigh`, `medium`, `mediumLow`, or `low`. `high` results in the highest visual quality with the least byte savings, while ‘low’ results in lower visual quality with the greatest byte savings. If setting a variable for this argument, use `perceptual_quality_var` instead. + * `placeholder_video_url` - (Optional) The URL for a specific placeholder video that appears when the user first requests a video and Image & Video Manager is still processing the derivative video. If no placeholder video is specified, the original video plays while the derivative video is being processed. If setting a variable for this argument, use `placeholder_video_url_var` instead. + * `video_adaptive_quality` - (Optional) The quality value that is applied to a video when Image and Video Manager detects a slow connection (RTT > 300 ms). This value overrides the derivative quality value. Specifying a lower value can reduce load times for users with slow connections without impacting the quality of videos for users with standard connections. If setting a variable for this argument, use `video_adaptive_quality_var` instead. + * `rollout_duration` - (Optional) The amount of time in seconds that it takes for the policy to roll out. During the rollout, the proportion of videos with the new policy applied continually increases until cached videos associated with the previous version of the policy are no longer being served. + * `variables` - (Optional) The variables for use within the policy. Any variable declared using this argument can be invoked as a [Variable](#variable) object. You can also pass these variable names and values dynamically as query parameters in the video's request URL. + * `name` - (Required) The name of the variable which is also available as the query parameter name to set the variable's value dynamically. Can be up to 50 alphanumeric characters. + * `type` - (Required) The type of value for the variable. + * `default_value` - (Required) The default value of the variable if no query parameter is provided. It needs to be one of the `enum_options` if any are provided. + * `enum_options` - (Optional) Limits the set of possible values for a variable. + * `id` - (Required) The unique identifier for each enum value. Can be up to 50 alphanumeric characters. + * `value` - (Required) The value of the variable when the `id` is provided. + * `postfix` - (Optional) A postfix added to the value provided for the variable, or to the default value. + * `prefix` - (Optional) A prefix added to the value provided for the variable, or to the default value. + +## Attributes reference + +This data source returns this attribute: + +* `json` - A JSON encoded policy. diff --git a/docs/data-sources/property_rules_template.md b/docs/data-sources/property_rules_template.md index d02ae21f8..d4bcda0ee 100644 --- a/docs/data-sources/property_rules_template.md +++ b/docs/data-sources/property_rules_template.md @@ -3,70 +3,86 @@ layout: "akamai" page_title: "Akamai: akamai_property_rules_template" subcategory: "Property Provisioning" description: |- - Property Rules Template + Property rules template --- - + # akamai_property_rules_template -The `akamai_property_rules_template` data source lets you configure a rule tree through the use of JSON template files. A rule tree is a nested block of property -rules in JSON format that include match criteria and behaviors. +The `akamai_property_rules_template` data source lets you define a rule tree. A rule tree is a nested block of property rules in JSON format that includes match criteria and behaviors. You can break a rule tree out into smaller JSON template files that cover individual rules. -With this data source you define the location of the JSON template files and provide information about any user-defined variables included within the templates. +With this data source, you define which JSON template files to use for your property. You can also set values for variables. -The template format used in this data source matches those used in the [Property Manager CLI](https://learn.akamai.com/en-us/learn_akamai/getting_started_with_akamai_developers/developer_tools/getstartedpmcli.html#addanewsnippet). +This data source uses the rule template format from the [Property Manager CLI](https://github.com/akamai/cli-property-manager#set-up-property-snippets). -You can pass user-defined variables by supplying either: +~> You can define variables either by using the Property Manager CLI syntax or by using standard Terraform variables. -* paths to `variableDefinitions.json` and `variables.json` with syntax used in Property Manager CLI, or -* a set of Terraform variables. +## How to work with JSON template files -## Referencing sub-files from a template -You can split each template out into a series of smaller template files. To add -them to this data source, you need to include them in the currently loaded file, -which corresponds to the value in the `template_file` argument. For example, to -include `example-file.json` from the `property-snippets` directory, use this syntax -including the quotes: `"#include:example-file.json"`. Make sure the `property-snippets` folder contains only `.json` files. -All files are resolved in relation to the directory that contains the starting template file. +You have a few options when working with rule template files: -## Inserting variables in a template -You can also add variables to a template by using a string like `“${env.}"`. You'll need the quotes here too. -These variables follow the format used in the [Property Manager CLI](https://github.com/akamai/cli-property-manager#update-the-variabledefinitions-file). They differ from Terraform variables which should resolve normally. +* Use a single JSON file that includes all rules for the property. +* Create separate JSON template files for each rule and store them in the `property-snippets` directory. +* Reference individual template files directly in this data source. -## Example usage: variables +### Use a single JSON rule tree file -This first example shows two variables passed in data source definition: +If you’re using a single JSON rule tree file for your property, set the `template_file` argument with the absolute or relative path to the file. For example: `template_file = abspath("${path.root}/property-snippets/main.json")` -```hcl -data "akamai_property_rules_template" "akarules" { - template_file = abspath("${path.root}/property-snippets/main.json") - variables { - name = "enabled" - value = "true" - type = "bool" - } - variables { - name = "name" - value = "default" - type = "string" - } -} +You can also set up a single JSON template file that calls individual template files. To reference other template files, use `include` statements in the `children` array . For example: + +```json + "children": [ + "#include:Performance.json", + "#include:Offload.json" + ] ``` -In this second example, the variables defined refer to files shared with a [Property Manager CLI pipeline](https://github.com/akamai/cli-property-manager#akamai-pipeline-workflow): +You have to store all files in the directory listed in the `template_file` argument. + +### Create a set of JSON template files + +If you have a set of JSON template files you want to call: + +1. Put them all in a directory called `property-snippets`. +1. Make sure the `property-snippets` folder only contains `.json` files. +1. Add the `template_dir` argument. For example: `template_dir = "property-snippets/"`. + +~> This directory name is different from the one required for the Property Manager CLI, which is called `config-snippets`. + +### Reference template files individually + +You can also pass in specific rule files with this data source. For this option, add the `template_data` argument and use Terraform’s `jsonencode` function to add the supporting JSON syntax. For example: ```hcl -data "akamai_property_rules_template" "akarules" { - template_file = abspath("${path.root}/property-snippets/main.json") - var_definition_file = abspath("${path.root}/environments/variableDefinitions.json") - var_values_file = abspath("${path.root}/environments/dev.example.com/variables.json") -} +template_data = jsonencode({ + "rules": { + "name": "default", + "children": [ + "#include:rules.json" + ] + } + }) ``` + +## How to use property variables with a template + +You can also add variables to a template by using a string like `“${env.}"`. These property variables follow the file structure and syntax used when [creating a pipeline in the Property Manager CLI](https://github.com/akamai/cli-property-manager#create-and-set-up-a-new-pipeline). + +You need to create these files when using property variables: + +* a `variableDefinitions.json` file to define your variables and their default values. +* one or more `variables.json` files to define settings specific to an environment.
The file name should always be `variables.json`. If using multiple environments, set up a directory for each environment to store this file in. -### Example usage: template files +~> Property variables are separate from Terraform variables. Terraform variables work as expected in this data source. -Here's an example of what a JSON-based template file with its nested templates might look like: +## Example usage: JSON template files + +Here are some examples of how you can set up your JSON template files for use with this data source. + +### Single JSON template that calls other templates + +Here's an example of a JSON template file with nested templates: -property-snippets/main.json: ```json { "rules": { @@ -90,29 +106,48 @@ property-snippets/main.json: } ``` -You can then define a Terraform configuration file like this, which pulls in the `main.json` file above and uses it with a property: +### Individual JSON rule template file + +Here’s a simple default rule example that you can include inside the `template_data` argument: + +```json +{ + "name": "default", + "children": [], + "behaviors": "#include:behaviors_default.json", + "criteria": [], + "criteriaMustSatisfy": "all" +} +``` + +## Example usage: Add templates to the data source + +Here are some examples of how you can call your JSON template files with this data source. + +### Call a single JSON template file + +This example shows how to define a specific JSON template using the `template_file` argument: ```hcl data "akamai_property_rules_template" "example" { template_file = abspath("${path.root}/property-snippets/main.json") variables { - name = "secure" + name = "secure" value = "false" - type = "bool" + type = "bool" } variables { - name = "caching_ttl" + name = "caching_ttl" value = "3d" - type = "string" + type = "string" } } - resource "akamai_property" "example" { - name = "dev.example.com" + name = "dev.example.com" contract_id = var.contractid group_id = var.groupid - hostnames = { - "example.org" = "example.org.edgesuite.net" + hostnames = { + "example.org" = "example.org.edgesuite.net" "www.example.org" = "example.org.edgesuite.net" "sub.example.org" = "sub.example.org.edgesuite.net" } @@ -121,18 +156,86 @@ resource "akamai_property" "example" { } ``` +### Call individual template files with this data source + +This second example shows how to call a specific JSON template using the `template_data` field: + +```hcl +data "akamai_property_rules_template" "example" { + template { + template_data = jsonencode({ + "rules": { + "name": "default", + "children": [ + "#include:rules.json" + ] + } + }) + template_dir = "property-snippets/" + } +} + +resource "akamai_property" "example" { + name = "dev.example.com" + contract_id = var.contractid + group_id = var.groupid + rule_format = "v2020-03-04" + rules = data.akamai_property_rules_template.example.json +} +``` + +## Example usage: Variables + +You can add variables individually or reference variable definition files. + +### Define variables in the data source + +This example shows two variables defined in the data source: + +```hcl +data "akamai_property_rules_template" "akarules" { + template_file = abspath("${path.root}/property-snippets/main.json") + variables { + name = "enabled" + value = "true" + type = "bool" + } + variables { + name = "name" + value = "default" + type = "string" + } +} +``` + +### Call variable definition files + +In this example, you store the variables in separate JSON files that follow the naming and formats used with the [Property Manager CLI pipeline](https://github.com/akamai/cli-property-manager#akamai-pipeline-workflow): + + +```hcl +data "akamai_property_rules_template" "akarules" { + template_file = abspath("${path.root}/property-snippets/main.json") + var_definition_file = abspath("${path.root}/environments/variableDefinitions.json") + var_values_file = abspath("${path.root}/environments/dev.example.com/variables.json") +} +``` + ## Argument reference -* `template_file` - (Required) The absolute path to your top-level JSON template file. The top-level template combines smaller, nested JSON templates to form your property rule tree. -* `variables` - (Optional) A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the `var_definition_file` and `var_values_file` arguments. A `variables` block includes: - * `name` - The name of the variable used in template. +* `template_file` - (Optional) The absolute path to your top-level JSON template file. The top-level template combines smaller, nested JSON templates to form your property rule tree. This argument conflicts with the `template` argument. +* `template` - (Optional) The template you use in your configuration. This argument conflicts with the `template_file` argument. + * `template_data` - (Required) The content of the JSON template as a string. + * `template_dir` - (Required) The absolute or relative path to the directory containing the template files. The path must end with `property-snippets`, the required directory name. For example: `template_dir = abspath("${path.root}/property-snippets/")`, or `template_dir = "property-snippets/"`. +* `variables` - (Optional) The definition of one or more variables. This argument conflicts with the `var_definition_file` and `var_values_file` arguments. A `variables` block includes: + * `name` - The name of the variable used in the template. * `type` - The type of variable: `string`, `number`, `bool`, or `jsonBlock`. * `value` - The value of the variable passed as a string. -* `var_definition_file` - (Optional) The absolute path to the file containing variable definitions and defaults. This file follows the syntax used in the [Property Manager CLI](https://github.com/akamai/cli-property-manager). This argument is required if you set `var_values_file` and conflicts with `variables`. -* `var_values_file` - (Optional) The absolute path to the file containing variable values. This file follows the syntax used in the Property Manager CLI. This argument is required if you set `var_definition_file` and conflicts with `variables`. - +* `var_definition_file` - (Optional) Required when using `var_values_file`. The absolute path to the file containing variable definitions and defaults. This argument conflicts with the `variables` argument. +* `var_values_file` - (Optional) Required when using `var_definition_file`. The absolute path to the file containing variable values. This argument conflicts with the `variables` argument. + ## Attributes reference - + This data source returns this attribute: - -* `json` - The fully expanded template with variables and all nested templates resolved. + +* `json` - The fully expanded template with variables and all nested templates resolved. \ No newline at end of file diff --git a/docs/guides/akamai_provider_auth.md b/docs/guides/akamai_provider_auth.md index d0184cd2d..56fb43d61 100644 --- a/docs/guides/akamai_provider_auth.md +++ b/docs/guides/akamai_provider_auth.md @@ -40,9 +40,12 @@ supporting API service names: | **Certificate Provisioning** | Certificate Provisioning System | | **Cloudlets** | Cloudlets Policy Manager | | **DataStream** | DataStream | -| **DNS Zone Administration Module** | DNS Zone Management | +| **DNS Zone Administration** | DNS Zone Management | +| **EdgeWorkers** | EdgeWorkers | +| **EdgeKV** | EdgeKV | | **Global Traffic Management Domain Administration** | Global Traffic Management | | **Identity and Access Management** | Identity Management: User Administration | +| **Image and Video Manager** | Image and Video Manager | | **Network Lists** | Network Lists | | **Property Provisioning** (Includes Common functions) | Property Manager (PAPI) | diff --git a/docs/guides/get_started_cloudlets.md b/docs/guides/get_started_cloudlets.md index 26ccc1061..a67a70423 100644 --- a/docs/guides/get_started_cloudlets.md +++ b/docs/guides/get_started_cloudlets.md @@ -70,9 +70,8 @@ You can either import an existing configuration or create a new one with Terrafo ### Import a configuration -If you already have an existing load balancing configuration you'd like to work with, you can use one of these import options: -* Prepare the HCL configuration and run `terraform import`. See the [`akamai_cloudlets_application_load_balancer`](../resources/cloudlets_application_load_balancer.md) resource. -* Use the [Terraform CLI](https://github.com/akamai/cli-terraform) to export the existing infrastructure to HCL and run `terraform import`. See the [`akamai_cloudlets_application_load_balancer`](../resources/cloudlets_application_load_balancer.md) resource. +If you already have an Application Load Balancing configuration, you can use the [Akamai Terraform Provider CLI](https://github.com/akamai/cli-terraform) to import your existing Akamai configurations into Terraform. + ### Create a configuration @@ -100,9 +99,7 @@ You can either import an existing policy or create a new one with Terraform: ### Import a policy -If you already have an existing policy you'd like to work with, you can use one of these import options: -* Prepare the HCL configuration and run `terraform import`. See the [`akamai_cloudlets_policy` resource](../resources/cloudlets_policy.md). -* Use the [Terraform CLI](https://github.com/akamai/cli-terraform) to export the existing infrastructure to HCL and run `terraform import`. See the [`akamai_cloudlets_policy` resource](../resources/cloudlets_policy.md). +You can use the [Akamai Terraform Provider CLI](https://github.com/akamai/cli-terraform) to import your existing Akamai configurations into Terraform. ### Create a policy diff --git a/docs/guides/get_started_dns_zone.md b/docs/guides/get_started_dns_zone.md index 2e35ccb36..8b35da61d 100644 --- a/docs/guides/get_started_dns_zone.md +++ b/docs/guides/get_started_dns_zone.md @@ -32,7 +32,7 @@ You can migrate an existing Edge DNS zone into your Terraform configuration usin ### Import using the command line utility -You can use the [Akamai CLI for Akamai Terraform Provider](https://github.com/akamai/cli-terraform) to generate a configuration for and import an existing Edge DNS zone and its recordsets. With the package, you can generate: +You can use the [Akamai Terraform Provider CLI](https://github.com/akamai/cli-terraform) to import your existing Akamai configurations into Terraform. With the package, you can generate: * a JSON-formatted list of the zone and recordsets. * a Terraform configuration for the zone and select recordsets. diff --git a/docs/guides/get_started_gtm_domain.md b/docs/guides/get_started_gtm_domain.md index 1663b3fdb..cfbee1af4 100644 --- a/docs/guides/get_started_gtm_domain.md +++ b/docs/guides/get_started_gtm_domain.md @@ -30,7 +30,7 @@ You can migrate an existing GTM domain into your Terraform configuration using e ### Import using the command line utility -You can use the [Akamai CLI for Akamai Terraform Provider](https://github.com/akamai/cli-terraform) to generate a configuration for and import an existing GTM domain. With the package, you can generate: + You can use the [Akamai Terraform Provider CLI](https://github.com/akamai/cli-terraform) to import your existing Akamai configurations into Terraform. With the package, you can generate: * a JSON-formatted list of all domain objects. * a Terraform configuration for the domain and contained objects. diff --git a/docs/guides/get_started_imaging.md b/docs/guides/get_started_imaging.md index f25ca0aad..ab8fd74e6 100644 --- a/docs/guides/get_started_imaging.md +++ b/docs/guides/get_started_imaging.md @@ -43,6 +43,12 @@ Nothing happens to the policy set until you link it to a property. When you save a policy, it's automatically activated on staging. To activate a policy on production, you have to set the `activate_on_production` flag to `true` in either the [akamai_imaging_policy_image](../resources/akamai_imaging_policy_image.md) or [akamai_imaging_policy_video](../resources/akamai_imaging_video.md) resource, and save your change. +### Variables + +Many Image and Video Manager arguments let you specify a variable object instead of a string, number, or boolean value. + +When using variables, you define the variable name in an argument that ends in `_var`. For example, if you want to have a variable for the gravity setting in a transformation, you’d use the `gravity_var` argument, not the `gravity` one. + ## Prerequisites Before you start, make sure Image and Video Manager is in your contract, and your contract includes the type of media (images or videos or both) that you intend to work with. @@ -74,10 +80,12 @@ For more information about prefixes, see the [ID prefixes](https://techdocs.akam ## Export a policy set and related policies -For the beta of this module, you can use the [Terraform CLI](https://github.com/akamai/cli-terraform) to export an existing policy set and its related policies into JSON files. +You can use the [Terraform CLI](https://github.com/akamai/cli-terraform) to export an existing policy set and its related policies into JSON files or directly into HCL syntax assuming that there are six or less levels of nested transformations. You need to run the CLI separately for each policy set you want to add to your Terraform configuration. -Running the CLI on a policy set also generates the resources for related policies and the JSON files of policies. + + Running the CLI on a policy set also generates the resources for related policies and the JSON files of policies. + If exported as schema, running the CLI on the policy set will not generate JSON files, but will generate the necessary data sources. ~> **Note:** If you use the [Image and Video Manager API](https://techdocs.akamai.com/ivm/reference/api), you can also modify JSON files you have for existing policy sets and policies. In Control Center, you can view and download policy JSON files by clicking **View Policy JSON** in the Policy Editor. diff --git a/docs/guides/get_started_property.md b/docs/guides/get_started_property.md index 0de3b8d1f..1260a4401 100644 --- a/docs/guides/get_started_property.md +++ b/docs/guides/get_started_property.md @@ -105,7 +105,7 @@ rules = file("${path.module}/rules.json") Before continuing with the next step, run `terraform plan` and resolve any errors or warnings. See [Command: plan](https://www.terraform.io/docs/commands/plan.html) for more information about this Terraform command. ## Import or create a property -You can either import an existing property or create a new one with Terraform: +You can either import an existing property or create a new one with Terraform. ### Import a property diff --git a/docs/guides/get_started_provider.md b/docs/guides/get_started_provider.md index 7cd2f50c4..0cb2f77a8 100644 --- a/docs/guides/get_started_provider.md +++ b/docs/guides/get_started_provider.md @@ -48,13 +48,13 @@ answer these questions: * **Modules.** Which modules do you plan to use? The API clients you set up depend on the modules you choose. For example, if you want to use the Common data sources and resources, you'll need read access to the Property Manager API. - -> **Note** If you’re adding any of these modules, you can use the [Akamai CLI for Terraform Provider](https://github.com/akamai/cli-terraform) to import your existing configurations: Cloudlets, Edge DNS, EdgeWorkers, Global Traffic Management, Image and Video Manager, and Property Manager. + -> **Note** For most modules, you can use the [Akamai Terraform Provider CLI](https://github.com/akamai/cli-terraform) to import your existing configurations. * **Akamai configurations.** Are you going to use existing properties and other Akamai configurations with Terraform? Or are you going to start from scratch? * **Single or multiple `.tf` files.** Do you want to manage the full lifecycle of your infrastructure in a single file? Or do you prefer to split it into smaller Terraform configurations with limited scope and delegate them to specific teams? Independent configurations use output variables to publish information and enable access to that data from other workspaces. -* **Supporting processes.** Are other people in your organization used to making changes via Control Center, an Akamai API, or an Akamai CLI? If they are, you need to develop new processes to make sure your Terraform configuration files are fully up to date and from now on, the single source of changes. All the modifications your team makes outside of Terraform get overwritten whenever you [run the `terraform -apply` command](#apply-your-configuration). +* **Supporting processes.** Are other people in your organization used to making changes via Control Center, an Akamai API, or an Akamai CLI? If they are, you need to develop new processes to make sure your Terraform configuration files are fully up to date and from now on, the single source of changes. All the modifications your team makes outside of Terraform get overwritten whenever you [run the `terraform apply` command](#apply-your-configuration). ## Set up your `.tf` files @@ -127,7 +127,7 @@ You can now refer to the group ID using the `id` attribute: `data.akamai_group.d ## Arrange resources and data sources in the Akamai configuration file -You're now ready to import the existing configurations or create new ones from scratch. +You're now ready to import the existing configurations or create new ones from scratch. For most modules, you can use the [Akamai CLI for Terraform Provider](https://github.com/akamai/cli-terraform) to import your existing Akamai configurations. At this point in the setup, you should refer to the guides for the Akamai modules you're using: @@ -147,32 +147,13 @@ At this point in the setup, you should refer to the guides for the Akamai module Once you're done with the module-level setup, continue with the next sections here to initialize Akamai Provider, test the configuration, and apply the actions. -## Initialize the Akamai Provider +## Use your new Akamai Provider configuration -Once you have your configuration complete, save the `.tf` files. Then -switch to the terminal to initialize Terraform using the command: +Once your configuration is complete, run Terraform commands to add it to your larger Terraform configuration: - $ terraform init +1. Save the `.tf` files. +1. In your terminal, initialize Terraform using the command: `terraform init`.
This command installs the latest version of the Akamai Provider, as well as any other providers you're using. +1. Test your configuration: `terraform plan`. +1. You can execute all the actions you set in the configuration by running: `terraform apply`. -This command installs the latest version of the Akamai Provider, as well -as any other providers you're using. To update -the Akamai Provider version after a new release, simply run `terraform -init` again. - -## Test your configuration - -To test your configuration, use Terraform's `plan` command: - - $ terraform plan - -This command makes Terraform create a plan for the work it will do -based on the `.tf` configuration file. It doesn't actually make any changes -and is safe to run as many times as you like. - -## Apply your configuration - -You can execute all the actions you set in the configuration by running: - - $ terraform apply - -The `apply` command previews all the changes before executing them, similarly to `plan`. Unless you set the `-auto-approve` flag, you need to confirm you want to proceed with the operation and propagate changes to the Akamai platform. +~> The `apply` command previews all the changes before executing them, similarly to `plan`. Unless you set the `-auto-approve` flag, you need to confirm you want to proceed with the operation and propagate changes to the Akamai platform. diff --git a/docs/guides/transform_images.md b/docs/guides/transform_images.md new file mode 100644 index 000000000..4e087a5ec --- /dev/null +++ b/docs/guides/transform_images.md @@ -0,0 +1,425 @@ +--- +layout: "akamai" +page_title: "Transform images" +description: |- + Learn about image transformation arguments for Image and Video Manager. +--- + +# Transform Images (Beta) + +Add transformations to your Image and Video manager image policy to automate processes like cropping, rotating, and resizing, or to apply visual effects to your images. Multiple transformations can be nested to achieve the desired result. + +Set up transformations in the `akamai_imaging_policy_image` data source. + +This guide provides the arguments to use when configuring image transformations. + +## Available transformations + +The sections that follow cover the available image transformations and their supporting arguments. + +* To manipulate the size, shape, and orientation of your images, use: [`append`](#append), [`aspect_crop`](#aspect-crop), [`crop`](#crop), [`face_crop`](#face-crop), [`feature_crop`](#feature-crop), [`fit_and_fill`](#fit-and-fill), [`mirror`](#mirror), [`region_of_interest_crop`](#region-of-interest-crop), [`relative_crop`](#relative-crop), [`resize`](#resize), [`rotate`](#rotate), [`scale`](#scale), [`shear`](#shear), [`trim`](#trim) + +* To apply visual effects to your images, use: [`background_color`](#background-color), [`blur`](#blur), [`chroma_key`](#chroma-key), [`composite`](#composite), [`contrast`](#contrast), [`goop`](#goop), [`grayscale`](#grayscale), [`hsl`](#hsl), [`hsv`](#hsv), [`max_colors`](#max-colors), [`mono_hue`](#mono-hue), [`opacity`](#opacity), [`remove_color`](#remove-color), [`unsharp_mask`](#unsharp-mask) + +* To group together a sequence of transformations and represent it as a single transformation, use: [`compound`](#compound) + +* To apply artistic transformations on a per-image basis without having to create multiple policies, use: [`im_query`](#imquery) + +* To conditionalize transformations based on the dimensions or orientation of original images, use: [`if_dimension`](#if-dimension), [`if_orientation`](#if-orientation) + +A subset of transformations can be applied after image and quality settings are applied (post-processing). This subset includes [`background_color`](#background-color), [`blur`](#blur), [`chroma_key`](#chroma-key), [`composite`](#composite), [`compound`](#compound), [`contrast`](#contrast), [`goop`](#goop), [`grayscale`](#grayscale), [`hsl`](#hsl), [`hsv`](#hsv), [`if_dimension`](#if-dimension), [`if_orientation`](#if-orientation), [`max_colors`](#max-colors), [`mirror`](#mirror), [`mono_hue`](#mono-hue), [`opacity`](#opacity), [`remove_color`](#remove-color), [`unsharp_mask`](#unsharp-mask). + +For more information about the available image transformations, see [Add image transformations and conditions](https://techdocs.akamai.com/ivm/docs/add-img-transformations). + +## Variables + +Many Image and Video Manager arguments let you specify a variable object instead of a string, number, or boolean value. + +When using variables, you define the variable name in an argument that ends in `_var`. For example, if you want to have a variable for the gravity setting in a transformation, you’d use the `gravity_var` argument, not the `gravity` one. + +## Append + +This transformation supports these arguments: + +* `append `- (Optional) Places a specified `image` beside the source image. The transformation places the `image` on a major dimension, then aligns it on the minor dimension. Transparent pixels fill any area not covered by either image. + * `image` - (Required) The image type, which is one of `box_image`, `circle_image`, `text_image`, or `url_image`. See [Image types](#image-types). + * `gravity` - (Optional) The placement of the `image` relative to the source image. The available values include eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + * `gravity_priority` - (Optional) Determines the exact placement of the `image` when `gravity` is `Center` or a diagonal direction. The value is either `horizontal` or `vertical`. Use `horizontal` to append an `image` east or west of the source image. This aligns the `image` on the vertical gravity component, placing `Center` gravity east. Use `vertical` to append an `image` north or south of the source image. This aligns the `image` on the horizontal gravity component, placing `Center` gravity south. If setting a variable for this argument, use `gravity_priority_var` instead. + * `preserve_minor_dimension` - (Optional) Defines whether to preserve the source image's minor dimension. This argument is `false` by default. The minor dimension is the dimension opposite to the dimension that the appending `image` is placed. If setting a variable for this argument, use `preserve_minor_dimension_var` instead. + +## Aspect crop + +This transformation supports these arguments: + +* `aspect_crop` - (Optional) Changes the height or width of an image to an aspect ratio of your choosing. The transformation does this by either cropping or expanding the area. + * `allow_expansion` - (Optional) Increases the size of the image canvas to achieve the requested aspect ratio instead of cropping the image. If setting a variable for this argument, use `allow_expansion_var` instead. + * `height` - (Optional) The height of the aspect ratio to crop. If setting a variable for this argument, use `height_var` instead. + * `width` - (Optional) The width of the aspect ratio to crop. If setting a variable for this argument, use `width_var` instead. + * `x_position` - (Optional) The horizontal portion of the image you want to keep when applying aspect ratio cropping. If using `allow_expansion`, this setting defines the horizontal position of the image on the new expanded image canvas. If setting a variable for this argument, use `x_position_var` instead. + * `y_position` - (Optional) The horizontal portion of the image you want to keep when applying aspect ratio cropping. If using `allow_expansion`, this setting defines the horizontal position of the image on the new expanded image canvas. If setting a variable for this argument, use `y_position_var` instead. + +## Background color + +This transformation supports this argument: + +* `background_color` - (Optional) Places a transparent image on a set background color. + * `color` - (Optional) The hexadecimal CSS color value for the background. If setting a variable for this argument, use `color_var` instead. + +## Blur + +This transformation supports these arguments: + +* `blur` - (Optional) Applies a Gaussian blur. + * `sigma` - (Optional) The number of pixels by which to scatter the original pixel to create the blur effect. Resulting images may be larger than the original as some pixels may scatter outside the image's original dimensions. If setting a variable for this argument, use `sigma_var` instead. + +## Chroma Key + +This transformation supports these arguments: + +* `chroma_key` - (Optional) Changes any color in an image within the specified volume of the HSL colorspace to transparent or semitransparent. This transformation applies a 'green screen' technique commonly used to isolate and remove background colors. + * `hue` - (Optional) The hue to remove. Enter the degrees of rotation (between 0 and 360) around the color wheel. By default `chroma_key` removes a green hue which is at 120 degrees on the color wheel. If setting a variable for this argument, use `hue_var` instead. + * `hue_feather` - (Optional) How much additional hue to make semi-transparent beyond the `hue_tolerance`. The default is `0.083` which applies semi-transparency to hues 30 degrees around the Hue Tolerance. If setting a variable for this argument, use `hue_feather_var` instead. + * `hue_tolerance` - (Optional) How close a color's hue needs to be to the selected hue for it to be changed to fully transparent. If you enter the maximum value of `1.0` the entire image is made transparent. The default is approximately `0.083` or 8.3% of the color wheel. This value corresponds to 30 degrees around the specified hue. If setting a variable for this argument, use `hue_tolerance_var` instead. + * `lightness_feather` - (Optional) How much additional lightness to make semi-transparent beyond the `lightness_tolerance`. The default value of 0.1 corresponds to 10% away from the tolerated lightness towards full black or full white. If setting a variable for this argument, use `lightness_feather_var` instead. + * `lightness_tolerance` - (Optional) How much of the lightest part and darkest part of a color to preserve. You can space this value out from the middle (for example, 0.5 lightness or full color) to help preserve the splash lighting impact in the image. You can define how close the color needs to be to the full color to remove it from your image. The default value of `0.75` means that a color must be within 75% of the full color to full white or full black for full removal. If setting a variable for this argument, use `lightness_tolerance_var` instead. + * `saturation_feather` - (Optional) How much additional saturation to make semi-transparent beyond the saturation tolerance. The default is `0.1` which applies semi-transparency to hues 10% below the `saturation_tolerance`. If setting a variable for this argument, use `saturation_feather_var` instead. + * `saturation_tolerance` - (Optional) How close a color's saturation needs to be to full saturation for it to be changed to fully transparent. For example, you can define how green the color needs to be to remove it from your image. The default value of `0.75` means that a color must be within 75% of full saturation in order to be made fully transparent. If setting a variable for this argument, use `saturation_tolerance_var` instead. + +## Composite + +This transformation supports these arguments: + +* `composite` - (Optional) Applies another image to the source image, either as an overlay or an underlay. The image underneath is visible in areas that are beyond the edges of the top image or that are less than 100% opaque. A common use of the overlay composite is to add a watermark. + * `image` - (Required) The image type, which is one of `box_image`, `circle_image`, `text_image`, or `url_image`. See [Image types](#image-types) for supported subarguments. + * `gravity` - (Optional) The placement of the `image` relative to the source image. The available values include eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + * `placement` - (Optional) The placement of the applied image either on top of or underneath the base image. Watermarks are usually applied on top. Backgrounds are usually applied underneath. If setting a variable for this argument, use `placement_var` instead. + * `scale` - (Optional) A multiplier to resize the applied image relative to the source image while preserving the aspect ratio (1 by default). Set the `scale_dimension` to calculate the `scale` from the source image's width or height. If setting a variable for this argument, use `scale_var` instead. +`scale_dimension` - (Optional) The dimension, either `width` or `height`, of the source image to scale. If setting a variable for this argument, use `scale_dimension_var` instead. + * `x_position` - (Optional) The x-axis position of the image to apply. If setting a variable for this argument, use `x_position_var` instead. + * `y_position` - (Optional) The y-axis position of the image to apply. If setting a variable for this argument, use `y_position_var` instead. + +## Compound + +This transformation supports this argument: + +* `compound` - (Optional) Groups together transformations into an ordered set. Used to represent a sequence of transformations as a single transformation. + +## Contrast + +This transformation supports these arguments: + +* `contrast`- (Optional) Adjusts contrast and brightness of an image. + * `brightness` - (Optional) The brightness of the image. Positive values increase brightness and negative values decrease brightness. A value of `1` produces a white image. A value of `-1` produces a black image. The default value is `0`, which leaves the image unchanged. The acceptable value range is `-1.0` to `1.0`. Values outside of the acceptable range clamp to this range. If setting a variable for this argument, use `brightness_var` instead. + * `contrast` - (Optional) The contrast of the image. Expressed as a range from `-1` to `1`. Positive values increase contrast, negative values decrease contrast, while `0` leaves the image unchanged. Values outside of the `-1` to `1` range clamp to this range. If setting a variable for this argument, use `contrast_var` instead. + +## Crop + +This transformation supports these arguments: + +* `crop` - (Optional) Crops an image. + * `allow_expansion` - (Optional) If cropping an area outside of the existing canvas, expands the image canvas. If setting a variable for this argument, use `allow_expansion_var` instead. + * `gravity` - (Optional) The placement of the `crop` relative to the source image. The available values include eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + * `height` - (Optional) The number of pixels to crop along the y-axis. If setting a variable for this argument, use `height_var` instead. + * `width` - (Optional) The number of pixels to crop along the x-axis. If setting a variable for this argument, use `width_var` instead. + * `x_position` - (Optional) The x-axis position to crop from. If setting a variable for this argument, use `x_position_var` instead. + * `y_position` - (Optional) The y-axis position to crop from. If setting a variable for this argument, use `y_position_var` instead. + + +## Face Crop + +This transformation supports these arguments: + +* `face_crop` - (Optional) Applies a method to detect faces in the source image and applies the rectangular crop on either the `biggest` face or `all` of the faces detected. Image and Video Manager tries to preserve faces in the image instead of using specified crop coordinates. + * `algorithm` - (Optional) Specifies the type of algorithm used to detect faces in the image: `cascade` (default) for the cascade classifier algorithm, or `dnn` for the deep neural network algorithm. If setting a variable for this argument, use `algorithm_var` instead. + * `confidence` - (Optional) With `algorithm` set to `dnn`, the minimum confidence needed to detect faces in the image. Values range from `0` to `1` for increased confidence, and possibly fewer faces detected. If setting a variable for this argument, use `confidence_var` instead. + * `fail_gravity` - (Optional) Controls placement of the crop if no faces are detected in the image. Directions are relative to the edges of the image being transformed. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `fail_gravity_var` instead. + * `focus` - (Optional) The focus of the crop rectangle, which is either around `biggestFace` or `allFaces`. This is `all` by default. If setting a variable for this argument, use `focus_var` instead. + * `gravity` - (Optional) The placement of the crop relative to the faces, plus padding. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + `height` - (Optional) The height of the output image in pixels relative to the specified `style` value. If setting a variable for this argument, use `height_var` instead. + * `padding` - (Optional) The padding ratio based on the dimensions of the biggest face detected, This is `0.5` by default. Larger values increase padding. If setting a variable for this argument, use `padding_var` instead. + * `style` - (Optional) How to crop, or scale a crop area, for the faces detected in the source image. This is `zoom` by default. The output image is resized to the specified `width` and `height` values. A value of `crop` places a raw crop around the faces relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and faces as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the faces, relative to the specified `width` and `height` values. If setting a variable for this argument, use `style_var` instead. + * `width` - (Optional) The width of the output image in pixels relative to the specified `style` value. If setting a variable for this argument, use `width_var` instead. + +## Feature Crop + +This transformation supports these arguments: + +* `feature_crop` - (Optional) Identifies prominent features of the source image, then crops around as many of these as possible relative to the specified `width` and `height` values. + * `fail_gravity` - (Optional) The placement of the crop if Image and Video Manager does not detect any features in the image. Directions are relative to the edges of the image being transformed. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `fail_gravity_var` instead. + * `feature_radius` - (Optional) The size in pixels of the important features to search for. If identified, two features never appear closer together than this value which is `8.0` by default. If setting a variable for this argument, use `feature_radius_var` instead. + * `gravity` - (Optional) The placement of the crop relative to the region of interest plus padding. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + * `height` - (Optional) The height in pixels of the output image relative to the specified `style` value. If setting a variable for this argument, use `height_var` instead. + * `max_features` - (Optional) The maximum number of features to identify as important features. This maximum number of features is `32` by default. The strongest features are always chosen. If setting a variable for this argument, use `max_features_var` instead. + * `min_feature_quality` - (Optional) The minimum quality level of the feature identified. To be considered important, the feature needs to surpass this value. Image and Video Manager measures quality on a scale from `0` (lowest) to `1` (highest). This is `0.1` by default. If setting a variable for this argument, use `min_feature_quality_var` instead. + * `padding` - (Optional) Adds space around the region of interest. The amount of padding added is directly related to the size of the bounding box of the selected features. Specifically, the region of interest is expanded in all directions by the largest dimension of the bounding box of the selected features multiplied by this value. If setting a variable for this argument, use `padding_var` instead. + * `style` - (Optional) Specifies how to crop or scale a crop area for the features identified in the source image. This is `fill` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` performs a raw crop around the features relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and features as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the features, relative to the specified `width` and `height` values. If setting a variable for this argument, use `style_var` instead. + * `width` - (Optional) The width in pixels of the output image relative to the specified `style` value. If setting a variable for this argument, use `width_var` instead. + +## Fit and Fill + +This transformation supports these arguments: + +* `fit_and_fill` - (Optional) Resizes an image to fit within a specific size box and then uses a fill of that same image to cover any transparent space at the edges. By default, the fill image has a Blur transformation with a sigma value of `8` applied. You can use the `fill_transformation` argument to customize the transformation. + * `fill_transformation` - Used to customize the sigma value for the fill image. + * `height` - (Optional) The height value of the resized image. If setting a variable for this argument, use `height_var` instead. + * `width` - (Optional) The width value of the resized image. If setting a variable for this argument, use `width_var` instead. + +## Goop + +This transformation supports these arguments: + +* `goop` - (Optional) Distorts an image by randomly repositioning a set of control points along a specified grid. The transformed image appears _goopy_. Adjust the density of the grid and the degree of randomity. You can use this transformation to create watermarks for use in security. + * `chaos` - (Optional) The greatest distance control points may move from their original position. A value of `1.0` shifts control points over as far as the next one in the original grid. A value of `0.0` leaves the image unchanged. Values under `0.5` work better for subtle distortions, otherwise control points may pass each other and cause a twisting effect. If setting a variable for this argument, use `chaos_var` instead. + * `density` - (Optional) The density of control points used to distort the image. The largest dimension of the input image is divided up to fit this number of control points. A grid of points is extended on the smaller dimension such that each row and column of control points is equidistant from each adjacent row or column. This parameter strongly affects transformation performance. Be careful choosing values above the default if you expect to transform medium to large sized images. If setting a variable for this argument, use `density_var` instead. + * `power` - (Optional) By default, the distortion algorithm relies on inverse squares to calculate distance but this allows you to change the exponent. You shouldn't need to vary the default value of `2.0`. If setting a variable for this argument, use `power_var` instead. + * `seed` - (Optional) Your own seed value as an alternative to the default, which is subject to variability. This allows for reproducible and deterministic distortions. If all parameters are kept equal and a constant seed is used, `goop` distorts an input image consistently over many transformations. By default, this value is set to the current epoch time measured in milliseconds, which provides inconsistent transformation output. If setting a variable for this argument, use `seed_var` instead. + +## Grayscale + +This transformation supports these arguments: + +* `grayscale` - (Optional) Restricts image color to shades of gray only. + * `type` - (Optional) The algorithm used to transform colors to grays. The available types are `Brightness`, `Lightness`, `Rec601`, or the default `Rec709`. If setting a variable for this argument, use `type_var` instead. + +## HSL (Hue/Saturation/Lightness) + +This transformation supports these arguments: + +* `hsl` - (Optional) The hue, saturation, and lightness (HSL) of an image. Hue is the number of degrees of rotation around the color wheel. Saturation is a multiplier to increase or decrease color saturation. Lightness is a multiplier to increase or decrease the lightness of an image. Other transformations can also affect color, such as [`grayscale`](#grayscale) and [`max_colors`](#max-colors). If you're using more than one of these transformations, consider the order of application for the desired results. + * `hue` - (Optional) The number of degrees to rotate colors around the color wheel. The default is `0`. If setting a variable for this argument, use `hue_var` instead. + * `lightness` - (Optional) A multiplier to adjust the lightness of colors in the image. Note that lightness is distinct from brightness. For example, reducing the lightness of a light green might give you a lime green whereas reducing the brightness of a light green might give you a darker shade of the same green. Values less than `1.0` decrease the lightness of colors in the image. Values greater than `1.0` increase the lightness of colors in the image. If setting a variable for this argument, use `lightness_var` instead. + * `saturation` - (Optional) A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image. If setting a variable for this argument, use `saturation_var` instead. + +## HSV (Hue/Saturation/Value) + +This transformation supports these arguments: + +* `hsv` - (Optional) The hue, saturation, and value (HSV) of an image. `hsv` is like `hsl` except `lightness` is replaced with `value`. To illustrate the difference, if you reduce the `lightness` of a light green (almost white), the color becomes a vibrant green, but if you reduce the `value`, the color becomes darker, close to gray. This happens because the original image color is very close to white. + * `hue` - (Optional) The number of degrees to rotate colors around the color wheel. This is `0.0` by default. If setting a variable for this argument, use `hue_var` instead. + * `saturation` - (Optional) A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image. If setting a variable for this argument, use `saturation_var` instead. + * `value` - (Optional) A multiplier to adjust the lightness or darkness of the image's base color. Values less than `1.0` decrease the base colors in the image, making them appear darker. Values greater than `1.0` increase the base colors in the image, making them appear lighter. If setting a variable for this argument, use `value_var` instead. + +## If Dimension + +This transformation supports these arguments: + +* `if_dimension` - (Optional) Chooses a transformation depending on the dimensions of the source image. + * `default` - (Optional) A no-op transformation, by default. + * `dimension` - (Optional) The dimension to use to select the transformation, either `height`, `width`, or `both`. If setting a variable for this argument, use `dimension_var` instead. + * `equal` - (Optional) The transformation is performed only if the source image's dimension is equal to the value listed. + * `greater_than` - (Optional) The transformation is performed if the source image's dimension is greater than the value listed. + * `less_than` - (Optional) The transformation is performed if the source image's dimension is less than the value listed. + * `value` - (Optional) The value against which to compare the source image dimension. For example, if the image dimension is less than the value, the `less_than` transformation is applied. If setting a variable for this argument, use `value_var` instead. + +# If Orientation + +This transformation supports these arguments: + +* `if_orientation` - (Optional) Chooses a transformation depending on the orientation of the source image. + * `default` - (Optional) A no-op transformation, by default. + * `landscape` - (Optional) The transformation is performed if the source image uses landscape orientation. + * `portrait` - (Optional) The transformation is performed if the source image uses portrait orientation. + * `square` - (Optional) The transformation is performed if the source image uses a square orientation. + +## IMQuery + +This transformation supports these arguments: + +* `im_query` - (Optional) Applies artistic transformations on a per-image basis by specifying transformations with a query string appended to the image URL. + * `allowed_transformations` - (Required) Specifies the transformations you can apply with the query string parameter. `append`, `blur`, and `crop` are supported. + * `query_var` - (Required) The variable to use. + +## Max Colors + +This transformation supports these arguments: + +* `max_colors` - (Optional) Sets the maximum number of colors in the image’s palette. Reducing the number of colors in an image can help to reduce file size. + * `colors` - (Optional) The value representing the maximum number of colors to use in the source image. If setting a variable for this argument, use `colors_var` instead. + +## Mirror + +This transformation supports these arguments: + +* `mirror` - (Optional) Flips an image horizontally, vertically, or both. + * `horizontal` - (Optional) Flips the image horizontally. If setting a variable for this argument, use `horizontal_var` instead. + * `vertical` - (Optional) Flips the image vertically. If setting a variable for this argument, use `vertical_var` instead. + +## Mono Hue + +This transformation supports these arguments: + +* `mono_hue` - (Optional) Allows you to set all hues in an image to a single specified hue of your choosing. Mono Hue maintains the original color’s lightness and saturation but sets the hue to that of the specified value. This has the effect of making the image various shades of the specified hue. + * `hue` - (Optional) The hue which is indicated by the degree of rotation (between 0 and 360) around the color wheel. By default, Mono Hue applies a red hue, which is `0.0` on the color wheel. If setting a variable for this argument, use `hue_var` instead. + +## Opacity + +This transformation supports this argument: + +* `opacity` - (Optional) The level of transparency of an image represented as an alpha value on a scale of `0` to `1`. An image with no transparency is opaque. Values below `1` decrease opacity with `0` being completely transparent. For images with some transparency, values above `1` increase the opacity of the transparent portions. If setting a variable for this argument, use `opacity_var` instead. + +## Region of Interest Crop + +This transformation supports these arguments: + +* `region_of_interest_crop` - (Optional) Crops around a specified area of interest (region) relative to the specified `width` and `height` values. + * `region_of_interest` - (Required) The bounding shape of the important features to search for, which is one of `circle_shape`, `point_shape`, `polygon_shape`, `rectangle_shape`, or `union_shape`. See [Shape types](#shape-types). + * `gravity` - (Optional) The placement of the crop area relative to the specified area of interest. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and `Center` by default. If setting a variable for this argument, use `gravity_var` instead. + * `height` - (Optional) The height in pixels of the output image relative to the specified `style` value. If setting a variable for this argument, use `height_var` instead. + * `style` - (Optional) Specifies how to crop, or scale a crop area, for the specified area of interest in the source image. The output image resizes to the specified `width` and `height` values. A value of `crop` places raw crop around the point of interest, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and point of interest as possible, relative to the specified `width` and `height` values. A value of `zoom` (the default) scales the crop area as small as possible to fit the point of interest, relative to the specified `width` and `height` values. If setting a variable for this argument, use `style_var` instead. + * `width` - (Optional) The width in pixels of the output image relative to the specified `style` value. If setting a variable for this argument, use `width_var` instead. + +## Relative Crop + +This transformation supports these arguments: + +* `relative_crop` - (Optional) Shrinks or expands an image relative to the image's specified dimensions. Image and Video Manager fills the expanded areas with transparency. Positive values shrink the side, while negative values expand it. + * `east` - (Optional) The number of pixels to shrink or expand the right side of the image. If setting a variable for this argument, use `east_var` instead. + * `north` - (Optional) The number of pixels to shrink or expand the top side of the image. If setting a variable for this argument, use `north_var` instead. + * `south` - (Optional) The number of pixels to shrink or expand the bottom side of the image. If setting a variable for this argument, use `south_var` instead. + * `west` - (Optional) The number of pixels to shrink or expand the left side of the image. If setting a variable for this argument, use `west_var` instead. + +## Remove Color + +This transformation supports these arguments: + +* `remove_color` - (Optional) Removes a specified color from an image and replaces it with transparent pixels. This transformation is ideal for removing solid background colors from product images photographed on clean, consistent backgrounds without any shadows. + * `color` - (Optional) The hexadecimal CSS color value to remove. If setting a variable for this argument, use `color_var`. + * `feather` - (Optional) Used to minimize any hard edges and to make the color removal more gradual in appearance. This option allows you to extend the color removal beyond the specified `tolerance`. The pixels in this extended tolerance become semi-transparent which creates a softer edge. The first time there’s a real-time request for an image, this option may result in a slow transformation time, but subsequent requests aren't impacted as the transformed image is served directly from the cache. If setting a variable for this argument, use `feather_var` instead. + * `tolerance` - (Optional) Defines how close the color needs to be to the selected color before it's changed to fully transparent. Set to `0.0` to remove only the exact color specified. If setting a variable for this argument, use `tolerance_var` instead. + +## Resize + +This transformation supports these arguments: + +* `resize` - (Optional) Resizes an image to a particular, absolute dimension. If you don't enter `width` or `height`, this transformation uses the `fit` aspect preservation mode, which selects a value for the missing dimension that preserves the image's aspect. + * `aspect` - (Optional) Preserves the aspect ratio. Select `fit` to make the image fit entirely within the selected width and height. When using `fit`, the resulting image has the largest possible size for the specified dimensions. Select `fill` to size the image so it both completely fills the dimensions and has the smallest possible file size. Otherwise `ignore` changes the original aspect ratio to fit within an arbitrarily shaped rectangle. If setting a variable for this argument, use `aspect_var` instead. + * `height` - (Optional) The height to which to resize the source image. Must be set if width is not specified. If setting a variable for this argument, use `height_var` instead. + * `type` - (Optional) The type of constraints on the image resize. Select `normal` to resize in all cases, either increasing or decreasing the dimensions. Select `downsize` to ignore this transformation if the result would be larger than the original. Select `upsize` to ignore this transformation if the result would be smaller. If setting a variable for this argument, use `type_var` instead. + * `width` - (Optional) The width to which to resize the source image. Must be set if height is not specified. If setting a variable for this argument, use `width_var` instead. + +## Rotate + +This transformation supports these arguments: + +* `rotate` - (Optional) Rotates the image around its center by indicating the degrees of rotation. + * `degrees` - (Optional) The value by which to rotate the image. Positive values rotate clockwise, while negative values rotate counter-clockwise. If setting a variable for this argument, use `degrees_var` instead. + +## Scale + +This transformation supports these arguments: + +* `scale` - (Optional) Changes the derivative image's dimensions relative to the original image’s. + * `height` - (Optional) The scaling factor for the input height that is used to determine the output height of the image. Values between `0` and `1` decrease image height. Values greater than 1 increase the image height. A value of `1` leaves the height unchanged. Image dimensions need to be non-zero positive numbers. If setting a variable for this argument, use `height_var` instead. + * `width` - (Optional) The scaling factor for the input width that is used to determine the output width of the image. Values between `0` and `1` decrease image width. Values greater than 1 increase the image width. A value of `1` leaves the width unchanged. Image dimensions need to be non-zero positive numbers. If setting a variable for this argument, use `width_var` instead. + +## Shear + +This transformation supports these arguments: + +* `shear` - (Optional) Slants an image into a parallelogram as a percent of the starting dimension in decimal format. You need to specify at least one axis property. Transparent pixels fill empty areas around the sheared image as needed, so it's often useful to use a `background_color` transformation for these areas. + * `x_shear` - (Optional) The amount to shear along the x-axis, measured in multiples of the image's width. Must be set if `y_shear` isn't specified. If setting a variable for this argument, use `x_shear_var` instead. + * `y_shear` - (Optional) The amount to shear along the y-axis, measured in multiples of the image's height. Must be set if `x_shear` isn't specified. If setting a variable for this argument, use `y_shear_var` instead. + +## Trim + +This transformation supports these arguments: + +* `trim` - (Optional) Automatically crops the background uniformly from the edges of an image. + * `fuzz` - (Optional) The fuzz tolerance of the trim expressed as a value between `0` and `1`. This determines the acceptable amount of background variation before trimming stops. If setting a variable for this argument, use `fuzz_var` instead. + * `padding` - (Optional) The amount of padding in pixels to add to the trimmed image. If setting a variable for this argument, use `padding_var` instead. + + +## Unsharp Mask + +This transformation supports these arguments: + +* `unsharp_mask` - (Optional) Emphasizes edges and details in source images without distorting the colors. Although this effect is often referred to as _sharpening_ an image, it actually creates a blurred, inverted copy of the image known as an unsharp mask. Image and Video Manager combines the unsharp mask with the source image to create an image that is perceived by the human eye as clearer. + * `gain` - (Optional) How much emphasis the filter applies to details. Higher values increase apparent sharpness of details. If setting a variable for this argument, use `gain_var` instead. + * `sigma` - (Optional) The standard deviation of the Gaussian distribution used in the unsharp mask, measured in pixels. This is `1.0` by default. High values emphasize large details and low values emphasize small details. If setting a variable for this argument, use `sigma_var` instead. + * `threshold` - (Optional) The minimum change required to include a detail in the filter. Higher values discard more changes. If setting a variable for this argument, use `threshold_var` instead. + +## Image types + +You can, and in some cases may be required to, specify these image types for certain transformations: +* `box_image` - (Optional) A rectangular box with a specified fill color and applied transformation. + * `color` - (Optional) The fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use `color_var` instead. + * `height` - (Optional) The height of the box in pixels. If setting a variable for this argument, use `height_var` instead. + * `transformation` - (Optional) The transformation to apply to the box. + * `width` - (Optional) The width of the box in pixels. If setting a variable for this argument, use `width_var` instead. +* `circle_image` - (Optional) A rectangular box, with a specified color and applied transformation. + * `color` - (Optional) The fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use `color_var` instead. + * `diameter` - (Optional) The diameter of the circle. The diameter will be the width and the height of the image in pixels. If setting a variable for this argument, use `diameter_var` instead. + * `transformation` - (Optional) The transformation to apply to the circle. + * `width` - (Optional) The width of the box in pixels. If setting a variable for this argument, use `width_var` instead. +* `text_image` - (Optional) A snippet of text. Defines font family and size, fill color, as well as outline stroke width and color. + * `fill` - (Optional) The main fill color of the text. If setting a variable for this argument, use `fill_var` instead. + * `size` - (Optional) The size in pixels to render the text. If setting a variable for this argument, use `size_var` instead. + * `stroke` - (Optional) The color for the outline of the text. If setting a variable for this argument, use `stroke_var` instead. + * `stroke_size` - (Optional) The thickness in points for the outline of the text. If setting a variable for this argument, use `stroke_size_var` instead. + * `text` - (Optional) The line of text to render. If setting a variable for this argument, use `text_var` instead. + * `transformation` - (Optional) The transformation to apply to the text. + * `typeface` - (Optional) The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts. If setting a variable for this argument, use `typeface_var` instead. +* `url_image` - (Optional) An image loaded from a URL. + * `transformation` - (Optional) The transformation to apply to the image. + * `url` - (Optional) The URL of the image. If setting a variable for this argument, use `url_var` instead. + +### Example + +Here’s an example of a text image within an append transformation. + + transformations { + append { + gravity = "Center" + gravity_priority = "horizontal" + image { + text_image { + fill = "#000000" + size = 72 + stroke = "#FFFFFF" + stroke_size = 0 + text = "test" + } + } + +## Shape types + +You can specify these shape types for certain transformations: +* `circle_shape` - (Optional) Defines a circle with a specified `radius` from its `center` point. + * `center` - (Required) Defines coordinates for a single point, to help define polygons and rectangles. Each point may be an object with `x`and `y` members, or a two-element array. + * `radius` - (Optional) The radius of the circle measured in pixels. If setting a variable for this argument, use `radius_var` instead. +* `point_shape` - (Optional) Defines coordinates for a single point to help define polygons and rectangles. Each point may be an object with x and y members, or a two-element array. + * `x` - (Optional) The horizontal position of the point, measured in pixels. If setting a variable for this argument, use `x_var` instead. + * `y` - (Optional) The vertical position of the point, measured in pixels. If setting a variable for this argument, use `y_var` instead. +* `polygon_shape` - (Optional) Defines a polygon from a series of connected points. + * `points` - (Required) A series of `point_shape` objects. The last and first points connect to close the shape automatically. +* `rectangle_shape` - (Optional) Defines a rectangle's `width` and `height` relative to an `anchor` point at the top left corner. + * `anchor` - (Required) The anchor point for the rectangle. + * `height` - (Optional) Extends the rectangle down from the `anchor` point. If setting a variable for this argument, use `height_var` instead. + * `width` - (Optional) Extends the rectangle right from the `anchor` point. If setting a variable for this argument, use `width_var` instead. +* `union_shape` - (Optional) Identifies a shape based on a combination of other shapes. You can use an object to represent a union or an array of shapes that describe it. + * `shapes` - (Required) The set of shapes to combine to form the union. + +### Example + +Here’s an example of a rectangle shape within a region of interest crop. + +```hcl + transformations { + region_of_interest_crop { + gravity = "Center" + height = 8 + region_of_interest { + rectangle_shape { + anchor { + x = 4 + y = 5 + } + height = 9 + width = 8 + } + } + style = "fill" + width = 7 + } + } +``` diff --git a/docs/index.md b/docs/index.md index 10b8ae926..a36a75e39 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,20 +31,12 @@ Once you fix any issues, you can run `terraform plan` again and make sure everyt ## Links to resources -Here are some links to resources that can help get you started with the Akamai Terraform Provider. +Here are some links to resources to help you get started: -### New to Akamai? - -If you're new to Akamai, here are some links to help you get started: - -* [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) +* [Create Akamai authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) +* [Akamai's Terraform Tapas video series](https://www.youtube.com/playlist?list=PLDlttLRccCk7a-JNb-xFH6dz4WqG53JQa) * [Akamai Community site](https://community.akamai.com/customers/s/) - -### New to Terraform? - -If you're new to Terraform, here are some links you might find helpful: - -* [Get started tutorials](https://learn.hashicorp.com/collections/terraform/cloud-get-started) +* [Terraform tutorials](https://learn.hashicorp.com/collections/terraform/cloud-get-started) * [Terraform module tutorials](https://learn.hashicorp.com/collections/terraform/modules) * [Terraform configuration language tutorials](https://learn.hashicorp.com/collections/terraform/configuration-language) * [Terraform glossary](https://www.terraform.io/docs/glossary.html) diff --git a/docs/resources/cps_dv_enrollment.md b/docs/resources/cps_dv_enrollment.md index 79c20050e..b590b97f2 100644 --- a/docs/resources/cps_dv_enrollment.md +++ b/docs/resources/cps_dv_enrollment.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: DV Enrollment" -subcategory: "CPS" +subcategory: "Certificate Provisioning System" description: |- DV Enrollment --- diff --git a/docs/resources/cps_dv_validation.md b/docs/resources/cps_dv_validation.md index b547448c2..e5d1052b0 100644 --- a/docs/resources/cps_dv_validation.md +++ b/docs/resources/cps_dv_validation.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: Certificate Domain Validation" -subcategory: "CPS" +subcategory: "Certificate Provisioning System" description: |- Domain Validation --- diff --git a/docs/resources/dns_record.md b/docs/resources/dns_record.md index 71604a246..d6a0b1745 100644 --- a/docs/resources/dns_record.md +++ b/docs/resources/dns_record.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: DNS Record" -subcategory: "DNS" +subcategory: "Edge DNS" description: |- DNS record --- diff --git a/docs/resources/dns_zone.md b/docs/resources/dns_zone.md index 19fbce831..84ecebedb 100644 --- a/docs/resources/dns_zone.md +++ b/docs/resources/dns_zone.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: dns zone" -subcategory: "DNS" +subcategory: "Edge DNS" description: |- DNS Zone --- diff --git a/docs/resources/iam_user.md b/docs/resources/iam_user.md index 746e47bd0..36dac8b6b 100644 --- a/docs/resources/iam_user.md +++ b/docs/resources/iam_user.md @@ -1,7 +1,7 @@ --- layout: "akamai" page_title: "Akamai: user" -subcategory: "IAM" +subcategory: "Identity and Access Management" description: |- Create user resources. --- diff --git a/go.mod b/go.mod index 45754eb7f..803bf0b31 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/akamai/terraform-provider-akamai/v2 require ( - github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.12.0 + github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.13.0 github.com/allegro/bigcache/v2 v2.2.5 github.com/apex/log v1.9.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 @@ -38,7 +38,7 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.5.3 // indirect + github.com/hashicorp/go-getter v1.5.11 // indirect github.com/hashicorp/go-multierror v1.0.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-uuid v1.0.1 // indirect diff --git a/go.sum b/go.sum index 3c3a44287..4311fae75 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -54,12 +55,13 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.12.0 h1:+burAM1odRca0uwE+NMKQ4balG0Yk0wonxt6BQ8LKbo= -github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.12.0/go.mod h1:NUp3zcqw6k6AXwf9yr8ksTXpppJTbm35kXeqwdNreRc= +github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.13.0 h1:DfWAzGV5lIMPZhuSzzFSfW6elR5fWqiaPW41arm9w+A= +github.com/akamai/AkamaiOPEN-edgegrid-golang/v2 v2.13.0/go.mod h1:MURtCG1+RCi2X8ripBKIfEIXz3a7aAZfV94DgLovem8= github.com/allegro/bigcache/v2 v2.2.5 h1:mRc8r6GQjuJsmSKQNPsR5jQVXc8IJ1xsW5YXUYMLfqI= github.com/allegro/bigcache/v2 v2.2.5/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY= github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= @@ -74,6 +76,8 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= @@ -87,6 +91,7 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -96,6 +101,9 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -113,6 +121,8 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= @@ -130,6 +140,8 @@ github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead5 github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -178,6 +190,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -202,42 +215,59 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20220221023154-0b2280d3ff96 h1:QJq7UBOuoynsywLk+aC75rC2Cbi2+lQRDaLaizhA+fA= github.com/gopherjs/gopherjs v0.0.0-20220221023154-0b2280d3ff96/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-getter v1.5.3 h1:NF5+zOlQegim+w/EUhSLh6QhXHmZMEeHLQzllkQ3ROU= github.com/hashicorp/go-getter v1.5.3/go.mod h1:BrrV/1clo8cCYu6mxvboYg+KutTiFnXjMEgDD8+i7ZI= +github.com/hashicorp/go-getter v1.5.11 h1:wioTuNmaBU3IE9vdFtFMcmZWj0QzLc6DYaP6sNe5onY= +github.com/hashicorp/go-getter v1.5.11/go.mod h1:9i48BP6wpWweI/0/+FBjqLrp9S8XtwUGjiu0QkWHEaY= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.15.0 h1:qMuK0wxsoW4D0ddCCYwPSTm4KQv1X1ke3WmPWZ0Mvsk= github.com/hashicorp/go-hclog v0.15.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= github.com/hashicorp/go-plugin v1.4.1 h1:6UltRQlLN9iZO513VveELp5xyaFxVD2+1OVylE+2E+w= github.com/hashicorp/go-plugin v1.4.1/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.3.0 h1:iRly8YaMwTBAKhn1Ybk7VSdzbnopghktCD031P8ggUE= github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/terraform-exec v0.14.0 h1:UQoUcxKTZZXhyyK68Cwn4mApT4mnFPmEXPiqaHL9r+w= github.com/hashicorp/terraform-exec v0.14.0/go.mod h1:qrAASDq28KZiMPDnQ02sFS9udcqEkRly002EA2izXTA= github.com/hashicorp/terraform-json v0.12.0 h1:8czPgEEWWPROStjkWPUnTQDXmpmZPlkQAwYYLETaTvw= @@ -256,6 +286,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.0.4 h1:7WaHUeKo5yc2vABlsh30p4VWxQoXaWktBY/nR/2qnPg= @@ -272,6 +303,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -279,10 +311,12 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -295,6 +329,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -311,6 +346,8 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -325,12 +362,20 @@ github.com/mitchellh/go-testing-interface v1.0.4/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs= @@ -338,31 +383,50 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -373,6 +437,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= @@ -399,6 +464,9 @@ github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q github.com/zclconf/go-cty v1.8.4 h1:pwhhz5P+Fjxse7S7UriBrMu6AUJSZM5pKqGem1PjGAs= github.com/zclconf/go-cty v1.8.4/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -407,11 +475,16 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -462,6 +535,8 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -522,9 +597,11 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -537,7 +614,9 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -569,6 +648,8 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71 h1:ikCpsnYR+Ew0vu99XlDp55lGgDJdIMx3f4a18jfse/s= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -590,6 +671,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -599,6 +681,7 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -621,6 +704,7 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -630,6 +714,7 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= @@ -694,6 +779,7 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -728,6 +814,7 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -757,6 +844,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -764,6 +852,7 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf index ec3dbcd35..90e52b47a 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf index a32470278..3b5a07b50 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf index b6f595415..a75c0d7df 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf index e7fb81a39..8812e0a9f 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf index feecebbd4..d677dc6b3 100644 --- a/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf index 95259a3df..97203b47a 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf index 05ae2c1af..e9d3e2ff1 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf index 2d8869179..dcb745281 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf index 99100cc24..cfbf5c857 100644 --- a/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf index ee36fabe2..35c055c1e 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf index 14c963b3a..0d8bbb0f0 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf index 383a75ec9..bbb5bbb32 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf index 100801d8a..88f4b1337 100644 --- a/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf index f0de4ed77..49ea198e0 100644 --- a/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf index 88ba98085..3be40cc4c 100644 --- a/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf index f07ff9144..332ccd6b9 100644 --- a/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf index 232a01f2c..f81d6e17a 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf index 947a35977..7ac309231 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf index f41801ace..f335b07ee 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf index 6033ebd02..565c0017c 100644 --- a/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf index 7ace1df01..0cc4f6661 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf index 23c77450b..8676b243f 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf index cededee01..6c79509a9 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf index e51cb9e6d..3a255ec35 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf index 11e7eeff8..86c5dd1a0 100644 --- a/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf index 2c6f828ba..04dfd5f3f 100644 --- a/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf index b45d54ab9..6a361f190 100644 --- a/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf index a134f5c8c..d3a9e88e8 100644 --- a/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf index 7b96bd98c..57acad955 100644 --- a/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf index 2654f0865..863494ce5 100644 --- a/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf index 63619511d..cc222f816 100644 --- a/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf index 9950d51ac..e3dccdf7f 100644 --- a/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf index 5ae3bf158..33b205f25 100644 --- a/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf index b6098b2f4..19a10623b 100644 --- a/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf index 6fa2ccfef..46d0f71e6 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf index 4d4bbe7ec..7dc6d47b6 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf index 432d263c1..74688fc85 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf index 3e3e32b99..f820f53e1 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf index c9e097b09..844172e0c 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf index 6f5c181fd..664849b40 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf index bd2d2ae87..e3543f972 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf index dcd9ae3e7..e4bef20d2 100644 --- a/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf index ca66753b9..1b0ca12d3 100644 --- a/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf index dfe628ec3..051b5fdcb 100644 --- a/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf index 455810613..f18b80664 100644 --- a/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf index 64e9fc5db..206b77c1f 100644 --- a/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf index ce85c71e4..6f671a38c 100644 --- a/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf index 99e9ee601..e9a007c0d 100644 --- a/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf index c72a26bc5..681bc2f4b 100644 --- a/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf index fb2ab186e..20b7fbf5a 100644 --- a/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf index 8603beddf..0269bfc6c 100644 --- a/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf index 228edd552..c647f565c 100644 --- a/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf index 1c98ae5d0..caa8b192f 100644 --- a/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf index 5b7e086b9..6eff0964b 100644 --- a/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf index 942d1861a..0287aca75 100644 --- a/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf index 6b4123509..14cfcea20 100644 --- a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf index 76bb6cbd7..0aa44cc58 100644 --- a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf b/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf index 9a8f7c1f3..4ad58e9fa 100644 --- a/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf index 1572d4e51..69fe8758a 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf index 48458f3cc..0bac7554b 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf index 276145811..a34441218 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf index 15038adf7..21f3ba6c2 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf b/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf index 2430272a9..5a08c5f5d 100644 --- a/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf index 6ba59e522..324d9a41d 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf index 4c9abfb1a..743dafe0a 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf index f29983ea1..9b797f87b 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf b/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf index 6e2e1569d..750d30f7e 100644 --- a/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf index 915802a48..09d262983 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf b/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf index 1c4db9e5a..dfe6a7914 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf b/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf index 45b2de2e3..57463348f 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf index a0329cedb..2284db0e0 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf index eb244bc1a..916c8b0e1 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf index eb244bc1a..916c8b0e1 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf index 995280bae..2ee05e8a5 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf index 0797bbadf..a3ad4dbb2 100644 --- a/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf index 2e2f757ff..81518d63b 100644 --- a/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf index 95c8bc8aa..5d7e0bfce 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf index f7581cba5..d1c0ded1a 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf index 6cb30f5b0..e341f4352 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf index 7dfbab79c..02f83c36c 100644 --- a/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf b/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf index 7dfbab79c..02f83c36c 100644 --- a/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf index 8a863d38a..80f0ac9aa 100644 --- a/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf index 85ded9f85..9d7ed6c7f 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf index 9a7ce6a14..7e89b6928 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf index bcdbb6123..91e294d49 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf index d81b9f748..e1c896b4d 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf index c226da95d..4d3b0bc55 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf index f5c43bb9b..6c1627b8c 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf index 9b0709955..3e59caa3c 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf index 4d0182444..89345b769 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf index 48a146f6a..089b7b8ec 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf index 48a146f6a..089b7b8ec 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf index b4fdf9b55..2e26ab982 100644 --- a/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf index 4d47e9d3f..0b98edaf5 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf index c4e7bb933..6b8ba2658 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicyAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicyAction/match_by_id.tf index d0c535362..c826b1f73 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicyAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicyAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicyAction/update_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicyAction/update_by_id.tf index 8df7980c0..5eddac2a0 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicyAction/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicyAction/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf index e09955dd5..8ddf6493c 100644 --- a/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf index 57f24e9a9..5ed5fc9a4 100644 --- a/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf index f4a3fdc37..acaeaefbf 100644 --- a/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf index f4a3fdc37..acaeaefbf 100644 --- a/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf index d5fe74ccc..4fd1a073d 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf index d5fe74ccc..4fd1a073d 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf index 1f94dfd15..3880d7a06 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf index 85f3be13c..3d79576ee 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf index edfc80092..bff42ab4e 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf index 70ec92790..a2134522c 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf index 280594a36..5a272a45e 100644 --- a/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRule/match_by_id_aseauto.tf b/pkg/providers/appsec/testdata/TestResRule/match_by_id_aseauto.tf index f83e0f93b..eb5adfd49 100644 --- a/pkg/providers/appsec/testdata/TestResRule/match_by_id_aseauto.tf +++ b/pkg/providers/appsec/testdata/TestResRule/match_by_id_aseauto.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf index bc8bb917c..85fffed6d 100644 --- a/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf index 48671337b..2f1d95f64 100644 --- a/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf index 6ac444c61..d6eeee18a 100644 --- a/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf index 3a13c79a9..71946748d 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf index c90908027..c6cf6d7d3 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf index 6087b844c..74e8fef86 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf index 95f2ea610..6c8596360 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf index 95f2ea610..6c8596360 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf index 7f61c8047..ed31feb8b 100644 --- a/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf index 99ecd7bf5..c3300dd75 100644 --- a/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf index 5ee395251..245bdaa9b 100644 --- a/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf index 939937605..7c1fbca94 100644 --- a/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf b/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf index 3bf4869cf..7f34d384f 100644 --- a/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf b/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf index f7d2c3740..d1a8307fb 100644 --- a/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf index 57e43fba4..203770d01 100644 --- a/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf index c7d10fc44..a1ebff043 100644 --- a/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf index 1c370b5d4..490a443b9 100644 --- a/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf index 0f432c947..03aa1e8a9 100644 --- a/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" cache_enabled = false } diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf index f3df2161d..b44e500dd 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf index 77c3d4cb7..50842bb59 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf index f6ab2d913..0d5881121 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf index 5b54bf63e..1f1557f54 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf index 7558172e6..7e8e2f3e1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf index 26eda2cc4..06e96c04a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf index 2b6092fd1..0a06643af 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf index b1532af53..0f6889e7d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf index 0cb2090d3..6aae45a50 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf index 57f4ef7f9..cc0be32b1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf index e06911c5d..ecf214a55 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf index 286566874..afed52c99 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf index 6aabe864a..75a8c61be 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf index c1f5e503b..75ffe7c21 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf index b94428c46..fbc66f29b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf index b8ffa3667..61f0d4cba 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf index 7b912c72d..bd24c230a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf index 1848440db..014a12c70 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf index 5ae2697f0..b3913ad3b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf index 88a6eb30e..76ba007ee 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf index b015249ed..f0c284d28 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf index bb4f2f2f9..bc4e8f1bc 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf index 4bc421037..0fabfb424 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf index 78b8eefdc..b40e52738 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf index 67af6a284..8fab660dc 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf index c8678e9c1..1ce758c43 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf index 3ce9bd464..5496ccfda 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf index f11e6a61c..3f319d055 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf index c46b51261..f60559974 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf index e85b75252..6925065c1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf index e3f6575b1..b9f4bfe6e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf index 51db0f111..d8ead58ab 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf index 5407769f8..e53c50dc8 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf index 666731a9e..c7fff6912 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf index 29c3314b2..d9aefd2cc 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf index bb9716436..94a2555be 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf index 2633d2206..764a475f8 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf index a83cf421d..f3de0d2e2 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf index d1beb53c9..45721adb7 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf index 380b48e87..a65523526 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf index d77836b13..9da9f8359 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf index ad4dfcbdb..509349647 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf index 25f503a6d..2d172723b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf index e1d89ee39..72ef67943 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf index e164ca3fc..74c91124f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf index c601055b6..0a80a5914 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf index dabb4aafa..020079e7d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf index 71f770c88..9bd9d6840 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf index fd1750e30..0fc4ad753 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf index a586e7e08..911329e93 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf index 1b5159104..4483337c5 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf index c6b47fed1..7b9484974 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf index 88cacb07c..6cfb43d41 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf index 4afceafb8..d9d19d467 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf index be64bbac1..6970774e2 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf index 500a3d10f..5e2d1e598 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf index 72c2ca7e6..2e73a44dd 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf index c791b7112..8180d1d68 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf index 710a09510..3afa9edfa 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf index 1c6f1423c..b5603df11 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf index 62eb64450..5e556d48f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf index a8c3ef68d..8d81c2888 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf index 1e30f41ca..2e5706cd5 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf index 02a0d42a9..316a0a550 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf index 83f3f538a..f9bec7a98 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf index 3d66882f9..8683b651e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf index 72e69cf1e..20c315bce 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf index 8f433e575..e89ca64e8 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf index aa984a891..774262025 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf index e31afc2e3..f1f53676e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf index 4bc9405d1..d19cc9cb4 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf index 4d389e161..fce13acb1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf index f73fca755..4ed575074 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf index 4918d0d0a..ae0e80c45 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf index 7a3234995..0aba6f960 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf index b610e5ae2..4c8fe715d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf index 3e36e56c6..14b9e6508 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf index 1a4745ef4..6d656529e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf index f224ff4e7..0782b126b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf index 39c633100..4ec43b09d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf index dc49ea03e..bc3eec3c0 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf index ed7a92f72..347243a04 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf index 01df3d6ff..4173ffe6c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf index c9bcdf915..313306e05 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf index b9f0dd722..ec1bd6171 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf index 6f3b6484c..0e4984c3f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf index dfb8b520a..372530a5c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf index f714e06f4..07dd1eb65 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf index 1cb1d4bf8..341706755 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf index 6a30f608e..766155e91 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf index f9f433e00..1528adc2e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf index 5e4c3c30b..cd2f096c3 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf index c4b479644..9fb731d31 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf index 161a1b365..f00373a9f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf index da8f0aa4c..624cef441 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf index d6926c4c4..8333d6003 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf index 462e69a59..db9671374 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf index a76f9ab79..ed4732ffd 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf index 0754c8aff..5d99ad996 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf index 4f57f84a2..0200b15cb 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf index 6543182da..e08eace02 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf index 574516c57..dd8ab4733 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf index 31eaed9c6..fe9adcf97 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf index 410beec7b..3ad73c543 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf index b378f19f0..08497fafb 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf index 7a8ad0ef4..f94e4dd31 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf index 1a66ded85..75959c56c 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf index be29e55b3..2a4db3e4d 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf index b378f19f0..08497fafb 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf index 312424de2..9521ecc95 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf index b378f19f0..08497fafb 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf index 12699dc97..c506369cf 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf index b378f19f0..08497fafb 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf index b4bbd68a7..ba28bab3a 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf index 992b4208b..630495080 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf index 68422f4c2..d7be6a07f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf index ea6bc34a3..9f9118414 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf index 68422f4c2..d7be6a07f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf index 15866ce43..2e917d93d 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf index ea6bc34a3..9f9118414 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf index 463ca7575..bc71767d7 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf index ea6bc34a3..9f9118414 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf index 05775e999..5dfdc3d76 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf index ea6bc34a3..9f9118414 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf index 68422f4c2..d7be6a07f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf index 7e4caa305..545dcb80d 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf index b68dc684a..b1c8e7bcc 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf index 1b82bf9f3..351db17e1 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf index 3648d7976..74db038b4 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf index 36144dab6..b7348a20f 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf index e3d0d9e76..1cb8ccbb8 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf index c877a39bd..d5d2d81df 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf index 2d907d19a..bfeba4e95 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf index 9b897fe61..07a84d6f0 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf index 325814165..c0a2c5c35 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf index cb4936acd..22a91435d 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf index 2d907d19a..bfeba4e95 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf b/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf index c4108375f..ed8fd593a 100644 --- a/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf +++ b/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_validation" "dv_validation" { diff --git a/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf b/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf index 18cc0326d..96106498a 100644 --- a/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf +++ b/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cps_dv_validation" "dv_validation" { diff --git a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf index d3d97ede6..cf2889fc9 100644 --- a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf +++ b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_datastream_activation_history" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf index 9605d0714..c5c9a5d81 100644 --- a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf +++ b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_datastream_activation_history" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs.tf b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs.tf index 9986564c4..3dbc5e530 100644 --- a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs.tf +++ b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_datastream_dataset_fields" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs_no_template.tf b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs_no_template.tf index 66b6ba8ce..f9118bbb6 100644 --- a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs_no_template.tf +++ b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/edge_logs_no_template.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_datastream_dataset_fields" "test" {} \ No newline at end of file diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf index 6027b6135..6d458dcf2 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf index dae683cda..46527411b 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf index d985248d5..08bf359e4 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf index 2c4256645..c2ed7a1d6 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf index b8241c3f6..e310ae8e5 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf index d15eada6e..4910b36a9 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf index c44a428e2..edce8e6e0 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf index 0ad8a16c8..689e2e22d 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf index 59b0f44cc..269769e88 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf index 65ab41495..99c9c5070 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf index c9e796ca1..5f0fe3c1f 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf index 8b4395bb6..51a24c72b 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf index 702b89b42..d55efebba 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf index 832118d28..a36f15e27 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf index cf2a139f4..38fe2ddaa 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf index 2c4256645..c2ed7a1d6 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf index 1ea553b8e..b253fecc2 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf index db209f88b..c16b95ef4 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf index 2c4256645..c2ed7a1d6 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf index 9df7dc244..467a8941d 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf index 9627fddd7..86106cb36 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf b/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf index ee9dd4bd8..8577121a3 100644 --- a/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf +++ b/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_dns_record_set" "test" { diff --git a/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf b/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf index ae8c0e07a..62ae844c3 100644 --- a/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf +++ b/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_authorities_set" "test" { diff --git a/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf b/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf index c191ddec1..b90725db7 100644 --- a/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf +++ b/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_authorities_set" "test" { diff --git a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf index 493a0cc9e..a23c51091 100644 --- a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf +++ b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_dns_record" "a_record" { diff --git a/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf b/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf index 3f109ba84..dd8401c96 100644 --- a/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf +++ b/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_dns_record" "a_record" { diff --git a/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf b/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf index 50206177e..52c1f466b 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_dns_zone" "primary_test_zone" { diff --git a/pkg/providers/dns/testdata/TestResDnsZone/create_secondary.tf b/pkg/providers/dns/testdata/TestResDnsZone/create_secondary.tf index a9378eebb..3c066fc7c 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/create_secondary.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/create_secondary.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_dns_zone" "test_secondary_zone" { diff --git a/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf b/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf index 31eba4153..9f6808c0f 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_dns_zone" "primary_test_zone" { diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index fb40cc54f..034b3f556 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -549,7 +549,7 @@ func stubResourceEdgeKVCreatePhase(m *mockedgeworkers, namespaceName, net string }, }) if err, ok := item["error"]; ok { - onUpsert.Return(nil, fmt.Errorf("%s: %w", edgeworkers.ErrUpsertItem, err)).Once() + onUpsert.Return(nil, fmt.Errorf("%s: %s", edgeworkers.ErrUpsertItem, err)).Once() } else { onUpsert.Return(tools.StringPtr("OK"), nil).Once() } diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf index e0315394f..eade3df87 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_property_rules" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf index ae2c5794c..257020d87 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf index 43f7b3317..cca069ace 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf index 1c199a22c..79d0a6cb2 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf index 7492c0703..fb2b22357 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf index 8903bc49c..e2efeafbb 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf index a222cafa3..d891a1d6d 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf index 464ed4d0e..fa4b67157 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf index 0b5c4356e..cf9dd7695 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf index 59d6bb54c..f658de41f 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf index 2feb5506a..9b658663a 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf index b0c864250..8504b50df 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf index 978b6ad47..b501a9ee3 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf index 74c9e1c84..28e1dc99a 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf index 599939c47..2c00c0949 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf index 69996f135..4620b5850 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf index 1c52a9497..bfd667add 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf index 4161cef25..284069251 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf index fb7678188..88e7546ed 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf index d6e2c044f..b9ee1ac48 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf index 01dbfe5dc..09aa40954 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf index 61f977b4a..a63e0cf8e 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf index ae2f52a3d..12345c842 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf index bada482d7..9ff96ce7a 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf b/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf index 55763d3f4..cfe1641f2 100644 --- a/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf +++ b/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_gtm_default_datacenter" "test" { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf index 48fa87ec2..38c293593 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf index 987e11cb5..c2beb3bed 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf index 7b85b3cc8..127016210 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf index 52d13b7cf..2a1ebdca4 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf index 293a53861..f85a18ecc 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf index 451e73ded..4453f2200 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf index 1b1ba1bf3..44fdadf20 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf index 83e303b3e..49a167fac 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf index 4fb26d2ff..c4f32ac24 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf index 3f189cab8..2a6e2cb69 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf index efbda9ed6..39764d052 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf index d5dad0f23..72f1533e8 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf index 5f1cbc9b8..72127610b 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf index f6291dca6..7b9a55a2f 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } locals { diff --git a/pkg/providers/iam/r_user.go b/pkg/providers/iam/r_user.go index 42a2a4ea2..8c0c0b970 100644 --- a/pkg/providers/iam/r_user.go +++ b/pkg/providers/iam/r_user.go @@ -73,19 +73,6 @@ func (p *provider) resUser() *schema.Resource { return cmp.Equal(Old, New, cmpopts.EquateEmpty()) } - validatePhone := func(v interface{}, _ cty.Path) diag.Diagnostics { - ph := v.(string) - if v.(string) == "" { - return nil - } - - if !regexp.MustCompile(`^\(\d{3}\) \d{3}-\d{4}$`).MatchString(ph) { - return diag.Errorf(`Phone number must be in the form: (###) ###-####`) - } - - return nil - } - statePhone := func(v interface{}) string { return canonicalPhone(v.(string)) } @@ -139,7 +126,6 @@ func (p *provider) resUser() *schema.Resource { Type: schema.TypeString, Required: true, Description: "The user's main phone number", - ValidateDiagFunc: validatePhone, DiffSuppressFunc: suppressPhone, StateFunc: statePhone, }, @@ -186,7 +172,6 @@ func (p *provider) resUser() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "The user's mobile phone number", - ValidateDiagFunc: validatePhone, DiffSuppressFunc: suppressPhone, StateFunc: statePhone, }, diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image.go b/pkg/providers/imaging/data_akamai_imaging_policy_image.go new file mode 100644 index 000000000..d9a6fe1d7 --- /dev/null +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image.go @@ -0,0 +1,81 @@ +package imaging + +import ( + "context" + "crypto/sha1" + "encoding/hex" + "encoding/json" + "io" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/imaging" + "github.com/akamai/terraform-provider-akamai/v2/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v2/pkg/providers/imaging/imagewriter" + "github.com/akamai/terraform-provider-akamai/v2/pkg/tools" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func dataImagingPolicyImage() *schema.Resource { + return &schema.Resource{ + ReadContext: dataSourceImagingPolicyImageRead, + Schema: map[string]*schema.Schema{ + "policy": { + Type: schema.TypeList, + Required: true, + Description: "Image policy", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: PolicyOutputImage(PolicyDepth), + }, + }, + "json": { + Type: schema.TypeString, + Computed: true, + Description: "A JSON encoded policy", + }, + }, + } +} + +func dataSourceImagingPolicyImageRead(_ context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := akamai.Meta(m) + logger := meta.Log("Imaging", "dataPolicyImageRead") + logger.Debug("Creating image policy json from schema") + policy, err := tools.GetListValue("policy", d) + if err != nil { + return diag.FromErr(err) + } + var policyInput imaging.PolicyInputImage + if policy[0] != nil { + policyInputMap, ok := policy[0].(map[string]interface{}) + if !ok { + return diag.Errorf("'policy' is of invalid type: %T", policyInputMap) + } + policyInput = imagewriter.PolicyImageToEdgeGrid(d, "policy") + } + + jsonBody, err := json.MarshalIndent(policyInput, "", " ") + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("json", string(jsonBody)); err != nil { + return diag.Errorf("%v: %s", tools.ErrValueSet, err.Error()) + } + + id, err := getPolicyJSONHashID(string(jsonBody)) + if err != nil { + return diag.Errorf("calculating hash ID from policy JSON: %s", err.Error()) + } + d.SetId(id) + return nil +} + +func getPolicyJSONHashID(policyJSON string) (string, error) { + h := sha1.New() + _, err := io.WriteString(h, policyJSON) + if err != nil { + return "", err + } + hashID := hex.EncodeToString(h.Sum(nil)) + return hashID, nil +} diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go new file mode 100644 index 000000000..66af8a804 --- /dev/null +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go @@ -0,0 +1,53 @@ +package imaging + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestDataPolicyImage(t *testing.T) { + tests := map[string]struct { + configPath string + expectedJSONPath string + }{ + "empty policy": { + configPath: "testdata/TestDataPolicyImage/empty_policy/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyImage/empty_policy/expected.json", + }, + "regular policy with 1 transformation": { + configPath: "testdata/TestDataPolicyImage/regular_policy/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyImage/regular_policy/expected.json", + }, + "regular policy with multiple nested transformations": { + configPath: "testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyImage/policy_with_nested_transformations/expected.json", + }, + "policy with empty breakpoints": { + configPath: "testdata/TestDataPolicyImage/empty_breakpoints/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyImage/empty_breakpoints/expected.json", + }, + "policy with composite_post_policy breakpoints": { + configPath: "testdata/TestDataPolicyImage/composite_post_policy/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyImage/composite_post_policy/expected.json", + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: loadFixtureString(test.configPath), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "data.akamai_imaging_policy_image.policy", "json", + loadFixtureString(test.expectedJSONPath)), + ), + }, + }, + }) + }) + } +} diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video.go b/pkg/providers/imaging/data_akamai_imaging_policy_video.go new file mode 100644 index 000000000..d5feba299 --- /dev/null +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video.go @@ -0,0 +1,68 @@ +package imaging + +import ( + "context" + "encoding/json" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/imaging" + "github.com/akamai/terraform-provider-akamai/v2/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v2/pkg/providers/imaging/videowriter" + "github.com/akamai/terraform-provider-akamai/v2/pkg/tools" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func dataImagingPolicyVideo() *schema.Resource { + return &schema.Resource{ + ReadContext: dataSourceImagingPolicyVideoRead, + Schema: map[string]*schema.Schema{ + "policy": { + Type: schema.TypeList, + Required: true, + Description: "Video policy", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: PolicyOutputVideo(PolicyDepth), + }, + }, + "json": { + Type: schema.TypeString, + Computed: true, + Description: "A JSON encoded policy", + }, + }, + } +} + +func dataSourceImagingPolicyVideoRead(_ context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := akamai.Meta(m) + logger := meta.Log("Imaging", "dataPolicyVideoRead") + logger.Debug("Creating video policy json from schema") + policy, err := tools.GetListValue("policy", d) + if err != nil { + return diag.FromErr(err) + } + var policyInput imaging.PolicyInputVideo + if policy[0] != nil { + policyInputMap, ok := policy[0].(map[string]interface{}) + if !ok { + return diag.Errorf("'policy' is of invalid type: %T", policyInputMap) + } + policyInput = videowriter.PolicyVideoToEdgeGrid(d, "policy") + } + + jsonBody, err := json.MarshalIndent(policyInput, "", " ") + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("json", string(jsonBody)); err != nil { + return diag.Errorf("%v: %s", tools.ErrValueSet, err.Error()) + } + + id, err := getPolicyJSONHashID(string(jsonBody)) + if err != nil { + return diag.Errorf("calculating hash ID from policy JSON: %s", err.Error()) + } + d.SetId(id) + return nil +} diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go new file mode 100644 index 000000000..400149071 --- /dev/null +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go @@ -0,0 +1,41 @@ +package imaging + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestDataPolicyVideo(t *testing.T) { + tests := map[string]struct { + configPath string + expectedJSONPath string + }{ + "empty policy": { + configPath: "testdata/TestDataPolicyVideo/empty_policy/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyVideo/empty_policy/expected.json", + }, + "regular policy": { + configPath: "testdata/TestDataPolicyVideo/regular_policy/policy.tf", + expectedJSONPath: "testdata/TestDataPolicyVideo/regular_policy/expected.json", + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: loadFixtureString(test.configPath), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "data.akamai_imaging_policy_video.policy", "json", + loadFixtureString(test.expectedJSONPath)), + ), + }, + }, + }) + }) + } +} diff --git a/pkg/providers/imaging/imagewriter/convert-image.gen.go b/pkg/providers/imaging/imagewriter/convert-image.gen.go new file mode 100644 index 000000000..72571b53f --- /dev/null +++ b/pkg/providers/imaging/imagewriter/convert-image.gen.go @@ -0,0 +1,1871 @@ +package imagewriter + +import ( + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/tools" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +// PolicyImageToEdgeGrid converts terraform originated map structure into EdgeGrid structure +func PolicyImageToEdgeGrid(d *schema.ResourceData, key string) imaging.PolicyInputImage { + _, exist := extract(d, key) + var result imaging.PolicyInputImage + if exist { + result = imaging.PolicyInputImage{} + result.Breakpoints = getBreakpoints(d, getKey(key, 0, "breakpoints")) + result.Hosts = interfaceSliceToStringSlice(d, getKey(key, 0, "hosts")) + result.Output = getOutputImage(d, getKey(key, 0, "output")) + result.PostBreakpointTransformations = getPostBreakpointTransformations(d, getKey(key, 0, "post_breakpoint_transformations")) + result.RolloutDuration = intReaderPtr(d, getKey(key, 0, "rollout_duration")) + result.Transformations = getTransformations(d, getKey(key, 0, "transformations")) + result.Variables = getVariableList(d, getKey(key, 0, "variables")) + } + + return result +} + +func getAppend(d *schema.ResourceData, key string) *imaging.Append { + _, exist := extract(d, key) + if exist { + result := imaging.Append{ + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + GravityPriority: appendGravityPriorityVariableInline(d, getKey(key, 0, "gravity_priority")), + Image: getImageType(d, getKey(key, 0, "image")), + PreserveMinorDimension: booleanVariableInline(d, getKey(key, 0, "preserve_minor_dimension")), + Transformation: imaging.AppendTransformationAppend, + } + return &result + } + return nil +} + +func getAspectCrop(d *schema.ResourceData, key string) *imaging.AspectCrop { + _, exist := extract(d, key) + if exist { + result := imaging.AspectCrop{ + AllowExpansion: booleanVariableInline(d, getKey(key, 0, "allow_expansion")), + Height: numberVariableInline(d, getKey(key, 0, "height")), + Width: numberVariableInline(d, getKey(key, 0, "width")), + XPosition: numberVariableInline(d, getKey(key, 0, "x_position")), + YPosition: numberVariableInline(d, getKey(key, 0, "y_position")), + Transformation: imaging.AspectCropTransformationAspectCrop, + } + return &result + } + return nil +} + +func getBackgroundColor(d *schema.ResourceData, key string) *imaging.BackgroundColor { + _, exist := extract(d, key) + if exist { + result := imaging.BackgroundColor{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Transformation: imaging.BackgroundColorTransformationBackgroundColor, + } + return &result + } + return nil +} + +func getBlur(d *schema.ResourceData, key string) *imaging.Blur { + _, exist := extract(d, key) + if exist { + result := imaging.Blur{ + Sigma: numberVariableInline(d, getKey(key, 0, "sigma")), + Transformation: imaging.BlurTransformationBlur, + } + return &result + } + return nil +} + +func getBoxImageType(d *schema.ResourceData, key string) *imaging.BoxImageType { + _, exist := extract(d, key) + if exist { + result := imaging.BoxImageType{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Transformation: getTransformationType(d, getKey(key, 0, "transformation")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Type: imaging.BoxImageTypeTypeBox, + } + return &result + } + return nil +} + +func getBoxImageTypePost(d *schema.ResourceData, key string) *imaging.BoxImageTypePost { + _, exist := extract(d, key) + if exist { + result := imaging.BoxImageTypePost{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Transformation: getTransformationTypePost(d, getKey(key, 0, "transformation")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Type: imaging.BoxImageTypePostTypeBox, + } + return &result + } + return nil +} + +func getBreakpoints(d *schema.ResourceData, key string) *imaging.Breakpoints { + _, exist := extract(d, key) + if exist { + result := imaging.Breakpoints{ + Widths: interfaceSliceToIntSlice(d, getKey(key, 0, "widths")), + } + return &result + } + return nil +} + +func getChromaKey(d *schema.ResourceData, key string) *imaging.ChromaKey { + _, exist := extract(d, key) + if exist { + result := imaging.ChromaKey{ + Hue: numberVariableInline(d, getKey(key, 0, "hue")), + HueFeather: numberVariableInline(d, getKey(key, 0, "hue_feather")), + HueTolerance: numberVariableInline(d, getKey(key, 0, "hue_tolerance")), + LightnessFeather: numberVariableInline(d, getKey(key, 0, "lightness_feather")), + LightnessTolerance: numberVariableInline(d, getKey(key, 0, "lightness_tolerance")), + SaturationFeather: numberVariableInline(d, getKey(key, 0, "saturation_feather")), + SaturationTolerance: numberVariableInline(d, getKey(key, 0, "saturation_tolerance")), + Transformation: imaging.ChromaKeyTransformationChromaKey, + } + return &result + } + return nil +} + +func getCircleImageType(d *schema.ResourceData, key string) *imaging.CircleImageType { + _, exist := extract(d, key) + if exist { + result := imaging.CircleImageType{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Diameter: integerVariableInline(d, getKey(key, 0, "diameter")), + Transformation: getTransformationType(d, getKey(key, 0, "transformation")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Type: imaging.CircleImageTypeTypeCircle, + } + return &result + } + return nil +} + +func getCircleImageTypePost(d *schema.ResourceData, key string) *imaging.CircleImageTypePost { + _, exist := extract(d, key) + if exist { + result := imaging.CircleImageTypePost{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Diameter: integerVariableInline(d, getKey(key, 0, "diameter")), + Transformation: getTransformationTypePost(d, getKey(key, 0, "transformation")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Type: imaging.CircleImageTypePostTypeCircle, + } + return &result + } + return nil +} + +func getCircleShapeType(d *schema.ResourceData, key string) *imaging.CircleShapeType { + _, exist := extract(d, key) + if exist { + result := imaging.CircleShapeType{ + Center: getPointShapeType(d, getKey(key, 0, "center")), + Radius: numberVariableInline(d, getKey(key, 0, "radius")), + } + return &result + } + return nil +} + +func getComposite(d *schema.ResourceData, key string) *imaging.Composite { + _, exist := extract(d, key) + if exist { + result := imaging.Composite{ + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + Image: getImageType(d, getKey(key, 0, "image")), + Placement: compositePlacementVariableInline(d, getKey(key, 0, "placement")), + Scale: numberVariableInline(d, getKey(key, 0, "scale")), + ScaleDimension: compositeScaleDimensionVariableInline(d, getKey(key, 0, "scale_dimension")), + XPosition: integerVariableInline(d, getKey(key, 0, "x_position")), + YPosition: integerVariableInline(d, getKey(key, 0, "y_position")), + Transformation: imaging.CompositeTransformationComposite, + } + return &result + } + return nil +} + +func getCompositePost(d *schema.ResourceData, key string) *imaging.CompositePost { + _, exist := extract(d, key) + if exist { + result := imaging.CompositePost{ + Gravity: gravityPostVariableInline(d, getKey(key, 0, "gravity")), + Image: getImageTypePost(d, getKey(key, 0, "image")), + Placement: compositePostPlacementVariableInline(d, getKey(key, 0, "placement")), + Scale: numberVariableInline(d, getKey(key, 0, "scale")), + ScaleDimension: compositePostScaleDimensionVariableInline(d, getKey(key, 0, "scale_dimension")), + XPosition: integerVariableInline(d, getKey(key, 0, "x_position")), + YPosition: integerVariableInline(d, getKey(key, 0, "y_position")), + Transformation: imaging.CompositePostTransformationComposite, + } + return &result + } + return nil +} + +func getCompound(d *schema.ResourceData, key string) *imaging.Compound { + _, exist := extract(d, key) + if exist { + result := imaging.Compound{ + Transformations: getTransformations(d, getKey(key, 0, "transformations")), + Transformation: imaging.CompoundTransformationCompound, + } + return &result + } + return nil +} + +func getCompoundPost(d *schema.ResourceData, key string) *imaging.CompoundPost { + _, exist := extract(d, key) + if exist { + result := imaging.CompoundPost{ + Transformations: getPostBreakpointTransformations(d, getKey(key, 0, "transformations")), + Transformation: imaging.CompoundPostTransformationCompound, + } + return &result + } + return nil +} + +func getContrast(d *schema.ResourceData, key string) *imaging.Contrast { + _, exist := extract(d, key) + if exist { + result := imaging.Contrast{ + Brightness: numberVariableInline(d, getKey(key, 0, "brightness")), + Contrast: numberVariableInline(d, getKey(key, 0, "contrast")), + Transformation: imaging.ContrastTransformationContrast, + } + return &result + } + return nil +} + +func getCrop(d *schema.ResourceData, key string) *imaging.Crop { + _, exist := extract(d, key) + if exist { + result := imaging.Crop{ + AllowExpansion: booleanVariableInline(d, getKey(key, 0, "allow_expansion")), + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + XPosition: integerVariableInline(d, getKey(key, 0, "x_position")), + YPosition: integerVariableInline(d, getKey(key, 0, "y_position")), + Transformation: imaging.CropTransformationCrop, + } + return &result + } + return nil +} + +func getEnumOptionsList(d *schema.ResourceData, key string) []*imaging.EnumOptions { + collection, exist := extract(d, key) + if exist { + result := make([]*imaging.EnumOptions, 0) + for idx := range collection.([]interface{}) { + elem := imaging.EnumOptions{ + ID: stringReader(d, getKey(key, idx, "id")), + Value: stringReader(d, getKey(key, idx, "value")), + } + result = append(result, &elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getFaceCrop(d *schema.ResourceData, key string) *imaging.FaceCrop { + _, exist := extract(d, key) + if exist { + result := imaging.FaceCrop{ + Algorithm: faceCropAlgorithmVariableInline(d, getKey(key, 0, "algorithm")), + Confidence: numberVariableInline(d, getKey(key, 0, "confidence")), + FailGravity: gravityVariableInline(d, getKey(key, 0, "fail_gravity")), + Focus: faceCropFocusVariableInline(d, getKey(key, 0, "focus")), + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Padding: numberVariableInline(d, getKey(key, 0, "padding")), + Style: faceCropStyleVariableInline(d, getKey(key, 0, "style")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.FaceCropTransformationFaceCrop, + } + return &result + } + return nil +} + +func getFeatureCrop(d *schema.ResourceData, key string) *imaging.FeatureCrop { + _, exist := extract(d, key) + if exist { + result := imaging.FeatureCrop{ + FailGravity: gravityVariableInline(d, getKey(key, 0, "fail_gravity")), + FeatureRadius: numberVariableInline(d, getKey(key, 0, "feature_radius")), + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + MaxFeatures: integerVariableInline(d, getKey(key, 0, "max_features")), + MinFeatureQuality: numberVariableInline(d, getKey(key, 0, "min_feature_quality")), + Padding: numberVariableInline(d, getKey(key, 0, "padding")), + Style: featureCropStyleVariableInline(d, getKey(key, 0, "style")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.FeatureCropTransformationFeatureCrop, + } + return &result + } + return nil +} + +func getFitAndFill(d *schema.ResourceData, key string) *imaging.FitAndFill { + _, exist := extract(d, key) + if exist { + result := imaging.FitAndFill{ + FillTransformation: getTransformationType(d, getKey(key, 0, "fill_transformation")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.FitAndFillTransformationFitAndFill, + } + return &result + } + return nil +} + +func getGoop(d *schema.ResourceData, key string) *imaging.Goop { + _, exist := extract(d, key) + if exist { + result := imaging.Goop{ + Chaos: numberVariableInline(d, getKey(key, 0, "chaos")), + Density: integerVariableInline(d, getKey(key, 0, "density")), + Power: numberVariableInline(d, getKey(key, 0, "power")), + Seed: integerVariableInline(d, getKey(key, 0, "seed")), + Transformation: imaging.GoopTransformationGoop, + } + return &result + } + return nil +} + +func getGrayscale(d *schema.ResourceData, key string) *imaging.Grayscale { + _, exist := extract(d, key) + if exist { + result := imaging.Grayscale{ + Type: grayscaleTypeVariableInline(d, getKey(key, 0, "type")), + Transformation: imaging.GrayscaleTransformationGrayscale, + } + return &result + } + return nil +} + +func getHSL(d *schema.ResourceData, key string) *imaging.HSL { + _, exist := extract(d, key) + if exist { + result := imaging.HSL{ + Hue: numberVariableInline(d, getKey(key, 0, "hue")), + Lightness: numberVariableInline(d, getKey(key, 0, "lightness")), + Saturation: numberVariableInline(d, getKey(key, 0, "saturation")), + Transformation: imaging.HSLTransformationHSL, + } + return &result + } + return nil +} + +func getHSV(d *schema.ResourceData, key string) *imaging.HSV { + _, exist := extract(d, key) + if exist { + result := imaging.HSV{ + Hue: numberVariableInline(d, getKey(key, 0, "hue")), + Saturation: numberVariableInline(d, getKey(key, 0, "saturation")), + Value: numberVariableInline(d, getKey(key, 0, "value")), + Transformation: imaging.HSVTransformationHSV, + } + return &result + } + return nil +} + +func getIfDimension(d *schema.ResourceData, key string) *imaging.IfDimension { + _, exist := extract(d, key) + if exist { + result := imaging.IfDimension{ + Default: getTransformationType(d, getKey(key, 0, "default")), + Dimension: ifDimensionDimensionVariableInline(d, getKey(key, 0, "dimension")), + Equal: getTransformationType(d, getKey(key, 0, "equal")), + GreaterThan: getTransformationType(d, getKey(key, 0, "greater_than")), + LessThan: getTransformationType(d, getKey(key, 0, "less_than")), + Value: integerVariableInline(d, getKey(key, 0, "value")), + Transformation: imaging.IfDimensionTransformationIfDimension, + } + return &result + } + return nil +} + +func getIfDimensionPost(d *schema.ResourceData, key string) *imaging.IfDimensionPost { + _, exist := extract(d, key) + if exist { + result := imaging.IfDimensionPost{ + Default: getTransformationTypePost(d, getKey(key, 0, "default")), + Dimension: ifDimensionPostDimensionVariableInline(d, getKey(key, 0, "dimension")), + Equal: getTransformationTypePost(d, getKey(key, 0, "equal")), + GreaterThan: getTransformationTypePost(d, getKey(key, 0, "greater_than")), + LessThan: getTransformationTypePost(d, getKey(key, 0, "less_than")), + Value: integerVariableInline(d, getKey(key, 0, "value")), + Transformation: imaging.IfDimensionPostTransformationIfDimension, + } + return &result + } + return nil +} + +func getIfOrientation(d *schema.ResourceData, key string) *imaging.IfOrientation { + _, exist := extract(d, key) + if exist { + result := imaging.IfOrientation{ + Default: getTransformationType(d, getKey(key, 0, "default")), + Landscape: getTransformationType(d, getKey(key, 0, "landscape")), + Portrait: getTransformationType(d, getKey(key, 0, "portrait")), + Square: getTransformationType(d, getKey(key, 0, "square")), + Transformation: imaging.IfOrientationTransformationIfOrientation, + } + return &result + } + return nil +} + +func getIfOrientationPost(d *schema.ResourceData, key string) *imaging.IfOrientationPost { + _, exist := extract(d, key) + if exist { + result := imaging.IfOrientationPost{ + Default: getTransformationTypePost(d, getKey(key, 0, "default")), + Landscape: getTransformationTypePost(d, getKey(key, 0, "landscape")), + Portrait: getTransformationTypePost(d, getKey(key, 0, "portrait")), + Square: getTransformationTypePost(d, getKey(key, 0, "square")), + Transformation: imaging.IfOrientationPostTransformationIfOrientation, + } + return &result + } + return nil +} + +func getImQuery(d *schema.ResourceData, key string) *imaging.ImQuery { + _, exist := extract(d, key) + if exist { + result := imaging.ImQuery{ + AllowedTransformations: interfaceSliceToImagingImQueryAllowedTransformationsSlice(d, getKey(key, 0, "allowed_transformations")), + Query: queryVariableInline(d, getKey(key, 0, "query")), + Transformation: imaging.ImQueryTransformationImQuery, + } + return &result + } + return nil +} + +func getMaxColors(d *schema.ResourceData, key string) *imaging.MaxColors { + _, exist := extract(d, key) + if exist { + result := imaging.MaxColors{ + Colors: integerVariableInline(d, getKey(key, 0, "colors")), + Transformation: imaging.MaxColorsTransformationMaxColors, + } + return &result + } + return nil +} + +func getMirror(d *schema.ResourceData, key string) *imaging.Mirror { + _, exist := extract(d, key) + if exist { + result := imaging.Mirror{ + Horizontal: booleanVariableInline(d, getKey(key, 0, "horizontal")), + Vertical: booleanVariableInline(d, getKey(key, 0, "vertical")), + Transformation: imaging.MirrorTransformationMirror, + } + return &result + } + return nil +} + +func getMonoHue(d *schema.ResourceData, key string) *imaging.MonoHue { + _, exist := extract(d, key) + if exist { + result := imaging.MonoHue{ + Hue: numberVariableInline(d, getKey(key, 0, "hue")), + Transformation: imaging.MonoHueTransformationMonoHue, + } + return &result + } + return nil +} + +func getOpacity(d *schema.ResourceData, key string) *imaging.Opacity { + _, exist := extract(d, key) + if exist { + result := imaging.Opacity{ + Opacity: numberVariableInline(d, getKey(key, 0, "opacity")), + Transformation: imaging.OpacityTransformationOpacity, + } + return &result + } + return nil +} + +func getOutputImage(d *schema.ResourceData, key string) *imaging.OutputImage { + _, exist := extract(d, key) + if exist { + result := imaging.OutputImage{ + AdaptiveQuality: intReaderPtr(d, getKey(key, 0, "adaptive_quality")), + PerceptualQuality: outputImagePerceptualQualityVariableInline(d, getKey(key, 0, "perceptual_quality")), + PerceptualQualityFloor: intReaderPtr(d, getKey(key, 0, "perceptual_quality_floor")), + Quality: integerVariableInline(d, getKey(key, 0, "quality")), + } + return &result + } + return nil +} + +func getPointShapeType(d *schema.ResourceData, key string) *imaging.PointShapeType { + _, exist := extract(d, key) + if exist { + result := imaging.PointShapeType{ + X: numberVariableInline(d, getKey(key, 0, "x")), + Y: numberVariableInline(d, getKey(key, 0, "y")), + } + return &result + } + return nil +} + +func getPointShapeTypeList(d *schema.ResourceData, key string) []imaging.PointShapeType { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.PointShapeType, 0) + for idx := range collection.([]interface{}) { + elem := imaging.PointShapeType{ + X: numberVariableInline(d, getKey(key, idx, "x")), + Y: numberVariableInline(d, getKey(key, idx, "y")), + } + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getPolygonShapeType(d *schema.ResourceData, key string) *imaging.PolygonShapeType { + _, exist := extract(d, key) + if exist { + result := imaging.PolygonShapeType{ + Points: getPointShapeTypeList(d, getKey(key, 0, "points")), + } + return &result + } + return nil +} + +func getPostBreakpointTransformations(d *schema.ResourceData, key string) []imaging.TransformationTypePost { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.TransformationTypePost, 0) + for idx := range collection.([]interface{}) { + elem := getTransformationTypePost(d, fmt.Sprintf("%s.%d", key, idx)) + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getRectangleShapeType(d *schema.ResourceData, key string) *imaging.RectangleShapeType { + _, exist := extract(d, key) + if exist { + result := imaging.RectangleShapeType{ + Anchor: getPointShapeType(d, getKey(key, 0, "anchor")), + Height: numberVariableInline(d, getKey(key, 0, "height")), + Width: numberVariableInline(d, getKey(key, 0, "width")), + } + return &result + } + return nil +} + +func getRegionOfInterestCrop(d *schema.ResourceData, key string) *imaging.RegionOfInterestCrop { + _, exist := extract(d, key) + if exist { + result := imaging.RegionOfInterestCrop{ + Gravity: gravityVariableInline(d, getKey(key, 0, "gravity")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + RegionOfInterest: getShapeType(d, getKey(key, 0, "region_of_interest")), + Style: regionOfInterestCropStyleVariableInline(d, getKey(key, 0, "style")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.RegionOfInterestCropTransformationRegionOfInterestCrop, + } + return &result + } + return nil +} + +func getRelativeCrop(d *schema.ResourceData, key string) *imaging.RelativeCrop { + _, exist := extract(d, key) + if exist { + result := imaging.RelativeCrop{ + East: integerVariableInline(d, getKey(key, 0, "east")), + North: integerVariableInline(d, getKey(key, 0, "north")), + South: integerVariableInline(d, getKey(key, 0, "south")), + West: integerVariableInline(d, getKey(key, 0, "west")), + Transformation: imaging.RelativeCropTransformationRelativeCrop, + } + return &result + } + return nil +} + +func getRemoveColor(d *schema.ResourceData, key string) *imaging.RemoveColor { + _, exist := extract(d, key) + if exist { + result := imaging.RemoveColor{ + Color: stringVariableInline(d, getKey(key, 0, "color")), + Feather: numberVariableInline(d, getKey(key, 0, "feather")), + Tolerance: numberVariableInline(d, getKey(key, 0, "tolerance")), + Transformation: imaging.RemoveColorTransformationRemoveColor, + } + return &result + } + return nil +} + +func getResize(d *schema.ResourceData, key string) *imaging.Resize { + _, exist := extract(d, key) + if exist { + result := imaging.Resize{ + Aspect: resizeAspectVariableInline(d, getKey(key, 0, "aspect")), + Height: integerVariableInline(d, getKey(key, 0, "height")), + Type: resizeTypeVariableInline(d, getKey(key, 0, "type")), + Width: integerVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.ResizeTransformationResize, + } + return &result + } + return nil +} + +func getRotate(d *schema.ResourceData, key string) *imaging.Rotate { + _, exist := extract(d, key) + if exist { + result := imaging.Rotate{ + Degrees: numberVariableInline(d, getKey(key, 0, "degrees")), + Transformation: imaging.RotateTransformationRotate, + } + return &result + } + return nil +} + +func getScale(d *schema.ResourceData, key string) *imaging.Scale { + _, exist := extract(d, key) + if exist { + result := imaging.Scale{ + Height: numberVariableInline(d, getKey(key, 0, "height")), + Width: numberVariableInline(d, getKey(key, 0, "width")), + Transformation: imaging.ScaleTransformationScale, + } + return &result + } + return nil +} + +func getShapeTypeList(d *schema.ResourceData, key string) []imaging.ShapeType { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.ShapeType, 0) + for idx := range collection.([]interface{}) { + elem := getShapeType(d, fmt.Sprintf("%s.%d", key, idx)) + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getShear(d *schema.ResourceData, key string) *imaging.Shear { + _, exist := extract(d, key) + if exist { + result := imaging.Shear{ + XShear: numberVariableInline(d, getKey(key, 0, "x_shear")), + YShear: numberVariableInline(d, getKey(key, 0, "y_shear")), + Transformation: imaging.ShearTransformationShear, + } + return &result + } + return nil +} + +func getTextImageType(d *schema.ResourceData, key string) *imaging.TextImageType { + _, exist := extract(d, key) + if exist { + result := imaging.TextImageType{ + Fill: stringVariableInline(d, getKey(key, 0, "fill")), + Size: numberVariableInline(d, getKey(key, 0, "size")), + Stroke: stringVariableInline(d, getKey(key, 0, "stroke")), + StrokeSize: numberVariableInline(d, getKey(key, 0, "stroke_size")), + Text: stringVariableInline(d, getKey(key, 0, "text")), + Transformation: getTransformationType(d, getKey(key, 0, "transformation")), + Typeface: stringVariableInline(d, getKey(key, 0, "typeface")), + Type: imaging.TextImageTypeTypeText, + } + return &result + } + return nil +} + +func getTextImageTypePost(d *schema.ResourceData, key string) *imaging.TextImageTypePost { + _, exist := extract(d, key) + if exist { + result := imaging.TextImageTypePost{ + Fill: stringVariableInline(d, getKey(key, 0, "fill")), + Size: numberVariableInline(d, getKey(key, 0, "size")), + Stroke: stringVariableInline(d, getKey(key, 0, "stroke")), + StrokeSize: numberVariableInline(d, getKey(key, 0, "stroke_size")), + Text: stringVariableInline(d, getKey(key, 0, "text")), + Transformation: getTransformationTypePost(d, getKey(key, 0, "transformation")), + Typeface: stringVariableInline(d, getKey(key, 0, "typeface")), + Type: imaging.TextImageTypePostTypeText, + } + return &result + } + return nil +} + +func getTransformations(d *schema.ResourceData, key string) []imaging.TransformationType { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.TransformationType, 0) + for idx := range collection.([]interface{}) { + elem := getTransformationType(d, fmt.Sprintf("%s.%d", key, idx)) + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getTrim(d *schema.ResourceData, key string) *imaging.Trim { + _, exist := extract(d, key) + if exist { + result := imaging.Trim{ + Fuzz: numberVariableInline(d, getKey(key, 0, "fuzz")), + Padding: integerVariableInline(d, getKey(key, 0, "padding")), + Transformation: imaging.TrimTransformationTrim, + } + return &result + } + return nil +} + +func getURLImageType(d *schema.ResourceData, key string) *imaging.URLImageType { + _, exist := extract(d, key) + if exist { + result := imaging.URLImageType{ + Transformation: getTransformationType(d, getKey(key, 0, "transformation")), + URL: stringVariableInline(d, getKey(key, 0, "url")), + Type: imaging.URLImageTypeTypeURL, + } + return &result + } + return nil +} + +func getURLImageTypePost(d *schema.ResourceData, key string) *imaging.URLImageTypePost { + _, exist := extract(d, key) + if exist { + result := imaging.URLImageTypePost{ + Transformation: getTransformationTypePost(d, getKey(key, 0, "transformation")), + URL: stringVariableInline(d, getKey(key, 0, "url")), + Type: imaging.URLImageTypePostTypeURL, + } + return &result + } + return nil +} + +func getUnionShapeType(d *schema.ResourceData, key string) *imaging.UnionShapeType { + _, exist := extract(d, key) + if exist { + result := imaging.UnionShapeType{ + Shapes: getShapeTypeList(d, getKey(key, 0, "shapes")), + } + return &result + } + return nil +} + +func getUnsharpMask(d *schema.ResourceData, key string) *imaging.UnsharpMask { + _, exist := extract(d, key) + if exist { + result := imaging.UnsharpMask{ + Gain: numberVariableInline(d, getKey(key, 0, "gain")), + Sigma: numberVariableInline(d, getKey(key, 0, "sigma")), + Threshold: numberVariableInline(d, getKey(key, 0, "threshold")), + Transformation: imaging.UnsharpMaskTransformationUnsharpMask, + } + return &result + } + return nil +} + +func getVariableList(d *schema.ResourceData, key string) []imaging.Variable { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.Variable, 0) + for idx := range collection.([]interface{}) { + elem := imaging.Variable{ + DefaultValue: stringReader(d, getKey(key, idx, "default_value")), + EnumOptions: getEnumOptionsList(d, getKey(key, idx, "enum_options")), + Name: stringReader(d, getKey(key, idx, "name")), + Postfix: stringReaderPtr(d, getKey(key, idx, "postfix")), + Prefix: stringReaderPtr(d, getKey(key, idx, "prefix")), + Type: imaging.VariableType(stringReader(d, getKey(key, idx, "type"))), + } + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getImageType(d *schema.ResourceData, key string) imaging.ImageType { + _, isAny := extract(d, key) + + if !isAny { + return nil + } + + key = decorateKeyForSlice(key) + + var exist bool + _, exist = extract(d, key+".box_image") + if exist { + return getBoxImageType(d, key+".box_image") + } + _, exist = extract(d, key+".circle_image") + if exist { + return getCircleImageType(d, key+".circle_image") + } + _, exist = extract(d, key+".text_image") + if exist { + return getTextImageType(d, key+".text_image") + } + _, exist = extract(d, key+".url_image") + if exist { + return getURLImageType(d, key+".url_image") + } + panic(fmt.Sprint("unsupported type")) +} + +func getImageTypePost(d *schema.ResourceData, key string) imaging.ImageTypePost { + _, isAny := extract(d, key) + + if !isAny { + return nil + } + + key = decorateKeyForSlice(key) + + var exist bool + _, exist = extract(d, key+".box_image") + if exist { + return getBoxImageTypePost(d, key+".box_image") + } + _, exist = extract(d, key+".circle_image") + if exist { + return getCircleImageTypePost(d, key+".circle_image") + } + _, exist = extract(d, key+".text_image") + if exist { + return getTextImageTypePost(d, key+".text_image") + } + _, exist = extract(d, key+".url_image") + if exist { + return getURLImageTypePost(d, key+".url_image") + } + panic(fmt.Sprint("unsupported type")) +} + +func getShapeType(d *schema.ResourceData, key string) imaging.ShapeType { + _, isAny := extract(d, key) + + if !isAny { + return nil + } + + key = decorateKeyForSlice(key) + + var exist bool + _, exist = extract(d, key+".circle_shape") + if exist { + return getCircleShapeType(d, key+".circle_shape") + } + _, exist = extract(d, key+".point_shape") + if exist { + return getPointShapeType(d, key+".point_shape") + } + _, exist = extract(d, key+".polygon_shape") + if exist { + return getPolygonShapeType(d, key+".polygon_shape") + } + _, exist = extract(d, key+".rectangle_shape") + if exist { + return getRectangleShapeType(d, key+".rectangle_shape") + } + _, exist = extract(d, key+".union_shape") + if exist { + return getUnionShapeType(d, key+".union_shape") + } + panic(fmt.Sprint("unsupported type")) +} + +func getTransformationType(d *schema.ResourceData, key string) imaging.TransformationType { + _, isAny := extract(d, key) + + if !isAny { + return nil + } + + key = decorateKeyForSlice(key) + + var exist bool + _, exist = extract(d, key+".append") + if exist { + return getAppend(d, key+".append") + } + _, exist = extract(d, key+".aspect_crop") + if exist { + return getAspectCrop(d, key+".aspect_crop") + } + _, exist = extract(d, key+".background_color") + if exist { + return getBackgroundColor(d, key+".background_color") + } + _, exist = extract(d, key+".blur") + if exist { + return getBlur(d, key+".blur") + } + _, exist = extract(d, key+".chroma_key") + if exist { + return getChromaKey(d, key+".chroma_key") + } + _, exist = extract(d, key+".composite") + if exist { + return getComposite(d, key+".composite") + } + _, exist = extract(d, key+".compound") + if exist { + return getCompound(d, key+".compound") + } + _, exist = extract(d, key+".contrast") + if exist { + return getContrast(d, key+".contrast") + } + _, exist = extract(d, key+".crop") + if exist { + return getCrop(d, key+".crop") + } + _, exist = extract(d, key+".face_crop") + if exist { + return getFaceCrop(d, key+".face_crop") + } + _, exist = extract(d, key+".feature_crop") + if exist { + return getFeatureCrop(d, key+".feature_crop") + } + _, exist = extract(d, key+".fit_and_fill") + if exist { + return getFitAndFill(d, key+".fit_and_fill") + } + _, exist = extract(d, key+".goop") + if exist { + return getGoop(d, key+".goop") + } + _, exist = extract(d, key+".grayscale") + if exist { + return getGrayscale(d, key+".grayscale") + } + _, exist = extract(d, key+".hsl") + if exist { + return getHSL(d, key+".hsl") + } + _, exist = extract(d, key+".hsv") + if exist { + return getHSV(d, key+".hsv") + } + _, exist = extract(d, key+".if_dimension") + if exist { + return getIfDimension(d, key+".if_dimension") + } + _, exist = extract(d, key+".if_orientation") + if exist { + return getIfOrientation(d, key+".if_orientation") + } + _, exist = extract(d, key+".im_query") + if exist { + return getImQuery(d, key+".im_query") + } + _, exist = extract(d, key+".max_colors") + if exist { + return getMaxColors(d, key+".max_colors") + } + _, exist = extract(d, key+".mirror") + if exist { + return getMirror(d, key+".mirror") + } + _, exist = extract(d, key+".mono_hue") + if exist { + return getMonoHue(d, key+".mono_hue") + } + _, exist = extract(d, key+".opacity") + if exist { + return getOpacity(d, key+".opacity") + } + _, exist = extract(d, key+".region_of_interest_crop") + if exist { + return getRegionOfInterestCrop(d, key+".region_of_interest_crop") + } + _, exist = extract(d, key+".relative_crop") + if exist { + return getRelativeCrop(d, key+".relative_crop") + } + _, exist = extract(d, key+".remove_color") + if exist { + return getRemoveColor(d, key+".remove_color") + } + _, exist = extract(d, key+".resize") + if exist { + return getResize(d, key+".resize") + } + _, exist = extract(d, key+".rotate") + if exist { + return getRotate(d, key+".rotate") + } + _, exist = extract(d, key+".scale") + if exist { + return getScale(d, key+".scale") + } + _, exist = extract(d, key+".shear") + if exist { + return getShear(d, key+".shear") + } + _, exist = extract(d, key+".trim") + if exist { + return getTrim(d, key+".trim") + } + _, exist = extract(d, key+".unsharp_mask") + if exist { + return getUnsharpMask(d, key+".unsharp_mask") + } + panic(fmt.Sprint("unsupported type")) +} + +func getTransformationTypePost(d *schema.ResourceData, key string) imaging.TransformationTypePost { + _, isAny := extract(d, key) + + if !isAny { + return nil + } + + key = decorateKeyForSlice(key) + + var exist bool + _, exist = extract(d, key+".background_color") + if exist { + return getBackgroundColor(d, key+".background_color") + } + _, exist = extract(d, key+".blur") + if exist { + return getBlur(d, key+".blur") + } + _, exist = extract(d, key+".chroma_key") + if exist { + return getChromaKey(d, key+".chroma_key") + } + _, exist = extract(d, key+".composite") + if exist { + return getCompositePost(d, key+".composite") + } + _, exist = extract(d, key+".compound") + if exist { + return getCompoundPost(d, key+".compound") + } + _, exist = extract(d, key+".contrast") + if exist { + return getContrast(d, key+".contrast") + } + _, exist = extract(d, key+".goop") + if exist { + return getGoop(d, key+".goop") + } + _, exist = extract(d, key+".grayscale") + if exist { + return getGrayscale(d, key+".grayscale") + } + _, exist = extract(d, key+".hsl") + if exist { + return getHSL(d, key+".hsl") + } + _, exist = extract(d, key+".hsv") + if exist { + return getHSV(d, key+".hsv") + } + _, exist = extract(d, key+".if_dimension") + if exist { + return getIfDimensionPost(d, key+".if_dimension") + } + _, exist = extract(d, key+".if_orientation") + if exist { + return getIfOrientationPost(d, key+".if_orientation") + } + _, exist = extract(d, key+".max_colors") + if exist { + return getMaxColors(d, key+".max_colors") + } + _, exist = extract(d, key+".mirror") + if exist { + return getMirror(d, key+".mirror") + } + _, exist = extract(d, key+".mono_hue") + if exist { + return getMonoHue(d, key+".mono_hue") + } + _, exist = extract(d, key+".opacity") + if exist { + return getOpacity(d, key+".opacity") + } + _, exist = extract(d, key+".remove_color") + if exist { + return getRemoveColor(d, key+".remove_color") + } + _, exist = extract(d, key+".unsharp_mask") + if exist { + return getUnsharpMask(d, key+".unsharp_mask") + } + panic(fmt.Sprint("unsupported type")) +} + +func appendGravityPriorityVariableInline(d *schema.ResourceData, key string) *imaging.AppendGravityPriorityVariableInline { + var value *imaging.AppendGravityPriority + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.AppendGravityPriorityPtr(imaging.AppendGravityPriority(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.AppendGravityPriorityVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func compositePlacementVariableInline(d *schema.ResourceData, key string) *imaging.CompositePlacementVariableInline { + var value *imaging.CompositePlacement + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.CompositePlacementPtr(imaging.CompositePlacement(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.CompositePlacementVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func compositePostPlacementVariableInline(d *schema.ResourceData, key string) *imaging.CompositePostPlacementVariableInline { + var value *imaging.CompositePostPlacement + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.CompositePostPlacementPtr(imaging.CompositePostPlacement(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.CompositePostPlacementVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func compositePostScaleDimensionVariableInline(d *schema.ResourceData, key string) *imaging.CompositePostScaleDimensionVariableInline { + var value *imaging.CompositePostScaleDimension + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.CompositePostScaleDimensionPtr(imaging.CompositePostScaleDimension(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.CompositePostScaleDimensionVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func compositeScaleDimensionVariableInline(d *schema.ResourceData, key string) *imaging.CompositeScaleDimensionVariableInline { + var value *imaging.CompositeScaleDimension + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.CompositeScaleDimensionPtr(imaging.CompositeScaleDimension(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.CompositeScaleDimensionVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func faceCropAlgorithmVariableInline(d *schema.ResourceData, key string) *imaging.FaceCropAlgorithmVariableInline { + var value *imaging.FaceCropAlgorithm + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.FaceCropAlgorithmPtr(imaging.FaceCropAlgorithm(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.FaceCropAlgorithmVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func faceCropFocusVariableInline(d *schema.ResourceData, key string) *imaging.FaceCropFocusVariableInline { + var value *imaging.FaceCropFocus + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.FaceCropFocusPtr(imaging.FaceCropFocus(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.FaceCropFocusVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func faceCropStyleVariableInline(d *schema.ResourceData, key string) *imaging.FaceCropStyleVariableInline { + var value *imaging.FaceCropStyle + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.FaceCropStylePtr(imaging.FaceCropStyle(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.FaceCropStyleVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func featureCropStyleVariableInline(d *schema.ResourceData, key string) *imaging.FeatureCropStyleVariableInline { + var value *imaging.FeatureCropStyle + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.FeatureCropStylePtr(imaging.FeatureCropStyle(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.FeatureCropStyleVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func gravityPostVariableInline(d *schema.ResourceData, key string) *imaging.GravityPostVariableInline { + var value *imaging.GravityPost + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.GravityPostPtr(imaging.GravityPost(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.GravityPostVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func gravityVariableInline(d *schema.ResourceData, key string) *imaging.GravityVariableInline { + var value *imaging.Gravity + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.GravityPtr(imaging.Gravity(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.GravityVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func grayscaleTypeVariableInline(d *schema.ResourceData, key string) *imaging.GrayscaleTypeVariableInline { + var value *imaging.GrayscaleType + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.GrayscaleTypePtr(imaging.GrayscaleType(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.GrayscaleTypeVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func ifDimensionDimensionVariableInline(d *schema.ResourceData, key string) *imaging.IfDimensionDimensionVariableInline { + var value *imaging.IfDimensionDimension + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.IfDimensionDimensionPtr(imaging.IfDimensionDimension(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.IfDimensionDimensionVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func ifDimensionPostDimensionVariableInline(d *schema.ResourceData, key string) *imaging.IfDimensionPostDimensionVariableInline { + var value *imaging.IfDimensionPostDimension + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.IfDimensionPostDimensionPtr(imaging.IfDimensionPostDimension(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.IfDimensionPostDimensionVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func outputImagePerceptualQualityVariableInline(d *schema.ResourceData, key string) *imaging.OutputImagePerceptualQualityVariableInline { + var value *imaging.OutputImagePerceptualQuality + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.OutputImagePerceptualQualityPtr(imaging.OutputImagePerceptualQuality(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.OutputImagePerceptualQualityVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func regionOfInterestCropStyleVariableInline(d *schema.ResourceData, key string) *imaging.RegionOfInterestCropStyleVariableInline { + var value *imaging.RegionOfInterestCropStyle + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.RegionOfInterestCropStylePtr(imaging.RegionOfInterestCropStyle(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.RegionOfInterestCropStyleVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func resizeAspectVariableInline(d *schema.ResourceData, key string) *imaging.ResizeAspectVariableInline { + var value *imaging.ResizeAspect + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.ResizeAspectPtr(imaging.ResizeAspect(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.ResizeAspectVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func resizeTypeVariableInline(d *schema.ResourceData, key string) *imaging.ResizeTypeVariableInline { + var value *imaging.ResizeType + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.ResizeTypePtr(imaging.ResizeType(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.ResizeTypeVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func booleanVariableInline(d *schema.ResourceData, key string) *imaging.BooleanVariableInline { + var value *bool + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + valueMapped, _ := strconv.ParseBool(valueRaw.(string)) + value = tools.BoolPtr(valueMapped) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.BooleanVariableInline{ + Name: name, + Value: value, + } + } + return nil +} + +func integerVariableInline(d *schema.ResourceData, key string) *imaging.IntegerVariableInline { + var value *int + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + valueMapped, _ := strconv.Atoi(valueRaw.(string)) + value = tools.IntPtr(valueMapped) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.IntegerVariableInline{ + Name: name, + Value: value, + } + } + return nil +} + +func numberVariableInline(d *schema.ResourceData, key string) *imaging.NumberVariableInline { + var value *float64 + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + valueMapped, _ := strconv.ParseFloat(valueRaw.(string), 64) + value = tools.Float64Ptr(valueMapped) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.NumberVariableInline{ + Name: name, + Value: value, + } + } + return nil +} + +func queryVariableInline(d *schema.ResourceData, key string) *imaging.QueryVariableInline { + var name *string + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVar { + return &imaging.QueryVariableInline{ + Name: name, + } + } + return nil +} + +func stringVariableInline(d *schema.ResourceData, key string) *imaging.StringVariableInline { + var value *string + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + valueMapped := valueRaw.(string) + value = tools.StringPtr(valueMapped) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.StringVariableInline{ + Name: name, + Value: value, + } + } + return nil +} + +func intReader(d *schema.ResourceData, key string) int { + value, exist := extract(d, key) + if exist { + valInt, _ := strconv.Atoi(value.(string)) + return valInt + } + return 0 +} + +func intReaderPtr(d *schema.ResourceData, key string) *int { + value, exist := extract(d, key) + if exist { + if valInt, err := strconv.Atoi(value.(string)); err == nil { + return &valInt + } + } + return nil +} + +func stringReader(d *schema.ResourceData, key string) string { + value, exist := extract(d, key) + if exist { + return value.(string) + } + return "" +} + +func stringReaderPtr(d *schema.ResourceData, key string) *string { + value, exist := extract(d, key) + if exist { + return tools.StringPtr(value.(string)) + } + return nil +} + +func interfaceSliceToImagingImQueryAllowedTransformationsSlice(d *schema.ResourceData, key string) []imaging.ImQueryAllowedTransformations { + list, exist := extract(d, key) + if exist { + l := list.([]interface{}) + if len(l) > 0 { + result := make([]imaging.ImQueryAllowedTransformations, len(l)) + for i, v := range l { + result[i] = imaging.ImQueryAllowedTransformations(v.(string)) + } + return result + } + } + return nil +} + +func interfaceSliceToIntSlice(d *schema.ResourceData, key string) []int { + list, exist := extract(d, key) + if exist { + l := list.([]interface{}) + if len(l) > 0 { + result := make([]int, len(l)) + for i, v := range l { + result[i] = v.(int) + } + return result + } + } + return nil +} + +func interfaceSliceToStringSlice(d *schema.ResourceData, key string) []string { + list, exist := extract(d, key) + if exist { + l := list.([]interface{}) + if len(l) > 0 { + result := make([]string, len(l)) + for i, v := range l { + result[i] = v.(string) + } + return result + } + } + return nil +} + +func extract(d *schema.ResourceData, key string) (interface{}, bool) { + return d.GetOk(key) +} + +func decorateKeyForSlice(key string) string { + address := strings.Split(key, ".") + matches, _ := regexp.MatchString("[0-9]+", address[len(address)-1]) + if !matches { + return key + ".0" + } + return key +} + +func getKey(rootKey string, elementIndex int, elementName string) string { + return fmt.Sprintf("%s.%d.%s", rootKey, elementIndex, elementName) +} diff --git a/pkg/providers/imaging/policy_image.gen.go b/pkg/providers/imaging/policy_image.gen.go new file mode 100644 index 000000000..84e0be08d --- /dev/null +++ b/pkg/providers/imaging/policy_image.gen.go @@ -0,0 +1,2773 @@ +package imaging + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +func imageType(depth int) map[string]*schema.Schema { + if depth <= 0 { + return nil + } + return map[string]*schema.Schema{ + + "box_image": { + Description: "A rectangular box, with a specified color and applied transformation.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: boxImageType(depth - 1), + }, + }, + + "circle_image": { + Description: "A rectangular box, with a specified color and applied transformation.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: circleImageType(depth - 1), + }, + }, + + "text_image": { + Description: "A snippet of text. Defines font family and size, fill color, and outline stroke width and color.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: textImageType(depth - 1), + }, + }, + + "url_image": { + Description: "An image loaded from a URL.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: urlImageType(depth - 1), + }, + }, + } +} + +func imageTypePost(depth int) map[string]*schema.Schema { + if depth <= 0 { + return nil + } + return map[string]*schema.Schema{ + + "box_image": { + Description: "A rectangular box, with a specified color and applied transformation.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: boxImageTypePost(depth - 1), + }, + }, + + "circle_image": { + Description: "A rectangular box, with a specified color and applied transformation.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: circleImageTypePost(depth - 1), + }, + }, + + "text_image": { + Description: "A snippet of text. Defines font family and size, fill color, and outline stroke width and color.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: textImageTypePost(depth - 1), + }, + }, + + "url_image": { + Description: "An image loaded from a URL.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: urlImageTypePost(depth - 1), + }, + }, + } +} + +func shapeType(depth int) map[string]*schema.Schema { + if depth <= 0 { + return nil + } + return map[string]*schema.Schema{ + + "circle_shape": { + Description: "Defines a circle with a specified `radius` from its `center` point.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: circleShapeType(depth - 1), + }, + }, + + "point_shape": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: pointShapeType(depth - 1), + }, + }, + + "polygon_shape": { + Description: "Defines a polygon from a series of connected points.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: polygonShapeType(depth - 1), + }, + }, + + "rectangle_shape": { + Description: "Defines a rectangle's `width` and `height` relative to an `anchor` point at the top left corner.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: rectangleShapeType(depth - 1), + }, + }, + + "union_shape": { + Description: "Identifies a combined shape based on a set of other shapes. You can use a full JSON object to represent a union or an array of shapes that describe it.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: unionShapeType(depth - 1), + }, + }, + } +} + +func transformationType(depth int) map[string]*schema.Schema { + if depth <= 0 { + return nil + } + return map[string]*schema.Schema{ + + "append": { + Description: "Places a specified `image` beside the source image. The API places the `image` on a major dimension, then aligns it on the minor dimension. Transparent pixels fill any area not covered by either image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: appendType(depth - 1), + }, + }, + + "aspect_crop": { + Description: "Lets you change the height or width of an image (either by cropping or expanding the area) to an aspect ratio of your choosing.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: aspectCrop(depth - 1), + }, + }, + + "background_color": { + Description: "Places a transparent image on a set background color. Color is specified in the typical CSS hexadecimal format.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: backgroundColor(depth - 1), + }, + }, + + "blur": { + Description: "Applies a Gaussian blur to the image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: blur(depth - 1), + }, + }, + + "chroma_key": { + Description: "Changes any color in an image within the specified volume of the HSL colorspace to transparent or semitransparent. This transformation applies a 'green screen' technique commonly used to isolate and remove background colors.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: chromaKey(depth - 1), + }, + }, + + "composite": { + Description: "Applies another image to the source image, either as an overlay or an underlay. The image that's underneath is visible in areas that are beyond the edges of the top image or that are less than 100% opaque. A common use of an overlay composite is to add a watermark.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: composite(depth - 1), + }, + }, + + "compound": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: compound(depth - 1), + }, + }, + + "contrast": { + Description: "Adjusts both the contrast and brightness of an image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: contrast(depth - 1), + }, + }, + + "crop": { + Description: "Crops an image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: crop(depth - 1), + }, + }, + + "face_crop": { + Description: "Applies a method to detect faces in the source image and applies the rectangular crop on either the `biggest` face or `all` of the faces detected. Image and Video Manager tries to preserve faces in the image instead of using specified crop coordinates.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: faceCrop(depth - 1), + }, + }, + + "feature_crop": { + Description: "Identifies prominent features of the source image, then crops around as many of these features as possible relative to the specified `width` and `height` values.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: featureCrop(depth - 1), + }, + }, + + "fit_and_fill": { + Description: "Resizes an image to fit within a specific size box and then uses a fill of that same image to cover any transparent space at the edges. By default the fill image has a Blur transformation with a sigma value of 8 applied, but the transformation can be customized using the fillTransformation parameter.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: fitAndFill(depth - 1), + }, + }, + + "goop": { + Description: "Distorts an image by randomly repositioning a set of control points along a specified grid. The transformed image appears _goopy_. Adjust the density of the grid and the degree of randomity. You can use this transformation to create watermarks for use in security.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: goop(depth - 1), + }, + }, + + "grayscale": { + Description: "Restricts image color to shades of gray only.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: grayscale(depth - 1), + }, + }, + + "hsl": { + Description: "Adjusts the hue, saturation, and lightness (HSL) of an image. Hue is the number of degrees that colors rotate around the color wheel. Saturation is a multiplier to increase or decrease color saturation. Lightness is a multiplier to increase or decrease the lightness of an image. Other transformations can also affect color, such as `Grayscale` and `MaxColors`. If youre using more than one, consider the order to apply them for the desired results.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: hsl(depth - 1), + }, + }, + + "hsv": { + Description: "Identical to HSL except it replaces `lightness` with `value`. For example, if you reduce the `lightness` of a light green, almost white, image, the color turns a vibrant green. Reducing the `value` turns the image a darker color, close to grey. This happens because the original image color is very close to white.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: hsv(depth - 1), + }, + }, + + "if_dimension": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: ifDimension(depth - 1), + }, + }, + + "if_orientation": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: ifOrientation(depth - 1), + }, + }, + + "im_query": { + Description: "Apply artistic transformations to images quickly and dynamically by specifying transformations with a query string appendedto the image URL.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: imQuery(depth - 1), + }, + }, + + "max_colors": { + Description: "Set the maximum number of colors in the images palette. Reducing the number of colors in an image can help to reduce file size.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: maxColors(depth - 1), + }, + }, + + "mirror": { + Description: "Flips an image horizontally, vertically, or both.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: mirror(depth - 1), + }, + }, + + "mono_hue": { + Description: "Allows you to set all hues in an image to a single specified hue of your choosing. Mono Hue maintains the original color’s lightness and saturation but sets the hue to that of the specified value. This has the effect of making the image shades of the specified hue.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: monoHue(depth - 1), + }, + }, + + "opacity": { + Description: "Adjusts the level of transparency of an image. Use this transformation to make an image more or less transparent.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: opacity(depth - 1), + }, + }, + + "region_of_interest_crop": { + Description: "Crops to a region around a specified area of interest relative to the specified `width` and `height` values.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: regionOfInterestCrop(depth - 1), + }, + }, + + "relative_crop": { + Description: "Shrinks or expands an image relative to the image's specified dimensions. Image and Video Manager fills the expanded areas with transparency. Positive values shrink the side, while negative values expand it.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: relativeCrop(depth - 1), + }, + }, + + "remove_color": { + Description: "Removes a specified color from an image and replaces it with transparent pixels. This transformation is ideal for removing solid background colors from product images photographed on clean, consistent backgrounds without any shadows.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: removeColor(depth - 1), + }, + }, + + "resize": { + Description: "Resizes an image to a particular, absolute dimension. If you don't enter a `width` or a `height`, the image is resized with the `fit` aspect preservation mode, which selects a value for the missing dimension that preserves the image's aspect.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: resize(depth - 1), + }, + }, + + "rotate": { + Description: "Rotate the image around its center by indicating the degrees of rotation.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: rotate(depth - 1), + }, + }, + + "scale": { + Description: "Changes the image's size to different dimensions relative to its starting size.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: scale(depth - 1), + }, + }, + + "shear": { + Description: "Slants an image into a parallelogram, as a percent of the starting dimension as represented in decimal format. You need to specify at least one axis property. Transparent pixels fill empty areas around the sheared image as needed, so it's often useful to use a `BackgroundColor` transformation for these areas.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: shear(depth - 1), + }, + }, + + "trim": { + Description: "Automatically crops uniform backgrounds from the edges of an image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: trim(depth - 1), + }, + }, + + "unsharp_mask": { + Description: "Emphasizes edges and details in source images without distorting the colors. Although this effect is often referred to as _sharpening_ an image, it actually creates a blurred, inverted copy of the image known as an unsharp mask. Image and Video Manager combines the unsharp mask with the source image to create an image perceived as clearer.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: unsharpMask(depth - 1), + }, + }, + } +} + +func transformationTypePost(depth int) map[string]*schema.Schema { + if depth <= 0 { + return nil + } + return map[string]*schema.Schema{ + + "background_color": { + Description: "Places a transparent image on a set background color. Color is specified in the typical CSS hexadecimal format.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: backgroundColor(depth - 1), + }, + }, + + "blur": { + Description: "Applies a Gaussian blur to the image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: blur(depth - 1), + }, + }, + + "chroma_key": { + Description: "Changes any color in an image within the specified volume of the HSL colorspace to transparent or semitransparent. This transformation applies a 'green screen' technique commonly used to isolate and remove background colors.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: chromaKey(depth - 1), + }, + }, + + "composite": { + Description: "Applies another image to the source image, either as an overlay or an underlay. The image that's underneath is visible in areas that are beyond the edges of the top image or that are less than 100% opaque. A common use of an overlay composite is to add a watermark.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: compositePost(depth - 1), + }, + }, + + "compound": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: compoundPost(depth - 1), + }, + }, + + "contrast": { + Description: "Adjusts both the contrast and brightness of an image.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: contrast(depth - 1), + }, + }, + + "goop": { + Description: "Distorts an image by randomly repositioning a set of control points along a specified grid. The transformed image appears _goopy_. Adjust the density of the grid and the degree of randomity. You can use this transformation to create watermarks for use in security.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: goop(depth - 1), + }, + }, + + "grayscale": { + Description: "Restricts image color to shades of gray only.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: grayscale(depth - 1), + }, + }, + + "hsl": { + Description: "Adjusts the hue, saturation, and lightness (HSL) of an image. Hue is the number of degrees that colors rotate around the color wheel. Saturation is a multiplier to increase or decrease color saturation. Lightness is a multiplier to increase or decrease the lightness of an image. Other transformations can also affect color, such as `Grayscale` and `MaxColors`. If youre using more than one, consider the order to apply them for the desired results.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: hsl(depth - 1), + }, + }, + + "hsv": { + Description: "Identical to HSL except it replaces `lightness` with `value`. For example, if you reduce the `lightness` of a light green, almost white, image, the color turns a vibrant green. Reducing the `value` turns the image a darker color, close to grey. This happens because the original image color is very close to white.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: hsv(depth - 1), + }, + }, + + "if_dimension": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: ifDimensionPost(depth - 1), + }, + }, + + "if_orientation": { + Description: "", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: ifOrientationPost(depth - 1), + }, + }, + + "max_colors": { + Description: "Set the maximum number of colors in the images palette. Reducing the number of colors in an image can help to reduce file size.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: maxColors(depth - 1), + }, + }, + + "mirror": { + Description: "Flips an image horizontally, vertically, or both.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: mirror(depth - 1), + }, + }, + + "mono_hue": { + Description: "Allows you to set all hues in an image to a single specified hue of your choosing. Mono Hue maintains the original color’s lightness and saturation but sets the hue to that of the specified value. This has the effect of making the image shades of the specified hue.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: monoHue(depth - 1), + }, + }, + + "opacity": { + Description: "Adjusts the level of transparency of an image. Use this transformation to make an image more or less transparent.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: opacity(depth - 1), + }, + }, + + "remove_color": { + Description: "Removes a specified color from an image and replaces it with transparent pixels. This transformation is ideal for removing solid background colors from product images photographed on clean, consistent backgrounds without any shadows.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: removeColor(depth - 1), + }, + }, + + "unsharp_mask": { + Description: "Emphasizes edges and details in source images without distorting the colors. Although this effect is often referred to as _sharpening_ an image, it actually creates a blurred, inverted copy of the image known as an unsharp mask. Image and Video Manager combines the unsharp mask with the source image to create an image perceived as clearer.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: unsharpMask(depth - 1), + }, + }, + } +} + +// PolicyOutputImage is a top level schema func +func PolicyOutputImage(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "breakpoints": { + Type: schema.TypeList, + Optional: true, + Description: "The breakpoint widths (in pixels) to use to create derivative images/videos.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: breakpoints(depth - 1), + }, + }, + "hosts": { + Type: schema.TypeList, + Optional: true, + Description: "Hosts that are allowed for image/video URLs within transformations or variables.", + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "output": { + Type: schema.TypeList, + Optional: true, + Description: "Dictates the output quality (either `quality` or `perceptualQuality`) and formats that are created for each resized image. If unspecified, image formats are created to support all browsers at the default quality level (`85`), which includes formats such as WEBP, JPEG2000 and JPEG-XR for specific browsers.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: outputImage(depth - 1), + }, + }, + "post_breakpoint_transformations": { + Type: schema.TypeList, + Optional: true, + Description: "Post-processing Transformations are applied to the image after image and quality settings have been applied.", + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "rollout_duration": { + Type: schema.TypeString, + Optional: true, + Description: "The amount of time in seconds that the policy takes to rollout. During the rollout an increasing proportion of images/videos will begin to use the new policy instead of the cached images/videos from the previous version. This value has no effect on the staging network.", + ValidateDiagFunc: stringAsIntBetween(3600, 604800), + }, + "transformations": { + Type: schema.TypeList, + Optional: true, + Description: "Set of image transformations to apply to the source image. If unspecified, no operations are performed.", + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "variables": { + Type: schema.TypeList, + Optional: true, + Description: "Declares variables for use within the policy. Any variable declared here can be invoked throughout transformations as a [Variable](#variable) object, so that you don't have to specify values separately. You can also pass in these variable names and values dynamically as query parameters in the image's request URL.", + Elem: &schema.Resource{ + Schema: variable(depth - 1), + }, + }, + } +} + +func appendType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies where to place the `image` relative to the source image. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and a `Center` by default.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_priority": { + Type: schema.TypeString, + Optional: true, + Description: "Determines the exact placement of the `image` when `gravity` is `Center` or a diagonal. The value is either `horizontal` or `vertical`. Use `horizontal` to append an `image` east or west of the source image. This aligns the `image` on the vertical gravity component, placing `Center` gravity east. Use `vertical` to append an `image` north or south of the source image. This aligns the `image` on the horizontal gravity component, placing `Center` gravity south.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"horizontal", "vertical"}, false)), + }, + "gravity_priority_var": { + Type: schema.TypeString, + Optional: true, + Description: "Determines the exact placement of the `image` when `gravity` is `Center` or a diagonal. The value is either `horizontal` or `vertical`. Use `horizontal` to append an `image` east or west of the source image. This aligns the `image` on the vertical gravity component, placing `Center` gravity east. Use `vertical` to append an `image` north or south of the source image. This aligns the `image` on the horizontal gravity component, placing `Center` gravity south.", + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies where to place the `image` relative to the source image. The available values represent the eight cardinal directions (`North`, `South`, `East`, `West`, `NorthEast`, `NorthWest`, `SouthEast`, `SouthWest`) and a `Center` by default.", + }, + "image": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: imageType(depth - 1), + }, + }, + "preserve_minor_dimension": { + Type: schema.TypeString, + Optional: true, + Description: "Whether to preserve the source image's minor dimension, `false` by default. The minor dimension is the dimension opposite the dimension that the appending `image` is placed. For example, the dimensions of the source image are 100 × 100 pixels. The dimensions of the appending `image` are 50 × 150 pixels. The `gravity` is set to `East`. This makes the major dimension horizontal and the source image's minor dimension vertical. To preserve the source image's minor dimension at 100 pixels, the `preserveMinorDimension` is set to `true`. As a result of the append, the major dimension expanded with the appended image to 150 pixels. The source image's minor dimension was maintained at 100 pixels. The total combined dimension of the image is 150 × 100 pixels.", + ValidateDiagFunc: validateIsTypeBool(), + }, + "preserve_minor_dimension_var": { + Type: schema.TypeString, + Optional: true, + Description: "Whether to preserve the source image's minor dimension, `false` by default. The minor dimension is the dimension opposite the dimension that the appending `image` is placed. For example, the dimensions of the source image are 100 × 100 pixels. The dimensions of the appending `image` are 50 × 150 pixels. The `gravity` is set to `East`. This makes the major dimension horizontal and the source image's minor dimension vertical. To preserve the source image's minor dimension at 100 pixels, the `preserveMinorDimension` is set to `true`. As a result of the append, the major dimension expanded with the appended image to 150 pixels. The source image's minor dimension was maintained at 100 pixels. The total combined dimension of the image is 150 × 100 pixels.", + }, + } +} + +func aspectCrop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "allow_expansion": { + Type: schema.TypeString, + Optional: true, + Description: "Increases the size of the image canvas to achieve the requested aspect ratio instead of cropping the image. Use the Horizontal Offset and Vertical Offset settings to determine where to add the fully transparent pixels on the expanded image canvas.", + ValidateDiagFunc: validateIsTypeBool(), + }, + "allow_expansion_var": { + Type: schema.TypeString, + Optional: true, + Description: "Increases the size of the image canvas to achieve the requested aspect ratio instead of cropping the image. Use the Horizontal Offset and Vertical Offset settings to determine where to add the fully transparent pixels on the expanded image canvas.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height term of the aspect ratio to crop.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height term of the aspect ratio to crop.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width term of the aspect ratio to crop.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width term of the aspect ratio to crop.", + }, + "x_position": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the horizontal portion of the image you want to keep when the aspect ratio cropping is applied. When using Allow Expansion this setting defines the horizontal position of the image on the new expanded image canvas.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "x_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the horizontal portion of the image you want to keep when the aspect ratio cropping is applied. When using Allow Expansion this setting defines the horizontal position of the image on the new expanded image canvas.", + }, + "y_position": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the horizontal portion of the image you want to keep when the aspect ratio cropping is applied. When using Allow Expansion this setting defines the horizontal position of the image on the new expanded image canvas.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "y_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the horizontal portion of the image you want to keep when the aspect ratio cropping is applied. When using Allow Expansion this setting defines the horizontal position of the image on the new expanded image canvas.", + }, + } +} + +func backgroundColor(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The hexadecimal CSS color value for the background.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The hexadecimal CSS color value for the background.", + }, + } +} + +func blur(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "sigma": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to scatter the original pixel by to create the blur effect. Resulting images may be larger than the original as pixels at the edge of the image might scatter outside the image's original dimensions.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "sigma_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to scatter the original pixel by to create the blur effect. Resulting images may be larger than the original as pixels at the edge of the image might scatter outside the image's original dimensions.", + }, + } +} + +func boxImageType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the box in pixels.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + }, + } +} + +func boxImageTypePost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the box in pixels.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + }, + } +} + +func breakpoints(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "widths": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + }, + } +} + +func chromaKey(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "hue": { + Type: schema.TypeString, + Optional: true, + Description: "The hue to remove. Enter the degree of rotation between 0 and 360 degrees around the color wheel. By default Chroma Key removes a green hue, 120° on the color wheel.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_feather": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional hue to make semi-transparent beyond the Hue Tolerance. By default Hue Feather is 0.083 which applies semi-transparency to hues 30° around the Hue Tolerance.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_feather_var": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional hue to make semi-transparent beyond the Hue Tolerance. By default Hue Feather is 0.083 which applies semi-transparency to hues 30° around the Hue Tolerance.", + }, + "hue_tolerance": { + Type: schema.TypeString, + Optional: true, + Description: "How close a color's hue needs to be to the selected hue for it to be changed to fully transparent. If you enter the maximum value of 1.0 the entire image is made transparent. By default Hue Tolerance is approximately 0.083 or 8.3% of the color wheel. This value corresponds to 30° around the specified hue.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_tolerance_var": { + Type: schema.TypeString, + Optional: true, + Description: "How close a color's hue needs to be to the selected hue for it to be changed to fully transparent. If you enter the maximum value of 1.0 the entire image is made transparent. By default Hue Tolerance is approximately 0.083 or 8.3% of the color wheel. This value corresponds to 30° around the specified hue.", + }, + "hue_var": { + Type: schema.TypeString, + Optional: true, + Description: "The hue to remove. Enter the degree of rotation between 0 and 360 degrees around the color wheel. By default Chroma Key removes a green hue, 120° on the color wheel.", + }, + "lightness_feather": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional lightness to make semi-transparent beyond the Lightness Tolerance. The default value of 0.1 corresponds to 10% away from the tolerated lightness towards full black or full white.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "lightness_feather_var": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional lightness to make semi-transparent beyond the Lightness Tolerance. The default value of 0.1 corresponds to 10% away from the tolerated lightness towards full black or full white.", + }, + "lightness_tolerance": { + Type: schema.TypeString, + Optional: true, + Description: "How much of the lightest part and darkest part of a color to preserve. For example, you can space this value out from the middle (i.e. 0.5 lightness or full color) to help preserve the splash lighting impact in the image. You can define how close the color needs to be to the full color to remove it from your image. The default value of 0.75 means that a colour must be within 75% of the full color to full white or full black for full removal.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "lightness_tolerance_var": { + Type: schema.TypeString, + Optional: true, + Description: "How much of the lightest part and darkest part of a color to preserve. For example, you can space this value out from the middle (i.e. 0.5 lightness or full color) to help preserve the splash lighting impact in the image. You can define how close the color needs to be to the full color to remove it from your image. The default value of 0.75 means that a colour must be within 75% of the full color to full white or full black for full removal.", + }, + "saturation_feather": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional saturation to make semi-transparent beyond the Saturation Tolerance. By default Saturation Feather is 0.1 which applies semi-transparency to hues 10% below the saturationTolerance.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "saturation_feather_var": { + Type: schema.TypeString, + Optional: true, + Description: "How much additional saturation to make semi-transparent beyond the Saturation Tolerance. By default Saturation Feather is 0.1 which applies semi-transparency to hues 10% below the saturationTolerance.", + }, + "saturation_tolerance": { + Type: schema.TypeString, + Optional: true, + Description: "How close a color's saturation needs to be to full saturation for it to be changed to fully transparent. For example, you can define how green the color needs to be to remove it from your image. The default value of 0.75 means that a color must be within 75% of full saturation in order to be made fully transparent.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "saturation_tolerance_var": { + Type: schema.TypeString, + Optional: true, + Description: "How close a color's saturation needs to be to full saturation for it to be changed to fully transparent. For example, you can define how green the color needs to be to remove it from your image. The default value of 0.75 means that a color must be within 75% of full saturation in order to be made fully transparent.", + }, + } +} + +func circleImageType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "diameter": { + Type: schema.TypeString, + Optional: true, + Description: "The diameter of the circle. The diameter will be the width and the height of the image in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "diameter_var": { + Type: schema.TypeString, + Optional: true, + Description: "The diameter of the circle. The diameter will be the width and the height of the image in pixels.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + }, + } +} + +func circleImageTypePost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values.", + }, + "diameter": { + Type: schema.TypeString, + Optional: true, + Description: "The diameter of the circle. The diameter will be the width and the height of the image in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "diameter_var": { + Type: schema.TypeString, + Optional: true, + Description: "The diameter of the circle. The diameter will be the width and the height of the image in pixels.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the box in pixels.", + }, + } +} + +func circleShapeType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "center": { + Type: schema.TypeList, + Required: true, + Description: "Defines coordinates for a single point, to help define polygons and rectangles. Each point may be an object with `x`and `y` members, or a two-element array.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: pointShapeType(depth - 1), + }, + }, + "radius": { + Type: schema.TypeString, + Optional: true, + Description: "The radius of the circle measured in pixels.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "radius_var": { + Type: schema.TypeString, + Optional: true, + Description: "The radius of the circle measured in pixels.", + }, + } +} + +func composite(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Compass direction indicating the corner or edge of the base image to place the applied image. Use Horizontal and Vertical Offset to adjust the applied image's gravity position", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Compass direction indicating the corner or edge of the base image to place the applied image. Use Horizontal and Vertical Offset to adjust the applied image's gravity position", + }, + "image": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: imageType(depth - 1), + }, + }, + "placement": { + Type: schema.TypeString, + Optional: true, + Description: "Place applied image on top of or underneath the base image. Watermarks are usually applied over. Backgrounds are usually applied under.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"Over", "Under", "Mask", "Stencil"}, false)), + }, + "placement_var": { + Type: schema.TypeString, + Optional: true, + Description: "Place applied image on top of or underneath the base image. Watermarks are usually applied over. Backgrounds are usually applied under.", + }, + "scale": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to resize the applied image relative to the source image and preserve aspect ratio, 1 by default. Set the `scaleDimension` to calculate the `scale` from the source image's width or height.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "scale_dimension": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension, either `width` or `height`, of the source image to scale.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"width", "height"}, false)), + }, + "scale_dimension_var": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension, either `width` or `height`, of the source image to scale.", + }, + "scale_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to resize the applied image relative to the source image and preserve aspect ratio, 1 by default. Set the `scaleDimension` to calculate the `scale` from the source image's width or height.", + }, + "x_position": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to apply.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "x_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to apply.", + }, + "y_position": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to apply.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "y_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to apply.", + }, + } +} + +func compositePost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Compass direction indicating the corner or edge of the base image to place the applied image. Use Horizontal and Vertical Offset to adjust the applied image's gravity position", + Default: "NorthWest", + ValidateDiagFunc: validateGravityPost(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Compass direction indicating the corner or edge of the base image to place the applied image. Use Horizontal and Vertical Offset to adjust the applied image's gravity position", + }, + "image": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: imageTypePost(depth - 1), + }, + }, + "placement": { + Type: schema.TypeString, + Optional: true, + Description: "Place applied image on top of or underneath the base image. Watermarks are usually applied over. Backgrounds are usually applied under.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"Over", "Under", "Mask", "Stencil"}, false)), + }, + "placement_var": { + Type: schema.TypeString, + Optional: true, + Description: "Place applied image on top of or underneath the base image. Watermarks are usually applied over. Backgrounds are usually applied under.", + }, + "scale": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to resize the applied image relative to the source image and preserve aspect ratio, 1 by default. Set the `scaleDimension` to calculate the `scale` from the source image's width or height.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "scale_dimension": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension, either `width` or `height`, of the source image to scale.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"width", "height"}, false)), + }, + "scale_dimension_var": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension, either `width` or `height`, of the source image to scale.", + }, + "scale_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to resize the applied image relative to the source image and preserve aspect ratio, 1 by default. Set the `scaleDimension` to calculate the `scale` from the source image's width or height.", + }, + "x_position": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to apply.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "x_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to apply.", + }, + "y_position": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to apply.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "y_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to apply.", + }, + } +} + +func compound(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "transformations": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + } +} + +func compoundPost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "transformations": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + } +} + +func contrast(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "brightness": { + Type: schema.TypeString, + Optional: true, + Description: "Adjusts the brightness of the image. Positive values increase brightness and negative values decrease brightness. A value of `1` produces a white image. A value of `-1` produces a black image. The default value is `0`, which leaves the image unchanged. The acceptable value range is `-1.0` to `1.0`. Values outside of the acceptable range clamp to this range.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "brightness_var": { + Type: schema.TypeString, + Optional: true, + Description: "Adjusts the brightness of the image. Positive values increase brightness and negative values decrease brightness. A value of `1` produces a white image. A value of `-1` produces a black image. The default value is `0`, which leaves the image unchanged. The acceptable value range is `-1.0` to `1.0`. Values outside of the acceptable range clamp to this range.", + }, + "contrast": { + Type: schema.TypeString, + Optional: true, + Description: "Adjusts the contrast of the image. Expressed as a range from `-1` to `1`, positive values increase contrast, negative values decrease it, while `0` leaves the image unchanged. Values outside of the `-1` to `1` range clamp to this range.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "contrast_var": { + Type: schema.TypeString, + Optional: true, + Description: "Adjusts the contrast of the image. Expressed as a range from `-1` to `1`, positive values increase contrast, negative values decrease it, while `0` leaves the image unchanged. Values outside of the `-1` to `1` range clamp to this range.", + }, + } +} + +func crop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "allow_expansion": { + Type: schema.TypeString, + Optional: true, + Description: "If cropping an area outside of the existing canvas, expands the image canvas.", + ValidateDiagFunc: validateIsTypeBool(), + }, + "allow_expansion_var": { + Type: schema.TypeString, + Optional: true, + Description: "If cropping an area outside of the existing canvas, expands the image canvas.", + }, + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Frame of reference for X and Y Positions.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Frame of reference for X and Y Positions.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to crop along the y-axis.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to crop along the y-axis.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to crop along the x-axis.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to crop along the x-axis.", + }, + "x_position": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to crop from.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "x_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The x-axis position of the image to crop from.", + }, + "y_position": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to crop from.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "y_position_var": { + Type: schema.TypeString, + Optional: true, + Description: "The y-axis position of the image to crop from.", + }, + } +} + +func enumOptions(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + Description: "The unique identifier for each enum value, up to 50 alphanumeric characters.", + }, + "value": { + Type: schema.TypeString, + Required: true, + Description: "The value of the variable when the `id` is provided.", + }, + } +} + +func faceCrop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "algorithm": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the type of algorithm used to detect faces in the image, either `cascade` for the cascade classifier algorithm or `dnn` for the deep neural network algorithm, `cascade` by default.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"cascade", "dnn"}, false)), + }, + "algorithm_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the type of algorithm used to detect faces in the image, either `cascade` for the cascade classifier algorithm or `dnn` for the deep neural network algorithm, `cascade` by default.", + }, + "confidence": { + Type: schema.TypeString, + Optional: true, + Description: "With `algorithm` set to `dnn`, specifies the minimum confidence needed to detect faces in the image. Values range from `0` to `1` for increased confidence, and possibly fewer faces detected.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "confidence_var": { + Type: schema.TypeString, + Optional: true, + Description: "With `algorithm` set to `dnn`, specifies the minimum confidence needed to detect faces in the image. Values range from `0` to `1` for increased confidence, and possibly fewer faces detected.", + }, + "fail_gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop if Image and Video Manager does not detect any faces in the image. Directions are relative to the edges of the image being transformed.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "fail_gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop if Image and Video Manager does not detect any faces in the image. Directions are relative to the edges of the image being transformed.", + }, + "focus": { + Type: schema.TypeString, + Optional: true, + Description: "Distinguishes the faces detected, either `biggestFace` or `allFaces` to place the crop rectangle around the full set of faces, `all` by default.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"allFaces", "biggestFace"}, false)), + }, + "focus_var": { + Type: schema.TypeString, + Optional: true, + Description: "Distinguishes the faces detected, either `biggestFace` or `allFaces` to place the crop rectangle around the full set of faces, `all` by default.", + }, + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop. Directions are relative to the face(s) plus padding.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop. Directions are relative to the face(s) plus padding.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the output image in pixels relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height of the output image in pixels relative to the specified `style` value.", + }, + "padding": { + Type: schema.TypeString, + Optional: true, + Description: "The padding ratio based on the dimensions of the biggest face detected, `0.5` by default. Larger values increase padding.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "padding_var": { + Type: schema.TypeString, + Optional: true, + Description: "The padding ratio based on the dimensions of the biggest face detected, `0.5` by default. Larger values increase padding.", + }, + "style": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the faces detected in the source image, `zoom` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` places a raw crop around the faces, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and faces as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the faces, relative to the specified `width` and `height` values. Allows Variable substitution.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"crop", "fill", "zoom"}, false)), + }, + "style_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the faces detected in the source image, `zoom` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` places a raw crop around the faces, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and faces as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the faces, relative to the specified `width` and `height` values. Allows Variable substitution.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the output image in pixels relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width of the output image in pixels relative to the specified `style` value.", + }, + } +} + +func featureCrop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "fail_gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop if Image and Video Manager does not detect any features in the image. Directions are relative to the edges of the image being transformed.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "fail_gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop if Image and Video Manager does not detect any features in the image. Directions are relative to the edges of the image being transformed.", + }, + "feature_radius": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels of the important features to search for. If identified, two features never appear closer together than this value, `8.0` by default.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "feature_radius_var": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels of the important features to search for. If identified, two features never appear closer together than this value, `8.0` by default.", + }, + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop. Directions are relative to the region of interest plus padding.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Controls placement of the crop. Directions are relative to the region of interest plus padding.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height in pixels of the output image relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height in pixels of the output image relative to the specified `style` value.", + }, + "max_features": { + Type: schema.TypeString, + Optional: true, + Description: "The maximum number of features to identify as important features, `32` by default. The strongest features are always chosen.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "max_features_var": { + Type: schema.TypeString, + Optional: true, + Description: "The maximum number of features to identify as important features, `32` by default. The strongest features are always chosen.", + }, + "min_feature_quality": { + Type: schema.TypeString, + Optional: true, + Description: "Determines the minimum quality level of the feature identified. To consider a feature important, the feature needs to surpass this value. Image and Video Manager measures quality on a scale from `0` for the lowest quality to `1` for the highest quality, `.1` by default.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "min_feature_quality_var": { + Type: schema.TypeString, + Optional: true, + Description: "Determines the minimum quality level of the feature identified. To consider a feature important, the feature needs to surpass this value. Image and Video Manager measures quality on a scale from `0` for the lowest quality to `1` for the highest quality, `.1` by default.", + }, + "padding": { + Type: schema.TypeString, + Optional: true, + Description: "Adds space around the region of interest. The amount of padding added is directly related to the size of the bounding box of the selected features. Specifically, the region of interest is expanded in all directions by the largest dimension of the bounding box of the selected features multiplied by this value.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "padding_var": { + Type: schema.TypeString, + Optional: true, + Description: "Adds space around the region of interest. The amount of padding added is directly related to the size of the bounding box of the selected features. Specifically, the region of interest is expanded in all directions by the largest dimension of the bounding box of the selected features multiplied by this value.", + }, + "style": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the features identified in the source image, `fill` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` performs a raw crop around the features, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and features as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the features, relative to the specified `width` and `height` values. Allows Variable substitution.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"crop", "fill", "zoom"}, false)), + }, + "style_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the features identified in the source image, `fill` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` performs a raw crop around the features, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and features as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the features, relative to the specified `width` and `height` values. Allows Variable substitution.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width in pixels of the output image relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width in pixels of the output image relative to the specified `style` value.", + }, + } +} + +func fitAndFill(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "fill_transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height value of the resized image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height value of the resized image.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width value of the resized image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width value of the resized image.", + }, + } +} + +func goop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "chaos": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the greatest distance control points may move from their original position. A value of `1.0` shifts control points over as far as the next one in the original grid. A value of `0.0` leaves the image unchanged. Values under `0.5` work better for subtle distortions, otherwise control points may pass each other and cause a twisting effect.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "chaos_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the greatest distance control points may move from their original position. A value of `1.0` shifts control points over as far as the next one in the original grid. A value of `0.0` leaves the image unchanged. Values under `0.5` work better for subtle distortions, otherwise control points may pass each other and cause a twisting effect.", + }, + "density": { + Type: schema.TypeString, + Optional: true, + Description: "Controls the density of control points used to distort the image. The largest dimension of the input image is divided up to fit this number of control points. A grid of points is extended on the smaller dimension such that each row and column of control points is equidistant from each adjacent row or column. This parameter strongly affects transformation performance. Be careful choosing values above the default if you expect to transform medium to large size images.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "density_var": { + Type: schema.TypeString, + Optional: true, + Description: "Controls the density of control points used to distort the image. The largest dimension of the input image is divided up to fit this number of control points. A grid of points is extended on the smaller dimension such that each row and column of control points is equidistant from each adjacent row or column. This parameter strongly affects transformation performance. Be careful choosing values above the default if you expect to transform medium to large size images.", + }, + "power": { + Type: schema.TypeString, + Optional: true, + Description: "By default, the distortion algorithm relies on inverse squares to calculate distance but this allows you to change the exponent. You shouldnt need to vary the default value of `2.0`.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "power_var": { + Type: schema.TypeString, + Optional: true, + Description: "By default, the distortion algorithm relies on inverse squares to calculate distance but this allows you to change the exponent. You shouldnt need to vary the default value of `2.0`.", + }, + "seed": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies your own `seed` value as an alternative to the default, which is subject to variability. This allows for reproducible and deterministic distortions. If all parameters are kept equal and a constant seed is used, `Goop` distorts an input image consistently over many transformations. By default, this value is set to the current Epoch Time measured in milliseconds, which provides inconsistent transformation output.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "seed_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies your own `seed` value as an alternative to the default, which is subject to variability. This allows for reproducible and deterministic distortions. If all parameters are kept equal and a constant seed is used, `Goop` distorts an input image consistently over many transformations. By default, this value is set to the current Epoch Time measured in milliseconds, which provides inconsistent transformation output.", + }, + } +} + +func grayscale(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Optional: true, + Description: "The algorithm used to transform colors to grays, either `Brightness`, `Lightness`, `Rec601`, or the default `Rec709`.", + Default: "Rec709", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"Rec601", "Rec709", "Brightness", "Lightness"}, false)), + }, + "type_var": { + Type: schema.TypeString, + Optional: true, + Description: "The algorithm used to transform colors to grays, either `Brightness`, `Lightness`, `Rec601`, or the default `Rec709`.", + }, + } +} + +func hsl(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "hue": { + Type: schema.TypeString, + Optional: true, + Description: "The number of degrees to rotate colors around the color wheel, `0` by default.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of degrees to rotate colors around the color wheel, `0` by default.", + }, + "lightness": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the lightness of colors in the image. Note that lightness is distinct from brightness. For example, reducing the lightness of a light green might give you a lime green whereas reducing the brightness of a light green might give you a darker shade of the same green. Values less than `1.0` decrease the lightness of colors in the image. Values greater than `1.0` increase the lightness of colors in the image.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "lightness_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the lightness of colors in the image. Note that lightness is distinct from brightness. For example, reducing the lightness of a light green might give you a lime green whereas reducing the brightness of a light green might give you a darker shade of the same green. Values less than `1.0` decrease the lightness of colors in the image. Values greater than `1.0` increase the lightness of colors in the image.", + }, + "saturation": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "saturation_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image.", + }, + } +} + +func hsv(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "hue": { + Type: schema.TypeString, + Optional: true, + Description: "The number of degrees to rotate colors around the color wheel, `0.0` by default.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of degrees to rotate colors around the color wheel, `0.0` by default.", + }, + "saturation": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "saturation_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the saturation of colors in the image. Values less than `1.0` decrease saturation and values greater than `1.0` increase the saturation. A value of `0.0` removes all color from the image.", + }, + "value": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the lightness or darkness of the images base color. Values less than 1.0 decrease the base colors in the image, making them appear darker. Values greater than 1.0 increase the base colors in the image, making them appear lighter.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "value_var": { + Type: schema.TypeString, + Optional: true, + Description: "A multiplier to adjust the lightness or darkness of the images base color. Values less than 1.0 decrease the base colors in the image, making them appear darker. Values greater than 1.0 increase the base colors in the image, making them appear lighter.", + }, + } +} + +func ifDimension(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "default": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "dimension": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension to use to select the transformation, either `height`, `width`, or `both`.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"width", "height", "both"}, false)), + }, + "dimension_var": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension to use to select the transformation, either `height`, `width`, or `both`.", + }, + "equal": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "greater_than": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "less_than": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "value": { + Type: schema.TypeString, + Optional: true, + Description: "The value to compare against the source image dimension. For example, if the image dimension is less than the value the lessThan transformation is applied.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "value_var": { + Type: schema.TypeString, + Optional: true, + Description: "The value to compare against the source image dimension. For example, if the image dimension is less than the value the lessThan transformation is applied.", + }, + } +} + +func ifDimensionPost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "default": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "dimension": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension to use to select the transformation, either `height`, `width`, or `both`.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"width", "height", "both"}, false)), + }, + "dimension_var": { + Type: schema.TypeString, + Optional: true, + Description: "The dimension to use to select the transformation, either `height`, `width`, or `both`.", + }, + "equal": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "greater_than": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "less_than": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "value": { + Type: schema.TypeString, + Optional: true, + Description: "The value to compare against the source image dimension. For example, if the image dimension is less than the value the lessThan transformation is applied.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "value_var": { + Type: schema.TypeString, + Optional: true, + Description: "The value to compare against the source image dimension. For example, if the image dimension is less than the value the lessThan transformation is applied.", + }, + } +} + +func ifOrientation(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "default": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "landscape": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "portrait": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "square": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + } +} + +func ifOrientationPost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "default": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "landscape": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "portrait": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "square": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + } +} + +func imQuery(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "allowed_transformations": { + Type: schema.TypeList, + Required: true, + Description: "Specifies the transformations that can be applied using the query string parameter.", + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "query_var": { + Type: schema.TypeString, + Required: true, + }, + } +} + +func maxColors(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "colors": { + Type: schema.TypeString, + Optional: true, + Description: "The value representing the maximum number of colors to use with the source image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "colors_var": { + Type: schema.TypeString, + Optional: true, + Description: "The value representing the maximum number of colors to use with the source image.", + }, + } +} + +func mirror(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "horizontal": { + Type: schema.TypeString, + Optional: true, + Description: "Flips the image horizontally.", + ValidateDiagFunc: validateIsTypeBool(), + }, + "horizontal_var": { + Type: schema.TypeString, + Optional: true, + Description: "Flips the image horizontally.", + }, + "vertical": { + Type: schema.TypeString, + Optional: true, + Description: "Flips the image vertically.", + ValidateDiagFunc: validateIsTypeBool(), + }, + "vertical_var": { + Type: schema.TypeString, + Optional: true, + Description: "Flips the image vertically.", + }, + } +} + +func monoHue(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "hue": { + Type: schema.TypeString, + Optional: true, + Description: "Specify a hue by indicating the degree of rotation between 0 and 360 degrees around the color wheel. By default Mono Hue applies a red hue, 0.0 on the color wheel.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "hue_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specify a hue by indicating the degree of rotation between 0 and 360 degrees around the color wheel. By default Mono Hue applies a red hue, 0.0 on the color wheel.", + }, + } +} + +func opacity(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "opacity": { + Type: schema.TypeString, + Optional: true, + Description: "Represents alpha values on a scale of `0` to `1`. Values below `1` increase transparency, and `0` is invisible. For images that have some transparency, values above `1` increase the opacity of the transparent portions.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "opacity_var": { + Type: schema.TypeString, + Optional: true, + Description: "Represents alpha values on a scale of `0` to `1`. Values below `1` increase transparency, and `0` is invisible. For images that have some transparency, values above `1` increase the opacity of the transparent portions.", + }, + } +} + +func outputImage(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "adaptive_quality": { + Type: schema.TypeString, + Optional: true, + Description: "Override the quality of image to serve when Image & Video Manager detects a slow connection. Specifying lower values lets users with slow connections browse your site with reduced load times without impacting the quality of images for users with faster connections.", + ValidateDiagFunc: stringAsIntBetween(1, 100), + }, + "perceptual_quality": { + Type: schema.TypeString, + Optional: true, + Description: "Mutually exclusive with quality. The perceptual quality to use when comparing resulting images, which overrides the `quality` setting. Perceptual quality tunes each image format's quality parameter dynamically based on the human-perceived quality of the output image. This can result in better byte savings (as compared to using regular quality) as many images can be encoded at a much lower quality without compromising perception of the image. In addition, certain images may need to be encoded at a slightly higher quality in order to maintain human-perceived quality. Values are tiered `high`, `mediumHigh`, `medium`, `mediumLow`, or `low`.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"high", "mediumHigh", "medium", "mediumLow", "low"}, false)), + }, + "perceptual_quality_floor": { + Type: schema.TypeString, + Optional: true, + Description: "Only applies with perceptualQuality set. Sets a minimum image quality to respect when using perceptual quality. Perceptual quality will not reduce the quality below this value even if it determines the compressed image to be acceptably visually similar.", + ValidateDiagFunc: stringAsIntBetween(1, 100), + }, + "perceptual_quality_var": { + Type: schema.TypeString, + Optional: true, + Description: "Mutually exclusive with quality. The perceptual quality to use when comparing resulting images, which overrides the `quality` setting. Perceptual quality tunes each image format's quality parameter dynamically based on the human-perceived quality of the output image. This can result in better byte savings (as compared to using regular quality) as many images can be encoded at a much lower quality without compromising perception of the image. In addition, certain images may need to be encoded at a slightly higher quality in order to maintain human-perceived quality. Values are tiered `high`, `mediumHigh`, `medium`, `mediumLow`, or `low`.", + }, + "quality": { + Type: schema.TypeString, + Optional: true, + Description: "Mutually exclusive with perceptualQuality, used by default if neither is specified. The chosen quality of the output images. Using a quality value from 1-100 resembles JPEG quality across output formats.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "quality_var": { + Type: schema.TypeString, + Optional: true, + Description: "Mutually exclusive with perceptualQuality, used by default if neither is specified. The chosen quality of the output images. Using a quality value from 1-100 resembles JPEG quality across output formats.", + }, + } +} + +func pointShapeType(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "x": { + Type: schema.TypeString, + Optional: true, + Description: "The horizontal position of the point, measured in pixels.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "x_var": { + Type: schema.TypeString, + Optional: true, + Description: "The horizontal position of the point, measured in pixels.", + }, + "y": { + Type: schema.TypeString, + Optional: true, + Description: "The vertical position of the point, measured in pixels.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "y_var": { + Type: schema.TypeString, + Optional: true, + Description: "The vertical position of the point, measured in pixels.", + }, + } +} + +func polygonShapeType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "points": { + Type: schema.TypeList, + Required: true, + Description: "Series of [PointShapeType](#pointshapetype) objects. The last and first points connect to close the shape automatically.", + Elem: &schema.Resource{ + Schema: pointShapeType(depth - 1), + }, + }, + } +} + +func rectangleShapeType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "anchor": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: pointShapeType(depth - 1), + }, + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "Extends the rectangle down from the `anchor` point.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "Extends the rectangle down from the `anchor` point.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "Extends the rectangle right from the `anchor` point.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "Extends the rectangle right from the `anchor` point.", + }, + } +} + +func regionOfInterestCrop(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "gravity": { + Type: schema.TypeString, + Optional: true, + Description: "The placement of the crop area relative to the specified area of interest.", + Default: "Center", + ValidateDiagFunc: validateGravity(), + }, + "gravity_var": { + Type: schema.TypeString, + Optional: true, + Description: "The placement of the crop area relative to the specified area of interest.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height in pixels of the output image relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height in pixels of the output image relative to the specified `style` value.", + }, + "region_of_interest": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: shapeType(depth - 1), + }, + }, + "style": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the specified area of interest in the source image, `zoom` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` places raw crop around the point of interest, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and point of interest as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the point of interest, relative to the specified `width` and `height` values.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"crop", "fill", "zoom"}, false)), + }, + "style_var": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies how to crop or scale a crop area for the specified area of interest in the source image, `zoom` by default. The output image resizes to the specified `width` and `height` values. A value of `crop` places raw crop around the point of interest, relative to the specified `gravity` value. A value of `fill` scales the crop area to include as much of the image and point of interest as possible, relative to the specified `width` and `height` values. A value of `zoom` scales the crop area as small as possible to fit the point of interest, relative to the specified `width` and `height` values.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width in pixels of the output image relative to the specified `style` value.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width in pixels of the output image relative to the specified `style` value.", + }, + } +} + +func relativeCrop(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "east": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the right side of the image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "east_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the right side of the image.", + }, + "north": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the top side of the image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "north_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the top side of the image.", + }, + "south": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the bottom side of the image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "south_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the bottom side of the image.", + }, + "west": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the left side of the image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "west_var": { + Type: schema.TypeString, + Optional: true, + Description: "The number of pixels to shrink or expand the left side of the image.", + }, + } +} + +func removeColor(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "color": { + Type: schema.TypeString, + Optional: true, + Description: "The hexadecimal CSS color value to remove.", + }, + "color_var": { + Type: schema.TypeString, + Optional: true, + Description: "The hexadecimal CSS color value to remove.", + }, + "feather": { + Type: schema.TypeString, + Optional: true, + Description: "The RemoveColor transformation may create a hard edge around an image. To minimize these hard edges and make the removal of the color more gradual in appearance, use the Feather option. This option allows you to extend the color removal beyond the specified Tolerance. The pixels in this extended tolerance become semi-transparent - creating a softer edge. The first realtime request for an image using the feather option may result in a slow transformation time. Subsequent requests are not impacted as they are served directly out of cache.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "feather_var": { + Type: schema.TypeString, + Optional: true, + Description: "The RemoveColor transformation may create a hard edge around an image. To minimize these hard edges and make the removal of the color more gradual in appearance, use the Feather option. This option allows you to extend the color removal beyond the specified Tolerance. The pixels in this extended tolerance become semi-transparent - creating a softer edge. The first realtime request for an image using the feather option may result in a slow transformation time. Subsequent requests are not impacted as they are served directly out of cache.", + }, + "tolerance": { + Type: schema.TypeString, + Optional: true, + Description: "The Tolerance option defines how close the color needs to be to the selected color before it's changed to fully transparent. Set the Tolerance to 0.0 to remove only the exact color specified.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "tolerance_var": { + Type: schema.TypeString, + Optional: true, + Description: "The Tolerance option defines how close the color needs to be to the selected color before it's changed to fully transparent. Set the Tolerance to 0.0 to remove only the exact color specified.", + }, + } +} + +func resize(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "aspect": { + Type: schema.TypeString, + Optional: true, + Description: "Preserves the aspect ratio. Select `fit` to make the image fit entirely within the selected width and height. When using `fit`, the resulting image has the largest possible size for the specified dimensions. Select `fill` to size the image so it both completely fills the dimensions and has the smallest possible file size. Otherwise `ignore` changes the original aspect ratio to fit within an arbitrarily shaped rectangle.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"fit", "fill", "ignore"}, false)), + }, + "aspect_var": { + Type: schema.TypeString, + Optional: true, + Description: "Preserves the aspect ratio. Select `fit` to make the image fit entirely within the selected width and height. When using `fit`, the resulting image has the largest possible size for the specified dimensions. Select `fill` to size the image so it both completely fills the dimensions and has the smallest possible file size. Otherwise `ignore` changes the original aspect ratio to fit within an arbitrarily shaped rectangle.", + }, + "height": { + Type: schema.TypeString, + Optional: true, + Description: "The height to resize the source image to. Must be set if height is not specified.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "The height to resize the source image to. Must be set if height is not specified.", + }, + "type": { + Type: schema.TypeString, + Optional: true, + Description: "Sets constraints for the image resize. Select `normal` to resize in all cases, either increasing or decreasing the dimensions. Select `downsize` to ignore this transformation if the result would be larger than the original. Select `upsize` to ignore this transformation if the result would be smaller.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"normal", "upsize", "downsize"}, false)), + }, + "type_var": { + Type: schema.TypeString, + Optional: true, + Description: "Sets constraints for the image resize. Select `normal` to resize in all cases, either increasing or decreasing the dimensions. Select `downsize` to ignore this transformation if the result would be larger than the original. Select `upsize` to ignore this transformation if the result would be smaller.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "The width to resize the source image to. Must be set if width is not specified.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "The width to resize the source image to. Must be set if width is not specified.", + }, + } +} + +func rotate(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "degrees": { + Type: schema.TypeString, + Optional: true, + Description: "The value to rotate the image by. Positive values rotate clockwise, while negative values rotate counter-clockwise.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "degrees_var": { + Type: schema.TypeString, + Optional: true, + Description: "The value to rotate the image by. Positive values rotate clockwise, while negative values rotate counter-clockwise.", + }, + } +} + +func scale(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "height": { + Type: schema.TypeString, + Optional: true, + Description: "Scaling factor for the input height to determine the output height of the image, where values between `0` and `1` decrease size. Image dimensions need to be non-zero positive numbers.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "height_var": { + Type: schema.TypeString, + Optional: true, + Description: "Scaling factor for the input height to determine the output height of the image, where values between `0` and `1` decrease size. Image dimensions need to be non-zero positive numbers.", + }, + "width": { + Type: schema.TypeString, + Optional: true, + Description: "Scaling factor for the input width to determine the output width of the image, where `1` leaves the width unchanged. Values greater than `1` increase the image size. Image dimensions need to be non-zero positive numbers.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "width_var": { + Type: schema.TypeString, + Optional: true, + Description: "Scaling factor for the input width to determine the output width of the image, where `1` leaves the width unchanged. Values greater than `1` increase the image size. Image dimensions need to be non-zero positive numbers.", + }, + } +} + +func shear(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "x_shear": { + Type: schema.TypeString, + Optional: true, + Description: "The amount to shear along the x-axis, measured in multiples of the image's width. Must be set if yShear is not specified.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "x_shear_var": { + Type: schema.TypeString, + Optional: true, + Description: "The amount to shear along the x-axis, measured in multiples of the image's width. Must be set if yShear is not specified.", + }, + "y_shear": { + Type: schema.TypeString, + Optional: true, + Description: "The amount to shear along the y-axis, measured in multiples of the image's height. Must be set if xShear is not specified.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "y_shear_var": { + Type: schema.TypeString, + Optional: true, + Description: "The amount to shear along the y-axis, measured in multiples of the image's height. Must be set if xShear is not specified.", + }, + } +} + +func textImageType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "fill": { + Type: schema.TypeString, + Optional: true, + Description: "The main fill color of the text.", + }, + "fill_var": { + Type: schema.TypeString, + Optional: true, + Description: "The main fill color of the text.", + }, + "size": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels to render the text.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "size_var": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels to render the text.", + }, + "stroke": { + Type: schema.TypeString, + Optional: true, + Description: "The color for the outline of the text.", + }, + "stroke_size": { + Type: schema.TypeString, + Optional: true, + Description: "The thickness in points for the outline of the text.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "stroke_size_var": { + Type: schema.TypeString, + Optional: true, + Description: "The thickness in points for the outline of the text.", + }, + "stroke_var": { + Type: schema.TypeString, + Optional: true, + Description: "The color for the outline of the text.", + }, + "text": { + Type: schema.TypeString, + Optional: true, + Description: "The line of text to render.", + }, + "text_var": { + Type: schema.TypeString, + Optional: true, + Description: "The line of text to render.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "typeface": { + Type: schema.TypeString, + Optional: true, + Description: "The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts.", + }, + "typeface_var": { + Type: schema.TypeString, + Optional: true, + Description: "The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts.", + }, + } +} + +func textImageTypePost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "fill": { + Type: schema.TypeString, + Optional: true, + Description: "The main fill color of the text.", + }, + "fill_var": { + Type: schema.TypeString, + Optional: true, + Description: "The main fill color of the text.", + }, + "size": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels to render the text.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "size_var": { + Type: schema.TypeString, + Optional: true, + Description: "The size in pixels to render the text.", + }, + "stroke": { + Type: schema.TypeString, + Optional: true, + Description: "The color for the outline of the text.", + }, + "stroke_size": { + Type: schema.TypeString, + Optional: true, + Description: "The thickness in points for the outline of the text.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "stroke_size_var": { + Type: schema.TypeString, + Optional: true, + Description: "The thickness in points for the outline of the text.", + }, + "stroke_var": { + Type: schema.TypeString, + Optional: true, + Description: "The color for the outline of the text.", + }, + "text": { + Type: schema.TypeString, + Optional: true, + Description: "The line of text to render.", + }, + "text_var": { + Type: schema.TypeString, + Optional: true, + Description: "The line of text to render.", + }, + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "typeface": { + Type: schema.TypeString, + Optional: true, + Description: "The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts.", + }, + "typeface_var": { + Type: schema.TypeString, + Optional: true, + Description: "The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts.", + }, + } +} + +func trim(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "fuzz": { + Type: schema.TypeString, + Optional: true, + Description: "The fuzz tolerance of the trim, a value between `0` and `1` that determines the acceptable amount of background variation before trimming stops.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "fuzz_var": { + Type: schema.TypeString, + Optional: true, + Description: "The fuzz tolerance of the trim, a value between `0` and `1` that determines the acceptable amount of background variation before trimming stops.", + }, + "padding": { + Type: schema.TypeString, + Optional: true, + Description: "The amount of padding in pixels to add to the trimmed image.", + ValidateDiagFunc: validateIsTypeInt(), + }, + "padding_var": { + Type: schema.TypeString, + Optional: true, + Description: "The amount of padding in pixels to add to the trimmed image.", + }, + } +} + +func unionShapeType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "shapes": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: shapeType(depth - 1), + }, + }, + } +} + +func unsharpMask(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "gain": { + Type: schema.TypeString, + Optional: true, + Description: "Set how much emphasis the filter applies to details. Higher values increase apparent sharpness of details.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "gain_var": { + Type: schema.TypeString, + Optional: true, + Description: "Set how much emphasis the filter applies to details. Higher values increase apparent sharpness of details.", + }, + "sigma": { + Type: schema.TypeString, + Optional: true, + Description: "The standard deviation of the Gaussian distribution used in the in unsharp mask, measured in pixels, `1.0` by default. High values emphasize large details and low values emphasize small details.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "sigma_var": { + Type: schema.TypeString, + Optional: true, + Description: "The standard deviation of the Gaussian distribution used in the in unsharp mask, measured in pixels, `1.0` by default. High values emphasize large details and low values emphasize small details.", + }, + "threshold": { + Type: schema.TypeString, + Optional: true, + Description: "Set the minimum change required to include a detail in the filter. Higher values discard more changes.", + ValidateDiagFunc: validateIsTypeFloat(), + }, + "threshold_var": { + Type: schema.TypeString, + Optional: true, + Description: "Set the minimum change required to include a detail in the filter. Higher values discard more changes.", + }, + } +} + +func urlImageType(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationType(depth - 1), + }, + }, + "url": { + Type: schema.TypeString, + Optional: true, + Description: "The URL of the image.", + }, + "url_var": { + Type: schema.TypeString, + Optional: true, + Description: "The URL of the image.", + }, + } +} + +func urlImageTypePost(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "transformation": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: transformationTypePost(depth - 1), + }, + }, + "url": { + Type: schema.TypeString, + Optional: true, + Description: "The URL of the image.", + }, + "url_var": { + Type: schema.TypeString, + Optional: true, + Description: "The URL of the image.", + }, + } +} + +func variable(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "default_value": { + Type: schema.TypeString, + Required: true, + Description: "The default value of the variable if no query parameter is provided. It needs to be one of the `enumOptions` if any are provided.", + }, + "enum_options": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: enumOptions(depth - 1), + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + Description: "The name of the variable, also available as the query parameter name to set the variable's value dynamically. Use up to 50 alphanumeric characters.", + }, + "postfix": { + Type: schema.TypeString, + Optional: true, + Description: "A postfix added to the value provided for the variable, or to the default value.", + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + Description: "A prefix added to the value provided for the variable, or to the default value.", + }, + "type": { + Type: schema.TypeString, + Required: true, + Description: "The type of value for the variable.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"bool", "number", "url", "color", "gravity", "placement", "scaleDimension", "grayscaleType", "aspect", "resizeType", "dimension", "perceptualQuality", "string", "focus"}, false)), + }, + } +} + +func validateGravity() schema.SchemaValidateDiagFunc { + return validation.ToDiagFunc(validation.StringInSlice([]string{"North", "NorthEast", "NorthWest", "South", "SouthEast", "SouthWest", "Center", "East", "West"}, false)) +} + +func validateGravityPost() schema.SchemaValidateDiagFunc { + return validation.ToDiagFunc(validation.StringInSlice([]string{"North", "NorthEast", "NorthWest", "South", "SouthEast", "SouthWest", "Center", "East", "West"}, false)) +} diff --git a/pkg/providers/imaging/policy_video.gen.go b/pkg/providers/imaging/policy_video.gen.go new file mode 100644 index 000000000..7de497cc0 --- /dev/null +++ b/pkg/providers/imaging/policy_video.gen.go @@ -0,0 +1,87 @@ +package imaging + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +// PolicyOutputVideo is a top level schema func +func PolicyOutputVideo(depth int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "breakpoints": { + Type: schema.TypeList, + Optional: true, + Description: "The breakpoint widths (in pixels) to use to create derivative images/videos.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: breakpoints(depth - 1), + }, + }, + "hosts": { + Type: schema.TypeList, + Optional: true, + Description: "Hosts that are allowed for image/video URLs within transformations or variables.", + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "output": { + Type: schema.TypeList, + Optional: true, + Description: "Dictates the output quality that are created for each resized video.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: outputVideo(depth - 1), + }, + }, + "rollout_duration": { + Type: schema.TypeString, + Optional: true, + Description: "The amount of time in seconds that the policy takes to rollout. During the rollout an increasing proportion of images/videos will begin to use the new policy instead of the cached images/videos from the previous version. This value has no effect on the staging network.", + ValidateDiagFunc: stringAsIntBetween(3600, 604800), + }, + "variables": { + Type: schema.TypeList, + Optional: true, + Description: "Declares variables for use within the policy. Any variable declared here can be invoked throughout transformations as a [Variable](#variable) object, so that you don't have to specify values separately. You can also pass in these variable names and values dynamically as query parameters in the image's request URL.", + Elem: &schema.Resource{ + Schema: variable(depth - 1), + }, + }, + } +} + +func outputVideo(_ int) map[string]*schema.Schema { + return map[string]*schema.Schema{ + "perceptual_quality": { + Type: schema.TypeString, + Optional: true, + Description: "The quality of derivative videos. High preserves video quality with reduced byte savings while low reduces video quality to increase byte savings.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"high", "mediumHigh", "medium", "mediumLow", "low"}, false)), + }, + "perceptual_quality_var": { + Type: schema.TypeString, + Optional: true, + Description: "The quality of derivative videos. High preserves video quality with reduced byte savings while low reduces video quality to increase byte savings.", + }, + "placeholder_video_url": { + Type: schema.TypeString, + Optional: true, + Description: "Allows you to add a specific placeholder video that appears when a user first requests a video, but before Image & Video Manager processes the video. If not specified the original video plays during the processing time.", + }, + "placeholder_video_url_var": { + Type: schema.TypeString, + Optional: true, + Description: "Allows you to add a specific placeholder video that appears when a user first requests a video, but before Image & Video Manager processes the video. If not specified the original video plays during the processing time.", + }, + "video_adaptive_quality": { + Type: schema.TypeString, + Optional: true, + Description: "Override the quality of video to serve when Image & Video Manager detects a slow connection. Specifying lower values lets users with slow connections browse your site with reduced load times without impacting the quality of videos for users with faster connections.", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"high", "mediumHigh", "medium", "mediumLow", "low"}, false)), + }, + "video_adaptive_quality_var": { + Type: schema.TypeString, + Optional: true, + Description: "Override the quality of video to serve when Image & Video Manager detects a slow connection. Specifying lower values lets users with slow connections browse your site with reduced load times without impacting the quality of videos for users with faster connections.", + }, + } +} diff --git a/pkg/providers/imaging/provider.go b/pkg/providers/imaging/provider.go index d6ae1e731..4669f276e 100644 --- a/pkg/providers/imaging/provider.go +++ b/pkg/providers/imaging/provider.go @@ -43,8 +43,11 @@ func Subprovider(opts ...Option) akamai.Subprovider { // Provider returns the Akamai terraform.Resource provider. func Provider() *schema.Provider { provider := &schema.Provider{ - Schema: map[string]*schema.Schema{}, - DataSourcesMap: map[string]*schema.Resource{}, + Schema: map[string]*schema.Schema{}, + DataSourcesMap: map[string]*schema.Resource{ + "akamai_imaging_policy_image": dataImagingPolicyImage(), + "akamai_imaging_policy_video": dataImagingPolicyVideo(), + }, ResourcesMap: map[string]*schema.Resource{ "akamai_imaging_policy_image": resourceImagingPolicyImage(), "akamai_imaging_policy_set": resourceImagingPolicySet(), diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index 173279d06..a3cba4df6 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -19,6 +19,7 @@ var testAccProviders map[string]*schema.Provider var testProvider *schema.Provider func TestMain(m *testing.M) { + PolicyDepth = 4 testProvider = akamai.Provider(Subprovider())() testAccProviders = map[string]*schema.Provider{ "akamai": testProvider, diff --git a/pkg/providers/imaging/akamai_imaging_policy_image.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go similarity index 84% rename from pkg/providers/imaging/akamai_imaging_policy_image.go rename to pkg/providers/imaging/resource_akamai_imaging_policy_image.go index aafe86635..76070a16c 100644 --- a/pkg/providers/imaging/akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go @@ -19,6 +19,14 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) +// MaxPolicyDepth is the maximum supported depth of the nested transformations, before we reach hard limit of the Terraform +// provider for the gRPC communication for exchanging schema information, which is 64MB +const MaxPolicyDepth = 7 + +// PolicyDepth is variable to allow changing it for the unit tests, to achieve faster execution for tests, +// which do not need all supported levels +var PolicyDepth = MaxPolicyDepth + func resourceImagingPolicyImage() *schema.Resource { return &schema.Resource{ CustomizeDiff: customdiff.All( @@ -84,10 +92,10 @@ func resourcePolicyImageCreate(ctx context.Context, d *schema.ResourceData, m in client := inst.Client(meta) logger.Debug("Creating policy") - return upsertPolicy(ctx, d, m, client) + return upsertPolicyImage(ctx, d, m, client) } -func upsertPolicy(ctx context.Context, d *schema.ResourceData, m interface{}, client imaging.Imaging) diag.Diagnostics { +func upsertPolicyImage(ctx context.Context, d *schema.ResourceData, m interface{}, client imaging.Imaging) diag.Diagnostics { policyID, err := tools.GetStringValue("policy_id", d) if err != nil { return diag.FromErr(err) @@ -100,15 +108,15 @@ func upsertPolicy(ctx context.Context, d *schema.ResourceData, m interface{}, cl if err != nil { return diag.FromErr(err) } + + var policy imaging.PolicyInputImage policyJSON, err := tools.GetStringValue("json", d) if err != nil { return diag.FromErr(err) } - var policy imaging.PolicyInputImage if err = json.Unmarshal([]byte(policyJSON), &policy); err != nil { return diag.FromErr(err) } - // upsert on staging only when there was a change if d.HasChangesExcept("activate_on_production") { upsertPolicyRequest := imaging.UpsertPolicyRequest{ @@ -172,14 +180,24 @@ func resourcePolicyImageRead(ctx context.Context, d *schema.ResourceData, m inte if err != nil { return diag.FromErr(err) } - policyJSON, err := getPolicyImageJSON(policy) + policyInput, err := repackPolicyImageOutputToInput(policy) + if err != nil { + return diag.FromErr(err) + } + + policyInput.RolloutDuration, err = getRolloutDuration(d) + if err != nil { + return diag.FromErr(err) + } + + policyJSON, err := getPolicyImageJSON(policyInput) if err != nil { return diag.FromErr(err) } attrs := make(map[string]interface{}) - attrs["version"] = policy.Version attrs["json"] = policyJSON + attrs["version"] = policy.Version if err := tools.SetAttrs(d, attrs); err != nil { return diag.FromErr(err) } @@ -187,6 +205,19 @@ func resourcePolicyImageRead(ctx context.Context, d *schema.ResourceData, m inte return nil } +func repackPolicyImageOutputToInput(policy *imaging.PolicyOutputImage) (*imaging.PolicyInputImage, error) { + policyOutputJSON, err := json.Marshal(policy) + if err != nil { + return nil, err + } + policyInput := imaging.PolicyInputImage{} + err = json.Unmarshal(policyOutputJSON, &policyInput) + if err != nil { + return nil, err + } + return &policyInput, nil +} + func getPolicyImage(ctx context.Context, client imaging.Imaging, policyID, contractID, policySetID string, network imaging.PolicyNetwork) (*imaging.PolicyOutputImage, error) { policyRequest := imaging.GetPolicyRequest{ PolicyID: policyID, @@ -206,23 +237,11 @@ func getPolicyImage(ctx context.Context, client imaging.Imaging, policyID, contr return policy, nil } -func getPolicyImageJSON(policy *imaging.PolicyOutputImage) (string, error) { +func getPolicyImageJSON(policy *imaging.PolicyInputImage) (string, error) { policyJSON, err := json.MarshalIndent(policy, "", " ") if err != nil { return "", err } - - // we store JSON as PolicyInput, so we need to convert it from PolicyOutput via JSON representation - var policyInput imaging.PolicyInputImage - if err := json.Unmarshal(policyJSON, &policyInput); err != nil { - return "", err - } - - policyJSON, err = json.MarshalIndent(policyInput, "", " ") - if err != nil { - return "", err - } - return string(policyJSON), nil } @@ -236,7 +255,7 @@ func resourcePolicyImageUpdate(ctx context.Context, d *schema.ResourceData, m in client := inst.Client(meta) logger.Debug("Updating policy") - return upsertPolicy(ctx, d, m, client) + return upsertPolicyImage(ctx, d, m, client) } func resourcePolicyImageDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { @@ -319,7 +338,11 @@ func resourcePolicyImageImport(ctx context.Context, d *schema.ResourceData, m in if err != nil { return nil, err } - policyStagingJSON, err := getPolicyImageJSON(policyStaging) + policy, err := repackPolicyImageOutputToInput(policyStaging) + if err != nil { + return nil, err + } + policyStagingJSON, err := getPolicyImageJSON(policy) if err != nil { return nil, err } @@ -332,7 +355,11 @@ func resourcePolicyImageImport(ctx context.Context, d *schema.ResourceData, m in return nil, err } } else { - policyProductionJSON, err := getPolicyImageJSON(policyProduction) + policy, err := repackPolicyImageOutputToInput(policyProduction) + if err != nil { + return nil, err + } + policyProductionJSON, err := getPolicyImageJSON(policy) if err != nil { return nil, err } @@ -393,3 +420,19 @@ func enforcePolicyImageVersionChange(_ context.Context, diff *schema.ResourceDif } return nil } + +func getRolloutDuration(d *schema.ResourceData) (*int, error) { + inputJSON, err := tools.GetStringValue("json", d) + if err != nil && !errors.Is(err, tools.ErrNotFound) { + return nil, err + } + if err == nil { + input := imaging.PolicyInputImage{} + err = json.Unmarshal([]byte(inputJSON), &input) + if err != nil { + return nil, err + } + return input.RolloutDuration, nil + } + return nil, nil +} diff --git a/pkg/providers/imaging/akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go similarity index 78% rename from pkg/providers/imaging/akamai_imaging_policy_image_test.go rename to pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index cab3efe15..682f27e5b 100644 --- a/pkg/providers/imaging/akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -13,7 +13,7 @@ import ( "github.com/tj/assert" ) -func TestResourcePolicy(t *testing.T) { +func TestResourcePolicyImage(t *testing.T) { type policyAttributes struct { version string @@ -21,6 +21,8 @@ func TestResourcePolicy(t *testing.T) { policyID string policySetID string activateOnProduction string + schema bool + emptyPolicy bool } var ( @@ -60,7 +62,7 @@ func TestResourcePolicy(t *testing.T) { }, }, Version: 1, - Video: false, + Video: tools.BoolPtr(false), } expectUpsertPolicy = func(_ *testing.T, client *mockimaging, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput) { @@ -112,20 +114,36 @@ func TestResourcePolicy(t *testing.T) { if attrs.policyPath != "" { policyJSON = loadFixtureString(attrs.policyPath) } - return resource.ComposeAggregateTestCheckFunc( + f := resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "id", fmt.Sprintf("%s:%s", attrs.policySetID, attrs.policyID)), resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "policy_id", attrs.policyID), resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "policyset_id", attrs.policySetID), resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "contract_id", "test_contract"), resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "version", attrs.version), - resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "json", policyJSON), resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "activate_on_production", attrs.activateOnProduction), ) + if attrs.schema { + if attrs.emptyPolicy { + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "policy.#", "1"), + ) + } + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "policy.#", "1"), + resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "policy.0.output.0.perceptual_quality", "mediumHigh"), + ) + } + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_image.policy", "json", policyJSON), + ) } ) t.Run("regular policy create", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -155,7 +173,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("regular policy create and later activate on production", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -197,7 +215,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("regular policy create and activate on production, later update both", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy_activate_same_time" + testDir := "testdata/TestResPolicyImage/regular_policy_activate_same_time" client := new(mockimaging) expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) @@ -248,7 +266,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("regular policy create and later change policy set id (force new)", func(t *testing.T) { - testDir := "testdata/TestResPolicy/change_policyset_id" + testDir := "testdata/TestResPolicyImage/change_policyset_id" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -296,7 +314,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("regular policy create, later activate on production and later modify on staging only", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy_update_staging" + testDir := "testdata/TestResPolicyImage/regular_policy_update_staging" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -354,7 +372,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("auto policy create and later activate on production, cannot delete", func(t *testing.T) { - testDir := "testdata/TestResPolicy/auto_policy" + testDir := "testdata/TestResPolicyImage/auto_policy" client := new(mockimaging) expectUpsertPolicy(t, client, ".auto", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -394,8 +412,70 @@ func TestResourcePolicy(t *testing.T) { }) client.AssertExpectations(t) }) + t.Run("update rollout duration and ensure no diff", func(t *testing.T) { + testDir := "testdata/TestResPolicyImage/regular_policy_update_rollout_duration" + + policyInputWithRollout := imaging.PolicyInputImage{ + RolloutDuration: tools.IntPtr(3600), + Breakpoints: &imaging.Breakpoints{ + Widths: []int{320, 640, 1024, 2048, 5000}, + }, + Output: &imaging.OutputImage{ + PerceptualQuality: &imaging.OutputImagePerceptualQualityVariableInline{ + Value: imaging.OutputImagePerceptualQualityPtr(imaging.OutputImagePerceptualQualityMediumHigh), + }, + }, + Transformations: []imaging.TransformationType{ + &imaging.MaxColors{ + Colors: &imaging.IntegerVariableInline{ + Value: tools.IntPtr(2), + }, + Transformation: imaging.MaxColorsTransformationMaxColors, + }, + }, + } + + client := new(mockimaging) + expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + + expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputWithRollout) + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + + expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") + expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: loadFixtureString(fmt.Sprintf("%s/policy_create.tf", testDir)), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "false", + policyPath: fmt.Sprintf("%s/policy/policy_create.json", testDir), + }), + }, + { + Config: loadFixtureString(fmt.Sprintf("%s/policy_update.tf", testDir)), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "false", + policyPath: fmt.Sprintf("%s/policy/policy_update.json", testDir), + }), + }, + }, + }) + }) + client.AssertExpectations(t) + }) t.Run("import policy with activate_on_production=true", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -430,7 +510,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("import policy with activate_on_production=false", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" policyOutputV2 := getPolicyOutputV2(policyOutput) client := new(mockimaging) @@ -461,7 +541,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("import policy with activate_on_production=false and no policy on production", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -495,8 +575,55 @@ func TestResourcePolicy(t *testing.T) { }) client.AssertExpectations(t) }) + t.Run("import policy with activate_on_production=false and no policy on production with rolloutDuration", func(t *testing.T) { + testDir := "testdata/TestResPolicyImage/regular_policy_import" + + policyInput := policyInput + policyInput.RolloutDuration = tools.IntPtr(3600) + + client := new(mockimaging) + expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ + PolicyID: "test_policy", + Network: imaging.PolicyNetworkProduction, + ContractID: "test_contract", + PolicySetID: "test_policy_set", + }).Return(nil, fmt.Errorf("%s: %w", imaging.ErrGetPolicy, &imaging.Error{Status: http.StatusNotFound})).Once() + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + + expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") + expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: loadFixtureString(fmt.Sprintf("%s/policy_create.tf", testDir)), + }, + { + ImportState: true, + ImportStateId: "test_policy:test_policy_set:test_contract", + ResourceName: "akamai_imaging_policy_image.policy", + // Current implementation is unable to handle correctly `rolloutDuration` during import. + // It is recommended to not provide any value for that field before import. + // `cli-terraform` will not set this field during export, assuming that it service will required default value. + //ImportStateVerify: true, + }, + { + Config: loadFixtureString(fmt.Sprintf("%s/policy_create.tf", testDir)), + PlanOnly: true, + }, + }, + }) + }) + client.AssertExpectations(t) + }) t.Run("policy with invalid policy structure", func(t *testing.T) { - testDir := "testdata/TestResPolicy/invalid_policy" + testDir := "testdata/TestResPolicyImage/invalid_policy" client := new(mockimaging) useClient(client, func() { @@ -513,7 +640,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("policy with inconsistent policy structure", func(t *testing.T) { - testDir := "testdata/TestResPolicy/inconsistent_policy" + testDir := "testdata/TestResPolicyImage/inconsistent_policy" client := new(mockimaging) useClient(client, func() { @@ -530,7 +657,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("error when creating policy", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) var withError = imaging.Error{ @@ -557,7 +684,7 @@ func TestResourcePolicy(t *testing.T) { client.AssertExpectations(t) }) t.Run("invalid import id", func(t *testing.T) { - testDir := "testdata/TestResPolicy/regular_policy" + testDir := "testdata/TestResPolicyImage/regular_policy" client := new(mockimaging) expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) @@ -614,8 +741,26 @@ func getPolicyInputV2(policyInput imaging.PolicyInputImage) imaging.PolicyInputI return policyInputV2 } +func getPolicyOutputOrderV2(policyOutput imaging.PolicyOutputImage) imaging.PolicyOutputImage { + var policyOutputV2 = policyOutput + policyOutputV2.Transformations = []imaging.TransformationType{ + &imaging.Blur{ + Sigma: &imaging.NumberVariableInline{Value: tools.Float64Ptr(5)}, + Transformation: imaging.BlurTransformationBlur, + }, + &imaging.MaxColors{ + Colors: &imaging.IntegerVariableInline{ + Value: tools.IntPtr(4), + }, + Transformation: imaging.MaxColorsTransformationMaxColors, + }, + } + policyOutputV2.Version = 2 + return policyOutputV2 +} + func TestDiffSuppressPolicy(t *testing.T) { - basePath := "testdata/TestResPolicy/diff_suppress" + basePath := "testdata/TestResPolicyImage/diff_suppress" tests := map[string]struct { oldPath, newPath string expected bool diff --git a/pkg/providers/imaging/akamai_imaging_policy_video.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go similarity index 91% rename from pkg/providers/imaging/akamai_imaging_policy_video.go rename to pkg/providers/imaging/resource_akamai_imaging_policy_video.go index 2a8b07e0e..c6f85bc6e 100644 --- a/pkg/providers/imaging/akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go @@ -100,11 +100,12 @@ func upsertPolicyVideo(ctx context.Context, d *schema.ResourceData, m interface{ if err != nil { return diag.FromErr(err) } + + var policy imaging.PolicyInputVideo policyJSON, err := tools.GetStringValue("json", d) if err != nil { return diag.FromErr(err) } - var policy imaging.PolicyInputVideo if err = json.Unmarshal([]byte(policyJSON), &policy); err != nil { return diag.FromErr(err) } @@ -172,14 +173,24 @@ func resourcePolicyVideoRead(ctx context.Context, d *schema.ResourceData, m inte if err != nil { return diag.FromErr(err) } - policyJSON, err := getPolicyVideoJSON(policy) + policyInput, err := repackPolicyVideoOutputToInput(policy) + if err != nil { + return diag.FromErr(err) + } + + policyInput.RolloutDuration, err = getRolloutDuration(d) + if err != nil { + return diag.FromErr(err) + } + + policyJSON, err := getPolicyVideoJSON(policyInput) if err != nil { return diag.FromErr(err) } attrs := make(map[string]interface{}) - attrs["version"] = policy.Version attrs["json"] = policyJSON + attrs["version"] = policy.Version if err := tools.SetAttrs(d, attrs); err != nil { return diag.FromErr(err) } @@ -187,6 +198,19 @@ func resourcePolicyVideoRead(ctx context.Context, d *schema.ResourceData, m inte return nil } +func repackPolicyVideoOutputToInput(policy *imaging.PolicyOutputVideo) (*imaging.PolicyInputVideo, error) { + policyOutputJSON, err := json.Marshal(policy) + if err != nil { + return nil, err + } + policyInput := imaging.PolicyInputVideo{} + err = json.Unmarshal(policyOutputJSON, &policyInput) + if err != nil { + return nil, err + } + return &policyInput, nil +} + func getPolicyVideo(ctx context.Context, client imaging.Imaging, policyID, contractID, policySetID string, network imaging.PolicyNetwork) (*imaging.PolicyOutputVideo, error) { policyRequest := imaging.GetPolicyRequest{ PolicyID: policyID, @@ -206,23 +230,11 @@ func getPolicyVideo(ctx context.Context, client imaging.Imaging, policyID, contr return policy, nil } -func getPolicyVideoJSON(policy *imaging.PolicyOutputVideo) (string, error) { +func getPolicyVideoJSON(policy *imaging.PolicyInputVideo) (string, error) { policyJSON, err := json.MarshalIndent(policy, "", " ") if err != nil { return "", err } - - // we store JSON as PolicyInput, so we need to convert it from PolicyOutput via JSON representation - var policyInput imaging.PolicyInputVideo - if err := json.Unmarshal(policyJSON, &policyInput); err != nil { - return "", err - } - - policyJSON, err = json.MarshalIndent(policyInput, "", " ") - if err != nil { - return "", err - } - return string(policyJSON), nil } @@ -320,7 +332,11 @@ func resourcePolicyVideoImport(ctx context.Context, d *schema.ResourceData, m in if err != nil { return nil, err } - policyStagingJSON, err := getPolicyVideoJSON(policyStaging) + policyInput, err := repackPolicyVideoOutputToInput(policyStaging) + if err != nil { + return nil, err + } + policyStagingJSON, err := getPolicyVideoJSON(policyInput) if err != nil { return nil, err } @@ -333,7 +349,11 @@ func resourcePolicyVideoImport(ctx context.Context, d *schema.ResourceData, m in return nil, err } } else { - policyProductionJSON, err := getPolicyVideoJSON(policyProduction) + policyInput, err := repackPolicyVideoOutputToInput(policyProduction) + if err != nil { + return nil, err + } + policyProductionJSON, err := getPolicyVideoJSON(policyInput) if err != nil { return nil, err } diff --git a/pkg/providers/imaging/akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go similarity index 97% rename from pkg/providers/imaging/akamai_imaging_policy_video_test.go rename to pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 10727a3ad..34ed9690c 100644 --- a/pkg/providers/imaging/akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/imaging" + "github.com/akamai/terraform-provider-akamai/v2/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -20,6 +21,8 @@ func TestResourcePolicyVideo(t *testing.T) { policyID string policySetID string activateOnProduction string + schema bool + emptyPolicy bool } var ( @@ -43,7 +46,7 @@ func TestResourcePolicyVideo(t *testing.T) { }, }, Version: 1, - Video: true, + Video: tools.BoolPtr(true), } expectUpsertPolicy = func(_ *testing.T, client *mockimaging, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput) { @@ -95,15 +98,31 @@ func TestResourcePolicyVideo(t *testing.T) { if attrs.policyPath != "" { policyJSON = loadFixtureString(attrs.policyPath) } - return resource.ComposeAggregateTestCheckFunc( + f := resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "id", fmt.Sprintf("%s:%s", attrs.policySetID, attrs.policyID)), resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "policy_id", attrs.policyID), resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "policyset_id", attrs.policySetID), resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "contract_id", "test_contract"), resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "version", attrs.version), - resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "json", policyJSON), resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "activate_on_production", attrs.activateOnProduction), ) + if attrs.schema { + if attrs.emptyPolicy { + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "policy.#", "1"), + ) + } + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "policy.#", "1"), + resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "policy.0.output.0.perceptual_quality", "mediumHigh"), + ) + } + return resource.ComposeAggregateTestCheckFunc( + f, + resource.TestCheckResourceAttr("akamai_imaging_policy_video.policy", "json", policyJSON), + ) } ) diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/expected.json new file mode 100644 index 000000000..6067e9b2b --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/expected.json @@ -0,0 +1,37 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + }, + "postBreakpointTransformations": [ + { + "gravity": "NorthWest", + "image": { + "fill": "#000000", + "size": 72, + "stroke": "#FFFFFF", + "strokeSize": 0, + "text": "test", + "type": "Text" + }, + "placement": "Over", + "transformation": "Composite", + "xPosition": 0, + "yPosition": 0 + } + ], + "transformations": [ + { + "colors": 0, + "transformation": "MaxColors" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf new file mode 100644 index 000000000..f03af05f1 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf @@ -0,0 +1,42 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy { + breakpoints { + widths = [ + 320, + 640, + 1024, + 2048, + 5000 + ] + } + output { + perceptual_quality = "mediumHigh" + } + post_breakpoint_transformations { + composite { + gravity = "NorthWest" + image { + text_image { + fill = "#000000" + size = 72 + stroke = "#FFFFFF" + stroke_size = 0 + text = "test" + } + } + placement = "Over" + x_position = 0 + y_position = 0 + } + } + transformations { + max_colors { + colors = 0 + } + } + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/expected.json new file mode 100644 index 000000000..f158078e3 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/expected.json @@ -0,0 +1,3 @@ +{ + "breakpoints": {} +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf new file mode 100644 index 000000000..069004176 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf @@ -0,0 +1,9 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy { + breakpoints {} + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/expected.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/expected.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf new file mode 100644 index 000000000..f94444085 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf @@ -0,0 +1,7 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy {} +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/expected.json new file mode 100644 index 000000000..ab95f4cf9 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/expected.json @@ -0,0 +1,37 @@ +{ + "breakpoints": { + "widths": [ + 280, + 1080 + ] + }, + "hosts": [ + "host1", + "host2" + ], + "output": { + "adaptiveQuality": 50, + "perceptualQuality": "mediumHigh" + }, + "rolloutDuration": 3600, + "transformations": [ + { + "allowedTransformations": [ + "Append", + "Blur", + "Crop" + ], + "query": { + "var": "imq" + }, + "transformation": "ImQuery" + } + ], + "variables": [ + { + "defaultValue": "", + "name": "imq", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf new file mode 100644 index 000000000..ee2f7b148 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf @@ -0,0 +1,27 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy { + breakpoints { + widths = [280, 1080] + } + hosts = ["host1", "host2"] + output { + adaptive_quality = 50 + perceptual_quality = "mediumHigh" + } + transformations { + im_query { + allowed_transformations = ["Append", "Blur", "Crop"] + query_var = "imq" + } + } + variables { + default_value = "" + name = "imq" + type = "string" + } + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/expected.json new file mode 100644 index 000000000..49ffd64c4 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/expected.json @@ -0,0 +1,110 @@ +{ + "breakpoints": { + "widths": [ + 280, + 1080 + ] + }, + "hosts": [ + "host1", + "host2" + ], + "output": { + "adaptiveQuality": 50, + "perceptualQuality": "mediumHigh" + }, + "transformations": [ + { + "gravity": "Center", + "height": 8, + "regionOfInterest": { + "anchor": { + "x": 4, + "y": 5 + }, + "height": 9, + "width": 8 + }, + "style": "fill", + "transformation": "RegionOfInterestCrop", + "width": 7 + }, + { + "gravity": "Center", + "gravityPriority": "horizontal", + "image": { + "fill": "#000000", + "size": 72, + "stroke": "#FFFFFF", + "strokeSize": 0, + "text": "test", + "type": "Text" + }, + "preserveMinorDimension": true, + "transformation": "Append" + }, + { + "fuzz": 0.08, + "padding": 0, + "transformation": "Trim" + }, + { + "default": { + "aspect": "fit", + "height": { + "var": "ResizeDim" + }, + "transformation": "Resize", + "type": "normal", + "width": { + "var": "ResizeDim" + } + }, + "dimension": "height", + "lessThan": { + "allowExpansion": true, + "gravity": "Center", + "height": { + "var": "ResizeDim" + }, + "transformation": "Crop", + "width": { + "var": "ResizeDim" + }, + "xPosition": 0, + "yPosition": 0 + }, + "transformation": "IfDimension", + "value": { + "var": "MinDim" + } + } + ], + "variables": [ + { + "defaultValue": "280", + "name": "ResizeDim", + "type": "number" + }, + { + "defaultValue": "260", + "name": "ResizeDimWithBorder", + "type": "number" + }, + { + "defaultValue": "1000", + "name": "MinDim", + "type": "number" + }, + { + "defaultValue": "1450", + "name": "MinDimNew", + "type": "number" + }, + { + "defaultValue": "1500", + "name": "MaxDimOld", + "type": "number" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf new file mode 100644 index 000000000..161c7f8a0 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf @@ -0,0 +1,105 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy { + breakpoints { + widths = [280, 1080] + } + hosts = ["host1", "host2"] + output { + adaptive_quality = 50 + perceptual_quality = "mediumHigh" + } + transformations { + region_of_interest_crop { + gravity = "Center" + height = 8 + region_of_interest { + rectangle_shape { + anchor { + x = 4 + y = 5 + } + height = 9 + width = 8 + } + } + style = "fill" + width = 7 + } + } + transformations { + append { + gravity = "Center" + gravity_priority = "horizontal" + image { + text_image { + fill = "#000000" + size = 72 + stroke = "#FFFFFF" + stroke_size = 0 + text = "test" + } + } + preserve_minor_dimension = true + } + } + transformations { + trim { + fuzz = 0.08 + padding = 0 + } + } + transformations { + if_dimension { + default { + resize { + aspect = "fit" + height_var = "ResizeDim" + type = "normal" + width_var = "ResizeDim" + } + } + dimension = "height" + less_than { + crop { + allow_expansion = true + gravity = "Center" + height_var = "ResizeDim" + width_var = "ResizeDim" + x_position = 0 + y_position = 0 + } + } + value_var = "MinDim" + } + } + variables { + default_value = "280" + name = "ResizeDim" + type = "number" + } + variables { + default_value = "260" + name = "ResizeDimWithBorder" + type = "number" + } + variables { + default_value = "1000" + name = "MinDim" + type = "number" + } + variables { + default_value = "1450" + name = "MinDimNew" + type = "number" + } + variables { + default_value = "1500" + name = "MaxDimOld" + type = "number" + } + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/expected.json new file mode 100644 index 000000000..cc68dcd42 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/expected.json @@ -0,0 +1,20 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + }, + "transformations": [ + { + "colors": 0, + "transformation": "MaxColors" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf new file mode 100644 index 000000000..e78c4d325 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf @@ -0,0 +1,25 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_image" "policy" { + policy { + breakpoints { + widths = [ + 320, + 640, + 1024, + 2048, + 5000 + ] + } + output { + perceptual_quality = "mediumHigh" + } + transformations { + max_colors { + colors = 0 + } + } + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/expected.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/expected.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf new file mode 100644 index 000000000..998580666 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf @@ -0,0 +1,8 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_video" "policy" { + policy { + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/expected.json b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/expected.json new file mode 100644 index 000000000..ae03f4de3 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/expected.json @@ -0,0 +1,14 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf new file mode 100644 index 000000000..bc975d410 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf @@ -0,0 +1,20 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +data "akamai_imaging_policy_video" "policy" { + policy { + breakpoints { + widths = [ + 320, + 640, + 1024, + 2048, + 5000 + ] + } + output { + perceptual_quality = "mediumHigh" + } + } +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_create.tf deleted file mode 100644 index 49ada8fd5..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = ".auto" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_update.tf deleted file mode 100644 index b7d52b591..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy_update.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = ".auto" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_create.tf deleted file mode 100644 index 3a2f70824..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_update.tf deleted file mode 100644 index 89f26d17e..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy_update.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set_update" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/inconsistent_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/inconsistent_policy/policy_create.tf deleted file mode 100644 index 9430d609e..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/inconsistent_policy/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors3" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_create.tf deleted file mode 100644 index 3a2f70824..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_update.tf deleted file mode 100644 index e475817a7..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy_update.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_create.tf deleted file mode 100644 index e475817a7..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_create.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_update.tf deleted file mode 100644 index 9332ed588..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy_update.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 3, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_create.tf deleted file mode 100644 index 3a2f70824..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_update.tf deleted file mode 100644 index e475817a7..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy_update.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_create.tf deleted file mode 100644 index 3a2f70824..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_create.tf +++ /dev/null @@ -1,31 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update.tf deleted file mode 100644 index e475817a7..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 2, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update_staging.tf b/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update_staging.tf deleted file mode 100644 index 984463724..000000000 --- a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy_update_staging.tf +++ /dev/null @@ -1,32 +0,0 @@ -provider "akamai" { - edgerc = "~/.edgerc" -} - -resource "akamai_imaging_policy_image" "policy" { - policy_id = "test_policy" - contract_id = "test_contract" - policyset_id = "test_policy_set" - activate_on_production = false - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 - ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ - { - "colors": 3, - "transformation": "MaxColors" - } - ] -} -EOF -} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy/policy_update.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/auto_policy/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy/policy_update.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf new file mode 100644 index 000000000..c085ac113 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = ".auto" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf new file mode 100644 index 000000000..0bcfda8f3 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = ".auto" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy/policy_update.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/change_policyset_id/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy/policy_update.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf new file mode 100644 index 000000000..8a1937c42 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf new file mode 100644 index 000000000..5ae732ae5 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set_update" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/different_format.json b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/different_format.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/different_format.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/different_format.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/invalid.json b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/invalid.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/invalid.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/invalid.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/policy.json b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/policy.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/diff_suppress/policy.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/policy.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf new file mode 100644 index 000000000..de4576246 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors3" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/invalid_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf similarity index 94% rename from pkg/providers/imaging/testdata/TestResPolicy/invalid_policy/policy_create.tf rename to pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf index 6ac7a3e19..a0b88d864 100644 --- a/pkg/providers/imaging/testdata/TestResPolicy/invalid_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy/policy_update.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy/policy_update.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf new file mode 100644 index 000000000..8a1937c42 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf new file mode 100644 index 000000000..2ec31a319 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy/policy_update.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_activate_same_time/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy/policy_update.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf new file mode 100644 index 000000000..2ec31a319 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf new file mode 100644 index 000000000..b642b4e93 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 3, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy/policy_create.json new file mode 100644 index 000000000..da821541e --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy/policy_create.json @@ -0,0 +1,21 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + }, + "rolloutDuration": 3600, + "transformations": [ + { + "colors": 2, + "transformation": "MaxColors" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf new file mode 100644 index 000000000..045c760c3 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf @@ -0,0 +1,31 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = false + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "rolloutDuration" : 3600, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy/policy_update.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_no_update/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy/policy_update.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf new file mode 100644 index 000000000..8a1937c42 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf new file mode 100644 index 000000000..2ec31a319 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_create.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_create.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy/policy_update.json new file mode 100644 index 000000000..da821541e --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy/policy_update.json @@ -0,0 +1,21 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + }, + "rolloutDuration": 3600, + "transformations": [ + { + "colors": 2, + "transformation": "MaxColors" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf new file mode 100644 index 000000000..407ea2c1c --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf new file mode 100644 index 000000000..1edbea213 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "~/.edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "rolloutDuration" : 3600, + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_create.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_update.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_create.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_update.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_update.json new file mode 100644 index 000000000..5810b57ca --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_update.json @@ -0,0 +1,20 @@ +{ + "breakpoints": { + "widths": [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output": { + "perceptualQuality": "mediumHigh" + }, + "transformations": [ + { + "colors": 2, + "transformation": "MaxColors" + } + ] +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_update_staging.json b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_update_staging.json similarity index 100% rename from pkg/providers/imaging/testdata/TestResPolicy/regular_policy_update_staging/policy/policy_update_staging.json rename to pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy/policy_update_staging.json diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf new file mode 100644 index 000000000..8a1937c42 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf @@ -0,0 +1,29 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf new file mode 100644 index 000000000..2ec31a319 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = true + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 2, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf new file mode 100644 index 000000000..285745a08 --- /dev/null +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf @@ -0,0 +1,30 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_imaging_policy_image" "policy" { + policy_id = "test_policy" + contract_id = "test_contract" + policyset_id = "test_policy_set" + activate_on_production = false + json = jsonencode({ + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 + ] + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ + { + "colors" : 3, + "transformation" : "MaxColors" + } + ] + }) +} \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf index fb7627b39..c9eef123b 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf index bc8681afd..611aeada3 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf index f9d9198d7..70d837606 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = ".auto" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf index e4fc83d17..4b2aedc5e 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf index 19484ca53..e003eb233 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf index a8fb07011..bd6aeac2f 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set_update" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf index 688816c58..ff9b87765 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf @@ -1,31 +1,30 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - }, - "transformations": [ + }, + "output" : { + "perceptualQuality" : "mediumHigh" + }, + "transformations" : [ { - "colors": 2, - "transformation": "MaxColors" + "colors" : 2, + "transformation" : "MaxColors" } - ] -} -EOF + ] + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf index c4e01b71d..18c707378 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf index 19484ca53..e003eb233 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf index c427dd125..92d047fe7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf index c427dd125..92d047fe7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf index 8e5aab146..44916a0a1 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "medium" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "medium" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf index 19484ca53..e003eb233 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf index c427dd125..92d047fe7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf index 19484ca53..e003eb233 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf @@ -1,25 +1,24 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { policy_id = "test_policy" contract_id = "test_contract" policyset_id = "test_policy_set" - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf index c427dd125..92d047fe7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = true - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "mediumHigh" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "mediumHigh" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf index 135576d2f..303520090 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_imaging_policy_video" "policy" { @@ -7,20 +7,19 @@ resource "akamai_imaging_policy_video" "policy" { contract_id = "test_contract" policyset_id = "test_policy_set" activate_on_production = false - json = <<-EOF -{ - "breakpoints": { - "widths": [ - 320, - 640, - 1024, - 2048, - 5000 + json = jsonencode( + { + "breakpoints" : { + "widths" : [ + 320, + 640, + 1024, + 2048, + 5000 ] - }, - "output": { - "perceptualQuality": "medium" - } -} -EOF + }, + "output" : { + "perceptualQuality" : "medium" + } + }) } \ No newline at end of file diff --git a/pkg/providers/imaging/validators.go b/pkg/providers/imaging/validators.go new file mode 100644 index 000000000..3f5b88d0f --- /dev/null +++ b/pkg/providers/imaging/validators.go @@ -0,0 +1,62 @@ +package imaging + +import ( + "strconv" + + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func stringAsIntBetween(lowerLimitRaw, upperLimitRaw interface{}) schema.SchemaValidateDiagFunc { + return func(i interface{}, path cty.Path) diag.Diagnostics { + value, err := strconv.Atoi(i.(string)) + if err != nil { + return diag.Errorf("incorrect attribute value type: expect int") + } + + if lowerLimitRaw != nil { + lowerLimit := lowerLimitRaw.(int) + if value < lowerLimit { + return diag.Errorf("provided value %d must be at least %d", value, lowerLimit) + } + } + + if upperLimitRaw != nil { + upperLimit := upperLimitRaw.(int) + if value > upperLimit { + return diag.Errorf("provided value %d must be at most %d", value, upperLimit) + } + } + return nil + } +} + +func validateIsTypeFloat() schema.SchemaValidateDiagFunc { + return func(i interface{}, path cty.Path) diag.Diagnostics { + if _, err := strconv.ParseFloat(i.(string), 64); err != nil { + return diag.Errorf("incorrect attribute value type: expect float64") + } + return nil + } +} + +func validateIsTypeInt() schema.SchemaValidateDiagFunc { + return func(i interface{}, path cty.Path) diag.Diagnostics { + _, err := strconv.Atoi(i.(string)) + if err != nil { + return diag.Errorf("incorrect attribute value type: expect int") + } + return nil + } +} + +func validateIsTypeBool() schema.SchemaValidateDiagFunc { + return func(i interface{}, path cty.Path) diag.Diagnostics { + value := i.(string) + if value != "false" && value != "true" { + return diag.Errorf("incorrect attribute value type: expect boolean") + } + return nil + } +} diff --git a/pkg/providers/imaging/videowriter/convert-video.gen.go b/pkg/providers/imaging/videowriter/convert-video.gen.go new file mode 100644 index 000000000..6784afe70 --- /dev/null +++ b/pkg/providers/imaging/videowriter/convert-video.gen.go @@ -0,0 +1,254 @@ +package videowriter + +import ( + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v2/pkg/tools" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +// PolicyVideoToEdgeGrid converts terraform originated map structure into EdgeGrid structure +func PolicyVideoToEdgeGrid(d *schema.ResourceData, key string) imaging.PolicyInputVideo { + _, exist := extract(d, key) + var result imaging.PolicyInputVideo + if exist { + result = imaging.PolicyInputVideo{} + result.Breakpoints = getBreakpoints(d, getKey(key, 0, "breakpoints")) + result.Hosts = interfaceSliceToStringSlice(d, getKey(key, 0, "hosts")) + result.Output = getOutputVideo(d, getKey(key, 0, "output")) + result.RolloutDuration = intReaderPtr(d, getKey(key, 0, "rollout_duration")) + result.Variables = getVariableList(d, getKey(key, 0, "variables")) + } + + return result +} + +func getBreakpoints(d *schema.ResourceData, key string) *imaging.Breakpoints { + _, exist := extract(d, key) + if exist { + result := imaging.Breakpoints{ + Widths: interfaceSliceToIntSlice(d, getKey(key, 0, "widths")), + } + return &result + } + return nil +} + +func getEnumOptionsList(d *schema.ResourceData, key string) []*imaging.EnumOptions { + collection, exist := extract(d, key) + if exist { + result := make([]*imaging.EnumOptions, 0) + for idx := range collection.([]interface{}) { + elem := imaging.EnumOptions{ + ID: stringReader(d, getKey(key, idx, "id")), + Value: stringReader(d, getKey(key, idx, "value")), + } + result = append(result, &elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func getOutputVideo(d *schema.ResourceData, key string) *imaging.OutputVideo { + _, exist := extract(d, key) + if exist { + result := imaging.OutputVideo{ + PerceptualQuality: outputVideoPerceptualQualityVariableInline(d, getKey(key, 0, "perceptual_quality")), + PlaceholderVideoURL: stringVariableInline(d, getKey(key, 0, "placeholder_video_url")), + VideoAdaptiveQuality: outputVideoVideoAdaptiveQualityVariableInline(d, getKey(key, 0, "video_adaptive_quality")), + } + return &result + } + return nil +} + +func getVariableList(d *schema.ResourceData, key string) []imaging.Variable { + collection, exist := extract(d, key) + if exist { + result := make([]imaging.Variable, 0) + for idx := range collection.([]interface{}) { + elem := imaging.Variable{ + DefaultValue: stringReader(d, getKey(key, idx, "default_value")), + EnumOptions: getEnumOptionsList(d, getKey(key, idx, "enum_options")), + Name: stringReader(d, getKey(key, idx, "name")), + Postfix: stringReaderPtr(d, getKey(key, idx, "postfix")), + Prefix: stringReaderPtr(d, getKey(key, idx, "prefix")), + Type: imaging.VariableType(stringReader(d, getKey(key, idx, "type"))), + } + result = append(result, elem) + } + if len(result) > 0 { + return result + } + return nil + } + return nil +} + +func outputVideoPerceptualQualityVariableInline(d *schema.ResourceData, key string) *imaging.OutputVideoPerceptualQualityVariableInline { + var value *imaging.OutputVideoPerceptualQuality + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.OutputVideoPerceptualQualityPtr(imaging.OutputVideoPerceptualQuality(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.OutputVideoPerceptualQualityVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func outputVideoVideoAdaptiveQualityVariableInline(d *schema.ResourceData, key string) *imaging.OutputVideoVideoAdaptiveQualityVariableInline { + var value *imaging.OutputVideoVideoAdaptiveQuality + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + value = imaging.OutputVideoVideoAdaptiveQualityPtr(imaging.OutputVideoVideoAdaptiveQuality(valueRaw.(string))) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.OutputVideoVideoAdaptiveQualityVariableInline{ + Name: name, + Value: value, + } + } + + return nil +} + +func stringVariableInline(d *schema.ResourceData, key string) *imaging.StringVariableInline { + var value *string + var name *string + + valueRaw, existVal := extract(d, key) + existVal = existVal && valueRaw.(string) != "" + if existVal { + valueMapped := valueRaw.(string) + value = tools.StringPtr(valueMapped) + } + + nameRaw, existVar := extract(d, key+"_var") + existVar = existVar && nameRaw.(string) != "" + if existVar { + name = tools.StringPtr(nameRaw.(string)) + } + + if existVal || existVar { + return &imaging.StringVariableInline{ + Name: name, + Value: value, + } + } + return nil +} + +func intReader(d *schema.ResourceData, key string) int { + value, exist := extract(d, key) + if exist { + valInt, _ := strconv.Atoi(value.(string)) + return valInt + } + return 0 +} + +func intReaderPtr(d *schema.ResourceData, key string) *int { + value, exist := extract(d, key) + if exist { + if valInt, err := strconv.Atoi(value.(string)); err == nil { + return &valInt + } + } + return nil +} + +func stringReader(d *schema.ResourceData, key string) string { + value, exist := extract(d, key) + if exist { + return value.(string) + } + return "" +} + +func stringReaderPtr(d *schema.ResourceData, key string) *string { + value, exist := extract(d, key) + if exist { + return tools.StringPtr(value.(string)) + } + return nil +} + +func interfaceSliceToIntSlice(d *schema.ResourceData, key string) []int { + list, exist := extract(d, key) + if exist { + l := list.([]interface{}) + if len(l) > 0 { + result := make([]int, len(l)) + for i, v := range l { + result[i] = v.(int) + } + return result + } + } + return nil +} + +func interfaceSliceToStringSlice(d *schema.ResourceData, key string) []string { + list, exist := extract(d, key) + if exist { + l := list.([]interface{}) + if len(l) > 0 { + result := make([]string, len(l)) + for i, v := range l { + result[i] = v.(string) + } + return result + } + } + return nil +} + +func extract(d *schema.ResourceData, key string) (interface{}, bool) { + return d.GetOk(key) +} + +func decorateKeyForSlice(key string) string { + address := strings.Split(key, ".") + matches, _ := regexp.MatchString("[0-9]+", address[len(address)-1]) + if !matches { + return key + ".0" + } + return key +} + +func getKey(rootKey string, elementIndex int, elementName string) string { + return fmt.Sprintf("%s.%d.%s", rootKey, elementIndex, elementName) +} diff --git a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf index 6bc860501..b49dbe332 100644 --- a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_networklist_network_lists" "test" { diff --git a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf index fd3952c27..133da0560 100644 --- a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf +++ b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_networklist_network_lists" "test" { diff --git a/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf b/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf index 57a55990d..c10918e01 100644 --- a/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_activations" "test" { diff --git a/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf b/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf index 2558d0984..1bc34de3a 100644 --- a/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_activations" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf index 24d7c4a4e..8f6e0a932 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf index d020ddda3..4f2a50ab4 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf index 90dfa3337..8339d3c1e 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_description" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf index d88b0a896..5edf4bc5f 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_networklist_subscription" "test" { diff --git a/pkg/providers/property/resource_akamai_property.go b/pkg/providers/property/resource_akamai_property.go index dec8f811c..d03de1797 100644 --- a/pkg/providers/property/resource_akamai_property.go +++ b/pkg/providers/property/resource_akamai_property.go @@ -686,7 +686,7 @@ func resourcePropertyRead(ctx context.Context, d *schema.ResourceData, m interfa "rules": string(RulesJSON), "rule_format": RuleFormat, "rule_errors": papiErrorsToList(RuleErrors), - "read_version": v, + "read_version": ReadVersionID, } if Property.ProductID != "" { attrs["product_id"] = Property.ProductID diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index bf08ff426..16c05dbd4 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -266,7 +266,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusDeactivated, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), AdvanceVersion("prp_0", 1, 2), @@ -308,7 +307,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusDeactivated), SetHostnames("prp_0", 1, "to.test.domain"), AdvanceVersion("prp_0", 1, 2), @@ -350,7 +348,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusActive, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), AdvanceVersion("prp_0", 1, 2), @@ -392,7 +389,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusActive), SetHostnames("prp_0", 1, "to.test.domain"), AdvanceVersion("prp_0", 1, 2), @@ -434,7 +430,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), SetHostnames("prp_0", 1, "to2.test.domain"), @@ -458,13 +453,47 @@ func TestResProperty(t *testing.T) { }, } + // This scenario simulates a new version being created outside of terraform and returned on read after the first step (update should be triggered) + ChangesMadeOutsideOfTerraform := LifecycleTestCase{ + Name: "Latest version not active", + ClientSetup: ComposeBehaviors( + PropertyLifecycle("test_property", "prp_0", "grp_0", + papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), + GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), + SetHostnames("prp_0", 1, "to.test.domain"), + GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 2, papi.VersionStatusInactive, papi.VersionStatusInactive), + GetVersionResources("prp_0", "ctr_0", "grp_0", 2), + SetHostnames("prp_0", 2, "to.test.domain"), + ), + Steps: func(State *TestState, FixturePath string) []resource.TestStep { + return []resource.TestStep{ + { + PreConfig: func() { + State.VersionItems = papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{{PropertyVersion: 1, ProductionStatus: papi.VersionStatusInactive}}} + }, + Config: loadFixtureString("%s/step0.tf", FixturePath), + Check: CheckAttrs("prp_0", "to.test.domain", "1", "0", "0", "ehn_123", + "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), + }, + { + PreConfig: func() { + State.Property.LatestVersion = 2 + State.Hostnames[0].CnameTo = "changed.test.domain" + }, + Config: loadFixtureString("%s/step0.tf", FixturePath), + Check: CheckAttrs("prp_0", "to.test.domain", "2", "0", "0", "ehn_123", + "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), + }, + } + }, + } + // Standard test behavior for cases where the property's latest version is active in staging network NoDiff := LifecycleTestCase{ Name: "No diff found in update", ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Children: []papi.Rules{{Name: "Default CORS Policy", CriteriaMustSatisfy: papi.RuleCriteriaMustSatisfyAll}}}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), UpdateRuleTree("prp_0", "ctr_0", "grp_0", 1, @@ -501,7 +530,6 @@ func TestResProperty(t *testing.T) { papi.RulesUpdate{Rules: papi.Rules{Behaviors: []papi.RuleBehavior{{Name: "caching", Options: papi.RuleOptionsMap{"behavior": "MAX_AGE", "mustRevalidate": false, "ttl": "12d"}}}, Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), UpdateRuleTree("prp_0", "ctr_0", "grp_0", 1, @@ -537,7 +565,6 @@ func TestResProperty(t *testing.T) { ClientSetup: ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Children: []papi.Rules{{Name: "Default CORS Policy", CriteriaMustSatisfy: papi.RuleCriteriaMustSatisfyAll}}}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), SetTwoHostnames("prp_0", 1, "from1.test.domain", "to1.test.domain", "from2.test.domain", "to2.test.domain"), UpdateRuleTree("prp_0", "ctr_0", "grp_0", 1, @@ -570,14 +597,12 @@ func TestResProperty(t *testing.T) { fixtureName := strings.ReplaceAll(flaw, " ", "_") return func(t *testing.T) { - t.Run(flaw, func(t *testing.T) { - resource.UnitTest(t, resource.TestCase{ - Providers: testAccProviders, - Steps: []resource.TestStep{{ - Config: loadFixtureString("testdata/TestResProperty/ConfigError/%s.tf", fixtureName), - ExpectError: regexp.MustCompile(rx), - }}, - }) + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{{ + Config: loadFixtureString("testdata/TestResProperty/ConfigError/%s.tf", fixtureName), + ExpectError: regexp.MustCompile(rx), + }}, }) } } @@ -586,13 +611,10 @@ func TestResProperty(t *testing.T) { // Run a test case to verify schema attribute deprecation AssertDeprecated := func(t *testing.T, attribute string) func(t *testing.T) { - return func(t *testing.T) { - t.Run(fmt.Sprintf("%s attribute is deprecated", attribute), func(t *testing.T) { - if resourceProperty().Schema[attribute].Deprecated == "" { - t.Fatalf(`%q attribute is not marked deprecated`, attribute) - } - }) + if resourceProperty().Schema[attribute].Deprecated == "" { + t.Fatalf(`%q attribute is not marked deprecated`, attribute) + } } } @@ -604,22 +626,20 @@ func TestResProperty(t *testing.T) { fixtureName = strings.ReplaceAll(fixtureName, " ", "_") return func(t *testing.T) { - t.Run(fmt.Sprintf("ForbiddenAttr/%s", fixtureName), func(t *testing.T) { - client := &mockpapi{} - client.Test(T{t}) - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - Providers: testAccProviders, - Steps: []resource.TestStep{{ - Config: loadFixtureString("testdata/TestResProperty/ForbiddenAttr/%s.tf", fixtureName), - ExpectError: regexp.MustCompile("See the Akamai Terraform Upgrade Guide"), - }}, - }) - }) + client := &mockpapi{} + client.Test(T{t}) - client.AssertExpectations(t) + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: []resource.TestStep{{ + Config: loadFixtureString("testdata/TestResProperty/ForbiddenAttr/%s.tf", fixtureName), + ExpectError: regexp.MustCompile("See the Akamai Terraform Upgrade Guide"), + }}, + }) }) + + client.AssertExpectations(t) } } @@ -654,87 +674,85 @@ func TestResProperty(t *testing.T) { AssertImportable := func(t *testing.T, TestName, ImportID string) func(t *testing.T) { fixturePath := fmt.Sprintf("testdata/%s/Importable/importable.tf", t.Name()) - testName := fmt.Sprintf("Importable/%s", TestName) return func(t *testing.T) { - t.Run(testName, func(t *testing.T) { - - client := &mockpapi{} - client.Test(T{t}) - - setup := ComposeBehaviors( - PropertyLifecycle("test_property", "prp_0", "grp_0", - papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0"), - GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusActive, papi.VersionStatusInactive), - SetHostnames("prp_0", 1, "to.test.domain"), - ImportProperty("prp_0"), - ) - - parameters := strings.Split(ImportID, ",") - numberParameters := len(parameters) - lastParameter := parameters[len(parameters)-1] - if (numberParameters == 2 || numberParameters == 4) && !isDefaultVersion(lastParameter) { - var ContractID, GroupID string - if numberParameters == 4 { - ContractID = "ctr_0" - GroupID = "grp_0" - } - setup = ComposeBehaviors( - setup, - GetPropertyVersions("prp_0", "test_property", ContractID, GroupID), - ) + client := &mockpapi{} + client.Test(T{t}) + + parameters := strings.Split(ImportID, ",") + numberParameters := len(parameters) + lastParameter := parameters[len(parameters)-1] + setup := []BehaviorFunc{ + PropertyLifecycle("test_property", "prp_0", "grp_0", + papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), + GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), + SetHostnames("prp_0", 1, "to.test.domain"), + ImportProperty("prp_0"), + } + if (numberParameters == 2 || numberParameters == 4) && !isDefaultVersion(lastParameter) { + var ContractID, GroupID string + if numberParameters == 4 { + ContractID = "ctr_0" + GroupID = "grp_0" + } + if numberParameters == 2 { + setup = append(setup, GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0")) } + setup = append(setup, GetPropertyVersions("prp_0", "test_property", ContractID, GroupID)) + } + s := ComposeBehaviors(setup...) + kase := LifecycleTestCase{ + Name: "Importable", + ClientSetup: s, + Steps: func(State *TestState, _ string) []resource.TestStep { + return []resource.TestStep{ + { + Config: loadFixtureString(fixturePath), + Check: CheckAttrs("prp_0", "to.test.domain", "1", "0", "0", "ehn_123", + "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), + }, + // this step is used to refresh state with updated staging/production statuses + { + PreConfig: func() { + State.VersionItems = papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{ + { + PropertyVersion: 1, + StagingStatus: papi.VersionStatusActive, + ProductionStatus: papi.VersionStatusActive, + }, + }} + stagingVersion := 1 + State.Property.StagingVersion = &stagingVersion - kase := LifecycleTestCase{ - Name: "Importable", - ClientSetup: setup, - Steps: func(State *TestState, _ string) []resource.TestStep { - return []resource.TestStep{ - { - PreConfig: func() { - State.VersionItems = papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{ - { - PropertyVersion: 1, - StagingStatus: papi.VersionStatusActive, - ProductionStatus: papi.VersionStatusActive, - }, - }} - }, - Config: loadFixtureString(fixturePath), - Check: CheckAttrs("prp_0", "to.test.domain", "1", "0", "0", "ehn_123", - "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), - }, - { - PreConfig: func() { - stagingVersion := 1 - State.Property.StagingVersion = &stagingVersion - }, - ImportState: true, - ImportStateVerify: true, - ImportStateId: ImportID, - ResourceName: "akamai_property.test", - Config: loadFixtureString(fixturePath), - ImportStateVerifyIgnore: []string{"product"}, - Check: CheckAttrs("prp_0", "to.test.domain", "1", "1", "1", "ehn_123", - "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), }, - } - }, - } - State := &TestState{Client: client} - kase.ClientSetup(State) - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - Providers: testAccProviders, - Steps: kase.Steps(State, ""), - }) + Config: loadFixtureString(fixturePath), + Check: CheckAttrs("prp_0", "to.test.domain", "1", "1", "0", "ehn_123", + "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), + }, + { + ImportState: true, + ImportStateVerify: true, + ImportStateId: ImportID, + ResourceName: "akamai_property.test", + Config: loadFixtureString(fixturePath), + ImportStateVerifyIgnore: []string{"product", "read_version"}, + Check: CheckAttrs("prp_0", "to.test.domain", "1", "1", "0", "ehn_123", + "{\"rules\":{\"name\":\"default\",\"options\":{}}}"), + }, + } + }, + } + State := &TestState{Client: client} + kase.ClientSetup(State) + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + Providers: testAccProviders, + Steps: kase.Steps(State, ""), }) - - client.AssertExpectations(t) }) + + client.AssertExpectations(t) } } @@ -802,6 +820,7 @@ func TestResProperty(t *testing.T) { t.Run("Lifecycle: no diff (product_id to product)", AssertLifecycle(t, t.Name(), "product_id to product", NoDiff)) t.Run("Lifecycle: rules custom diff", AssertLifecycle(t, t.Name(), "rules custom diff", RulesCustomDiff)) t.Run("Lifecycle: no diff for hostnames (hostnames)", AssertLifecycle(t, t.Name(), "hostnames", NoDiffForHostnames)) + t.Run("Lifecycle: new version changed on server", AssertLifecycle(t, t.Name(), "new version changed on server", ChangesMadeOutsideOfTerraform)) // Test Import @@ -835,23 +854,9 @@ func TestResProperty(t *testing.T) { setup := ComposeBehaviors( PropertyLifecycle("test_property", "prp_0", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0", papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{ - { - PropertyVersion: 1, - StagingStatus: papi.VersionStatusInactive, - ProductionStatus: papi.VersionStatusInactive, - }, - }}), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), PropertyLifecycle("renamed_property", "prp_1", "grp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), - GetPropertyVersions("prp_1", "renamed_property", "ctr_0", "grp_0", papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{ - { - PropertyVersion: 1, - StagingStatus: papi.VersionStatusInactive, - ProductionStatus: papi.VersionStatusInactive, - }, - }}), GetPropertyVersionResources("prp_1", "grp_0", "ctr_0", 1, papi.VersionStatusInactive, papi.VersionStatusInactive), SetHostnames("prp_0", 1, "to.test.domain"), SetHostnames("prp_1", 1, "to2.test.domain"), @@ -888,13 +893,6 @@ func TestResProperty(t *testing.T) { setup := ComposeBehaviors( CreateProperty("test_property", "prp_0", papi.RulesUpdate{Rules: papi.Rules{Name: "default"}}), GetProperty("prp_0"), - GetPropertyVersions("prp_0", "test_property", "ctr_0", "grp_0", papi.PropertyVersionItems{Items: []papi.PropertyVersionGetItem{ - { - PropertyVersion: 1, - StagingStatus: papi.VersionStatusInactive, - ProductionStatus: papi.VersionStatusInactive, - }, - }}), GetVersionResources("prp_0", "ctr_0", "grp_0", 1), GetPropertyVersionResources("prp_0", "grp_0", "ctr_0", 1, "ctr_0", "grp_0"), SetHostnames("prp_0", 1, "to.test.domain"), diff --git a/pkg/providers/property/testdata/TestDSCPCode/ambiguous_name.tf b/pkg/providers/property/testdata/TestDSCPCode/ambiguous_name.tf index 14d969a79..57be5f632 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/ambiguous_name.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/ambiguous_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/contract_collides_with_id.tf b/pkg/providers/property/testdata/TestDSCPCode/contract_collides_with_id.tf index 515040939..26c26d6cb 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/contract_collides_with_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/contract_collides_with_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/group_collides_with_id.tf b/pkg/providers/property/testdata/TestDSCPCode/group_collides_with_id.tf index 3c2780788..d8526b859 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/group_collides_with_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/group_collides_with_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf index 8eb8b237e..51c12bce9 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf index 14d969a79..57be5f632 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf index 46689649d..7d4608136 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf index 14b48fd82..2c6170fdf 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/name_collides_with_id.tf b/pkg/providers/property/testdata/TestDSCPCode/name_collides_with_id.tf index 8eb8b237e..51c12bce9 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/name_collides_with_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/name_collides_with_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/no_matches.tf b/pkg/providers/property/testdata/TestDSCPCode/no_matches.tf index 14d969a79..57be5f632 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/no_matches.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/no_matches.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf index 4de4fb344..138dfc70a 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group.tf index 5d397392d..1a43a4363 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group_wo_prefix.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group_wo_prefix.tf index a2d124602..20ebbe06c 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group_wo_prefix.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_in_group_wo_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf index b76e02a60..aa07711c6 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf index 4422d2864..7989548ed 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf index 29ef77011..ce16c11dc 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_in_group.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_in_group.tf index 8a0334489..eabd0f3f2 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_in_group.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_in_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/group.tf b/pkg/providers/property/testdata/TestDSContractRequired/group.tf index 874172a5d..d12544fc3 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/group.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/groups.tf b/pkg/providers/property/testdata/TestDSContractRequired/groups.tf index ddef5e4dd..a9415ed72 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/groups.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/groups.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_groups" "akagroups" {} diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-contract-id-and-contract-conflict.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-contract-id-and-contract-conflict.tf index 0d57e3bca..b633494db 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-contract-id-and-contract-conflict.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-contract-id-and-contract-conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract.tf index fc9741ed4..69d69066e 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf index 45d3f187d..5970f075d 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-name-conflict.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-name-conflict.tf index ca2b62487..ffdedd2a3 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-name-conflict.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-name-conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract.tf index 8c0ec63ac..422166c5a 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract_id.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract_id.tf index a8d271f08..8989e6e55 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract_id.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-name-and-contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf b/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf index 634378641..4f826aef7 100644 --- a/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf +++ b/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "akacpcode" { diff --git a/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf b/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf index f5c221c68..ec321a0bc 100644 --- a/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf +++ b/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_properties_search" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf b/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf index 07e1cfdf2..62ade5c98 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rule_formats" "akarulesformats" {} diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf b/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf index e2d8fd65b..5fe3e949a 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf b/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf index 572c8a59d..62775c8ef 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf index 1f17cbddb..cdb330850 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf index 65b1195ed..ba487e3d3 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf index 356669a50..a0350d004 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf index 5d10c841d..c76307ba1 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf b/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf index ed7481811..8791ce304 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf b/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf index 9f413df88..8fb1a63db 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf index 286566321..573ec8f68 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf index f64c709d1..3154bd65d 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf index b1a91a159..f3260f380 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf index fe5d0b141..92c62e43b 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf index 75baad3e7..db18cb35d 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_folder_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_folder_json.tf index 294b2b927..6ad11a5aa 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_folder_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_folder_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_only_one_folder_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_only_one_folder_json.tf index 9570f7e58..95c88d2e9 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_only_one_folder_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_only_one_folder_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf index 5f2a4bd31..040f422b3 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf index 6865f6945..002ccee4f 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf index d02525a80..a27c63fcd 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf index da5b16704..f86d3982d 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf index 9ce810620..967f0ebc0 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf index c78cfa976..2daeca76e 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf index 1dbcbd065..935f61393 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf index c4a4a5d1f..e8cb2569c 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf index 0a2267803..e2d399b49 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf index c1a7d8ad3..61c4e9f61 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf index f3b4e014a..502cd7c61 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf index 349e2d491..7c108e2b3 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf index 84644c65f..72361c5b8 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDataContracts/contracts.tf b/pkg/providers/property/testdata/TestDataContracts/contracts.tf index ce8d2d4aa..0f611245d 100644 --- a/pkg/providers/property/testdata/TestDataContracts/contracts.tf +++ b/pkg/providers/property/testdata/TestDataContracts/contracts.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_contracts" "akacontracts" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties.tf b/pkg/providers/property/testdata/TestDataProperties/properties.tf index 7167eecfe..4af5234e5 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf b/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf index 008dedab5..8e602b6a1 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf b/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf index 24f00b8a6..acac30fc7 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperty/no_name.tf b/pkg/providers/property/testdata/TestDataProperty/no_name.tf index 5f6dfb1a9..92bc4e540 100644 --- a/pkg/providers/property/testdata/TestDataProperty/no_name.tf +++ b/pkg/providers/property/testdata/TestDataProperty/no_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataProperty/no_version.tf b/pkg/providers/property/testdata/TestDataProperty/no_version.tf index 608f17ddd..d158111b0 100644 --- a/pkg/providers/property/testdata/TestDataProperty/no_version.tf +++ b/pkg/providers/property/testdata/TestDataProperty/no_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataProperty/with_version.tf b/pkg/providers/property/testdata/TestDataProperty/with_version.tf index 8df08f9e5..1f67772ab 100644 --- a/pkg/providers/property/testdata/TestDataProperty/with_version.tf +++ b/pkg/providers/property/testdata/TestDataProperty/with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf index 5ce687c6a..9d02ac536 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf index 3b99c68fc..75c43d7fd 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf index 7997e43d5..400d96fd5 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf index 379fdf44c..b7eae1a77 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf index c75754112..c14b6c023 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf index 0bf76ad53..147d63415 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf index 5d7c70715..a49ab2a19 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_deprecated_arg.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_deprecated_arg.tf index 7820b727c..a253b2f91 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_deprecated_arg.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_deprecated_arg.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf index 63c0a71ce..a89f40e89 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf index f3cf12bc8..e29b33cb5 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf index f0c6ca734..ff706398e 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf index f0c6ca734..ff706398e 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf index 1204d8da4..f167436f5 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf b/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf index 5a31a8fe8..cc053b469 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf b/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf index 5f0dc701c..bc7844289 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf b/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf index 52c25ccc6..405065c88 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf b/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf index fd5b98823..7a9958c1d 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf b/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf index 4e40ba735..68018109f 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf index 5f0dc701c..bc7844289 100644 --- a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code_deprecated_attrs.tf b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code_deprecated_attrs.tf index 27338adbe..ca2ff394f 100644 --- a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code_deprecated_attrs.tf +++ b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code_deprecated_attrs.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf index 0672fc972..18a4852a7 100644 --- a/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf index c774380fa..11c308daa 100644 --- a/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_contract_and_contract_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_contract_and_contract_id_given.tf index 35d80b802..0c12f34dc 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_contract_and_contract_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_contract_and_contract_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_group_and_group_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_group_and_group_id_given.tf index 8bb9baeb1..5a6112111 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_group_and_group_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_group_and_group_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_product_and_product_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_product_and_product_id_given.tf index c49a28081..c7eaa752e 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/both_product_and_product_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/both_product_and_product_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf index de071346f..8be1fab30 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf index 9b0f95d43..f7fabaa61 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf index 1fb5c0450..d912777d9 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf index 3ada5faf7..61fae40ba 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_contract_nor_contract_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_contract_nor_contract_id_given.tf index 8362816ad..57d7ee38e 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_contract_nor_contract_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_contract_nor_contract_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_group_nor_group_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_group_nor_group_id_given.tf index 937749b15..65577fc89 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_group_nor_group_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_group_nor_group_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_product_nor_product_id_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_product_nor_product_id_given.tf index 64edcbe3f..045f92257 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_product_nor_product_id_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/neither_product_nor_product_id_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Creation/property.tf b/pkg/providers/property/testdata/TestResProperty/Creation/property.tf index 5d0dfaf1d..0dde60adc 100644 --- a/pkg/providers/property/testdata/TestResProperty/Creation/property.tf +++ b/pkg/providers/property/testdata/TestResProperty/Creation/property.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf index 6c0ce0d26..cb7390366 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf index 058ff408c..ff8efe220 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf index 8cd8607a8..8835c54a0 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf index 7d5a40239..4f6aa3936 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf index 3ccb22737..83710029e 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf index a3fcb371c..a9a705a32 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf index 464479b6e..c5c2b3450 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf index 8b18607bd..2595b98dc 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf index ec354ebfe..52d1d24c9 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf index 46d594ff1..824ef10db 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf index 6194ea54f..a9875bdca 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf index 4f1b08379..70bcd9162 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf index 3ce899f49..beff48c42 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf index cc0e6881b..846af6737 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf index eff368478..449796bc2 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf index f01c61a23..44f1bc741 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf index 3ce899f49..beff48c42 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf index ae16a7c54..64d0158fd 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf index 1d6ca0972..f9e2de313 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf index 10d647a63..2ee95e390 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf index 3ce899f49..beff48c42 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf index 7acafbcc5..522b10c74 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf b/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf index c4163ec29..b07cf05c9 100644 --- a/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf +++ b/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf index ade28366c..a05bb6491 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf index ad4da8e38..c06bdc9f3 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf index 472176a85..1920bc48e 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf index 2e87de06e..04c8e7cd1 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf index 2c6cb8bf1..ef5c425ed 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf index f7f110be2..1d25ed913 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf index ad75085bd..f7a76e884 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf index 930147a7b..3c61f9a71 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf index fcbdbe7dd..a3bd6b6cd 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf index c2320a40c..99d582768 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf new file mode 100644 index 000000000..beff48c42 --- /dev/null +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf @@ -0,0 +1,17 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_property" "test" { + name = "test_property" + contract_id = "ctr_0" + group_id = "grp_0" + product_id = "prd_0" + + hostnames { + cname_to = "to.test.domain" + cname_from = "from.test.domain" + cert_provisioning_type = "DEFAULT" + } + +} diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf index d4bbcb9e1..b603629d5 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf index 50a409efb..1659f0211 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf index 3ce899f49..beff48c42 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf index ebc708d90..e36c50616 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step0.tf index ffed4882e..1fd5aa12e 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step1.tf index 009b19916..1edf20a15 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product to product_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf index 7a007c0bf..9030e1aa8 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf index 3b2cffe98..54e40c1e6 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step0.tf index 009b19916..1edf20a15 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step1.tf index ffed4882e..1fd5aa12e 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id to product/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf index 207d6b296..cf1f64d51 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf index 86b6c3f30..9db4c149b 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf index f7b050787..65d044dcb 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf index e3cdffc25..16506e6b6 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf b/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf index 57158d07d..47f4dbb01 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf index ade28366c..a05bb6491 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf index 496a66502..661756736 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf @@ -1,3 +1,3 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } diff --git a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf index c1e22f277..7d2b5f865 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf index ee71d5906..590d00897 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf b/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf index deb282df8..3db80a1d0 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyVariables/schema_version1_always_fails.tf b/pkg/providers/property/testdata/TestResPropertyVariables/schema_version1_always_fails.tf index 8578f6e7d..78f9cc3f7 100644 --- a/pkg/providers/property/testdata/TestResPropertyVariables/schema_version1_always_fails.tf +++ b/pkg/providers/property/testdata/TestResPropertyVariables/schema_version1_always_fails.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_property_variables" "test" {} diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf index ac35400cf..fadf66def 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "importedgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/invalid_ip.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/invalid_ip.tf index 5d0d9fea7..7e9f2866c 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/invalid_ip.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/invalid_ip.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf index 551948ebc..affbc7ded 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf index 869cb3fa8..0e6cb9c85 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf index 8df78969d..9e1264c65 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf index 68d6f1b04..09e488263 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf index 461052b2a..559862c8a 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "~/.edgerc" + edgerc = "../../test/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/test/edgerc b/pkg/test/edgerc new file mode 100644 index 000000000..11b4c8c98 --- /dev/null +++ b/pkg/test/edgerc @@ -0,0 +1,5 @@ +[default] +client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX= +host = akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx.luna-dev.akamaiapis.net +access_token = akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx +client_token = akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx \ No newline at end of file