Skip to content

Commit

Permalink
DXE-3574 Merge pull request #536 from akamai/release/v6.0.0
Browse files Browse the repository at this point in the history
Release/v6.0.0
  • Loading branch information
wzagrajcz committed Mar 26, 2024
2 parents 98f09f3 + 9457632 commit 7b3478a
Show file tree
Hide file tree
Showing 1,892 changed files with 30,395 additions and 7,757 deletions.
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: pkg/retryablehttp/.*\.go
linters:
- errcheck
- revive
- gocyclo
- ineffassign
- path: gen\.go
linters:
- gocyclo
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy -compat=1.18
- go mod tidy -compat=1.21
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
Expand All @@ -15,7 +15,7 @@ builds:
- -trimpath
- -tags=all
ldflags:
- -s -w -X github.com/akamai/terraform-provider-akamai/v5/version.ProviderVersion={{.Version}}
- -s -w -X github.com/akamai/terraform-provider-akamai/v6/version.ProviderVersion={{.Version}}
goos:
- windows
- linux
Expand Down
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,95 @@
# RELEASE NOTES

## 6.0.0 (Mar 26, 2024)

#### BREAKING CHANGES:

* General
* Migrated to terraform protocol version 6, hence minimal required terraform version is 1.0

* PAPI
* Added validation to raise an error if the creation of the `akamai_edge_hostname` resource is attempted with an existing edge hostname.
* Added validation to raise an error during the update of `akamai_edge_hostname` resource for the immutable fields: 'product_id' and 'certificate'.

#### FEATURES/ENHANCEMENTS:

* Global
* Requests limit value is configurable via field `request_limit` or environment variable `AKAMAI_REQUEST_LIMIT`
* Added retryable logic for all GET requests to the API.
This behavior can be disabled using `retry_disabled` field from `akamai` provider configuration or via environment variable `AKAMAI_RETRY_DISABLED`.
It can be fine-tuned using following fields or environment variables:
* `retry_max` or `AKAMAI_RETRY_MAX` - The maximum number retires of API requests, default is 10
* `retry_wait_min` or `AKAMAI_RETRY_WAIT_MIN` - The minimum wait time in seconds between API requests retries, default is 1 sec
* `retry_wait_max` or `AKAMAI_RETRY_WAIT_MAX` - The maximum wait time in minutes between API requests retries, default is 30 sec
* Migrated to go 1.21
* Bumped various dependencies

* Appsec
* Added resource:
* `akamai_appsec_penalty_box_conditions` - read and update
* `akamai_appsec_eval_penalty_box_conditions` - read and update
* Added new data source:
* `akamai_appsec_penalty_box_conditions` - read
* `akamai_appsec_eval_penalty_box_conditions` - read

* CPS
* Added fields: `org_id`, `assigned_slots`, `staging_slots` and `production_slots` to `data_akamai_cps_enrollment` and `data_akamai_cps_enrollments` data sources

* Edgeworkers
* Improved error handling in `akamai_edgeworkers_activation` and `resource_akamai_edgeworker` resources
* Improved error handling in `akamai_edgeworker_activation` datasource

* GTM
* Added fields:
* `precedence` inside `traffic_target` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source
* `sign_and_serve` and `sign_and_serve_algorithm` in `akamai_gtm_domain` data source and resource
* `http_method`, `http_request_body`, `alternate_ca_certificates` and `pre_2023_security_posture` inside `liveness_test` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source
* Added support for `ranked-failover` properties in `akamai_gtm_property` resource
* Enhanced error handling in `akamai_gtm_asmap`, `akamai_gtm_domain`, `akamai_gtm_geomap`, `akamai_gtm_property` and `akamai_gtm_resource` resources

* IMAGING
* In the event of an API failure during a policy update, reverting to the previous state ([I#491](https://github.com/akamai/terraform-provider-akamai/issues/491), [I#493](https://github.com/akamai/terraform-provider-akamai/issues/493))
* When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment.

* PAPI
* Added attributes to akamai_property datasource:
* `contract_id`, `group_id`, `latest_version`, `note`, `production_version`, `product_id`, `property_id`, `rule_format`, `staging_version`
* `data_akamai_property_rules_builder` is now supporting `v2024-02-12` [rule format](https://techdocs.akamai.com/terraform/reference/rule-format-changes#v2024-02-12)

#### BUG FIXES:

* Appsec
* Fixed ukraine_geo_control_action drift issue ([I#484](https://github.com/akamai/terraform-provider-akamai/issues/484))

* Cloudlets
* Allowed empty value for match rules `json` attribute for data sources:
* `akamai_cloudlets_api_prioritization_match_rule`
* `akamai_cloudlets_application_load_balancer_match_rule`
* `akamai_cloudlets_audience_segmentation_match_rule`
* `akamai_cloudlets_edge_redirector_match_rule`
* `akamai_cloudlets_forward_rewrite_match_rule`
* `akamai_cloudlets_phased_release_match_rule`
* `akamai_cloudlets_request_control_match_rule`
* `akamai_cloudlets_visitor_prioritization_match_rule`

* CPS
* Changed below fields from required to optional in `akamai_cps_dv_enrollment` and `akamai_cps_third_party_enrollment`
for `admin_contact` and `tech_contact` attributes:
* `organization`
* `address_line_one`
* `city`
* `region`
* `postal_code`
* `country_code`

* PAPI
* Fixed case when `origin_certs_to_honor` field from `origin` behavior mandates presence of empty `custom_certificate_authorities` and/or `custom_certificates` options inside `origin` behavior for `akamai_property_rules_builder` datasource ([I#515](https://github.com/akamai/terraform-provider-akamai/issues/515))

#### DEPRECATIONS

* Appsec
* `akamai_appsec_selected_hostnames` data source and resource are deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the `akamai_appsec_configuration` instead.

## 5.6.0 (Feb 19, 2024)

#### FEATURES/ENHANCEMENTS:
Expand Down
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TEST ?= $$(go list ./...)
TEST ?= $$(go list ./... | grep -v retryablehttp)
PKG_NAME = akamai

# Local provider install parameters
Expand Down Expand Up @@ -56,7 +56,7 @@ tidy:

.PHONY: test
test:
go test $(TEST) -v $(TESTARGS) -timeout 30m 2>&1
go test $(TEST) -v $(TESTARGS) -timeout 40m 2>&1

.PHONY: testacc
testacc:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ Akamai Provider for Terraform
==================

![Build Status](https://github.com/akamai/terraform-provider-akamai/actions/workflows/checks.yml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/akamai/terraform-provider-akamai/v5)](https://goreportcard.com/report/github.com/akamai/terraform-provider-akamai/v5)
[![Go Report Card](https://goreportcard.com/badge/github.com/akamai/terraform-provider-akamai/v6)](https://goreportcard.com/report/github.com/akamai/terraform-provider-akamai/v6)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/akamai/terraform-provider-akamai)
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-blue.svg)](https://opensource.org/licenses/MPL-2.0)
[![GoDoc](https://godoc.org/github.com/akamai/terraform-provider-akamai?status.svg)](https://pkg.go.dev/github.com/akamai/terraform-provider-akamai/v5)
[![GoDoc](https://godoc.org/github.com/akamai/terraform-provider-akamai?status.svg)](https://pkg.go.dev/github.com/akamai/terraform-provider-akamai/v6)

Use the Akamai Provider to manage and provision your Akamai configurations in Terraform. You can use the Akamai Provider for many Akamai products.

## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Terraform](https://www.terraform.io/downloads.html) 1.0.x

## Installation

To automatically install the Akamai Provider, run `terraform init` on a configuration.

## Documentation

You can find documentation for the Akamai Provider on the [Terraform Website](https://techdocs.akamai.com/terraform/docs/overview).
You can find documentation for the Akamai Provider on the [Akamai Techdocs Website](https://techdocs.akamai.com/terraform/docs/overview).

## Credits

Expand Down
4 changes: 2 additions & 2 deletions build/internal/docker_jenkins.bash
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ docker exec akatf-container sh -c 'git clone ssh://[email protected]:799
echo "Checkout branches"
docker exec akatf-container sh -c 'cd edgegrid; git checkout ${EDGEGRID_BRANCH_NAME};
cd ../terraform-provider-akamai; git checkout ${PROVIDER_BRANCH_NAME};
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7=../edgegrid'
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8=../edgegrid'

echo "Installing terraform"
docker exec akatf-container sh -c 'cd terraform-provider-akamai; make tools.terraform'
Expand All @@ -107,7 +107,7 @@ docker exec akatf-container sh -c 'cd terraform-provider-akamai; make terraform-

echo "Running tests with xUnit output"
docker exec akatf-container sh -c 'cd terraform-provider-akamai; go mod tidy;
2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE ./... | tee ../tests.output'
2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE -skip TestClient_DefaultRetryPolicy_TLS ./... | tee ../tests.output'
docker exec akatf-container sh -c 'cat tests.output | go-junit-report' > test/tests.xml
docker exec akatf-container sh -c 'cat tests.output' > test/tests.output
sed -i -e 's/skip=/skipped=/g;s/ failures=/ errors="0" failures=/g' test/tests.xml
Expand Down
4 changes: 2 additions & 2 deletions build/internal/package/nexus-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ checkout_edgegrid() {
}

adjust_edgegrid() {
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7="./akamaiopen-edgegrid-golang"
go mod tidy -compat=1.18
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8="./akamaiopen-edgegrid-golang"
go mod tidy -compat=1.21
}

build() {
Expand Down
6 changes: 3 additions & 3 deletions build/internal/releaser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt update && apt install -y curl git gcc ca-certificates openssh-client gnu
&& curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - \
&& apt update && apt install -y terraform \
&& update-ca-certificates \
&& curl -o go1.18.linux-amd64.tar.gz https://dl.google.com/go/go1.18.linux-amd64.tar.gz \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz \
&& go install github.com/goreleaser/goreleaser@v1.18.2 \
&& curl -o go1.21.0.linux-amd64.tar.gz https://dl.google.com/go/go1.21.0.linux-amd64.tar.gz \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz \
&& go install github.com/goreleaser/goreleaser@v1.21.0 \
&& mkdir -p /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/10.0.0/linux_amd64 /root/.ssh

2 changes: 1 addition & 1 deletion build/internal/releaser/goreleaser_build.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd /workspace/terraform-provider-akamai
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7=../akamaiopen-edgegrid-golang/
go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8=../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
28 changes: 14 additions & 14 deletions docs/data-sources/data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ We’ve moved our documentation to the Akamai TechDocs site. Use the table to fi

| Subprovider | Description |
|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| [Application Security](https://techdocs.akamai.com/terraform/v5.6/docs/appsec-datasources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. |
| [Bot Manager](https://techdocs.akamai.com/terraform/v5.6/docs/botman-datasources) | Identify, track, and respond to bot activity on your domain or in your app. |
| [Certificates](https://techdocs.akamai.com/terraform/v5.6/docs/cps-datasources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. |
| [Client Lists](https://techdocs.akamai.com/terraform/v5.6/docs/cli-data-sources) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.|
| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v5.6/docs/cw-data-sources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.|
| [Cloudlets](https://techdocs.akamai.com/terraform/v5.6/docs/cl-datasources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. |
| [DataStream](https://techdocs.akamai.com/terraform/v5.6/docs/ds-datasources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. |
| [Edge DNS](https://techdocs.akamai.com/terraform/v5.6/docs/edns-datasources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. |
| [EdgeWorkers](https://techdocs.akamai.com/terraform/v5.6/docs/ew-datasources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. |
| [Global Traffic Management](https://techdocs.akamai.com/terraform/v5.6/docs/gtm-datasources) | Use load balancing to manage website and mobile performance demands. |
| [Identity and Access Management](https://techdocs.akamai.com/terraform/v5.6/docs/iam-datasources) | Create users and groups, and define policies that manage access to your Akamai applications. |
| [Image and Video Manager](https://techdocs.akamai.com/terraform/v5.6/docs/ivm-datasources) | Automate image and video delivery optimizations for your website visitors. |
| [Network Lists](https://techdocs.akamai.com/terraform/v5.6/docs/nl-datasources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. |
| [Property](https://techdocs.akamai.com/terraform/v5.6/docs/pm-datasources) | Define rules and behaviors that govern your website delivery based on match criteria. |
| [Application Security](https://techdocs.akamai.com/terraform/v6.0/docs/appsec-datasources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. |
| [Bot Manager](https://techdocs.akamai.com/terraform/v6.0/docs/botman-datasources) | Identify, track, and respond to bot activity on your domain or in your app. |
| [Certificates](https://techdocs.akamai.com/terraform/v6.0/docs/cps-datasources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. |
| [Client Lists](https://techdocs.akamai.com/terraform/v6.0/docs/cli-data-sources) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.|
| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v6.0/docs/cw-data-sources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.|
| [Cloudlets](https://techdocs.akamai.com/terraform/v6.0/docs/cl-datasources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. |
| [DataStream](https://techdocs.akamai.com/terraform/v6.0/docs/ds-datasources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. |
| [Edge DNS](https://techdocs.akamai.com/terraform/v6.0/docs/edns-datasources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. |
| [EdgeWorkers](https://techdocs.akamai.com/terraform/v6.0/docs/ew-datasources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. |
| [Global Traffic Management](https://techdocs.akamai.com/terraform/v6.0/docs/gtm-datasources) | Use load balancing to manage website and mobile performance demands. |
| [Identity and Access Management](https://techdocs.akamai.com/terraform/v6.0/docs/iam-datasources) | Create users and groups, and define policies that manage access to your Akamai applications. |
| [Image and Video Manager](https://techdocs.akamai.com/terraform/v6.0/docs/ivm-datasources) | Automate image and video delivery optimizations for your website visitors. |
| [Network Lists](https://techdocs.akamai.com/terraform/v6.0/docs/nl-datasources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. |
| [Property](https://techdocs.akamai.com/terraform/v6.0/docs/pm-datasources) | Define rules and behaviors that govern your website delivery based on match criteria. |

0 comments on commit 7b3478a

Please sign in to comment.