Skip to content

Commit

Permalink
Merge pull request #372 from akamai/release/v3.2.0
Browse files Browse the repository at this point in the history
Release/v3.2.0
  • Loading branch information
majakubiec authored Dec 15, 2022
2 parents f375c5d + f393dfd commit 3024358
Show file tree
Hide file tree
Showing 165 changed files with 7,610 additions and 769 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build
on:
push:
branches:
- "**"
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Prepare env
run: make init
- name: Prepare terraform tools
run: make tools.terraform
- name: Prepare dummy edgerc
run: make dummy-edgerc
- name: Run checks
run: make check
- name: Create build
run: make build
- name: Run tests
run: make test
- name: Run terraform-fmt
run: make terraform-fmt
- name: Run terraform lint
run: make terraform-lint
44 changes: 35 additions & 9 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
linters:
disable-all: true
enable:
- revive
- errcheck
- gocyclo
- gofmt
- goimports
- govet
- ineffassign
- misspell
- revive

output:
sort-results: true
Expand All @@ -10,6 +17,25 @@ issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: gen\.go
linters:
- gocyclo
- path: networklists/.*test\.go
linters:
- errcheck
- path: appsec/templates\.go
linters:
- errcheck
- path: dns/.*test\.go
linters:
- errcheck
- path: gtm/.*test\.go
linters:
- errcheck
- path: property/.*test\.go
linters:
- errcheck

linters-settings:
revive:
Expand All @@ -20,23 +46,23 @@ linters-settings:
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: errorf
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
- name: unused-parameter
- name: var-declaration
- name: var-naming
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# RELEASE NOTES

## 3.2.0 (December 15 2022)

#### FEATURES/ENHANCEMENTS:

* PAPI - Add support for Property Includes
* Added resources:
* [akamai_property_include](docs/resources/property_include.md) - create, read, update, delete and import
* [akamai_property_include_activation](docs/resources/property_include_activation.md) - create, read, update, delete and import
* Added data sources:
* [akamai_property_include_activation](docs/data-sources/property_include_activation.md) - get latest include activation by network
* [akamai_property_include_parents](docs/data-sources/property_include_parents.md) - get property include parents information
* [akamai_property_include_rules](docs/data-sources/property_include_rules.md) - get property include version rules information
* [akamai_property_include](docs/data-sources/property_include.md) - get property include version information
* [akamai_property_includes](docs/data-sources/property_includes.md) - list property includes information

* APPSEC
* Add `json` attribute to `akamai_appsec_security_policy` data source to allow obtaining policy name given its ID.

#### BUG FIXES:

* APPSEC
* Fixed bug that prevented `akamai_appsec_ip_geo` resource from sending correct network lists in `block` mode.
* Fixed bug that prevented `akamai_appsec_configuration` data source from reporting error correctly when a nonexistent configuration is specified.

## 3.1.0 (December 1, 2022)

#### FEATURES/ENHANCEMENTS:
Expand Down Expand Up @@ -50,6 +74,7 @@

* GTM
* Fixed unreadable diff when single attribute is changed in traffic target
> If upgrading to provider version 3.0.0 from an older version and using Akamai GTM Properties, you might see a switch of targets during the first apply. This is needed to get your terraform state in sync with our API, the following terraform plan/apply will not be affected
## 2.4.2 (October 4, 2022)

Expand Down
6 changes: 1 addition & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ build:
go build -tags all -o $(build_dir)/$(bin_name)

.PHONY: check
check: errcheck fmtcheck lint vet
check: fmtcheck lint vet

.PHONY: test
test:
Expand Down Expand Up @@ -64,10 +64,6 @@ fmtcheck: |; $(info ==> Running format and imports check...)
false;\
fi

.PHONY: errcheck
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

.PHONY: lint
lint:
@echo "==> Checking source code against golangci-lint"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
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/v3)](https://goreportcard.com/report/github.com/akamai/terraform-provider-akamai/v3)
![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/v3)

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


Expand Down
9 changes: 7 additions & 2 deletions docs/data-sources/appsec_security_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ output "security_policies_list" {
value = data.akamai_appsec_security_policy.security_policies.security_policy_id_list
}
output "security_policies_json" {
value = data.akamai_appsec_security_policy.security_policies.json
}
output "security_policies_text" {
value = data.akamai_appsec_security_policy.security_policies.output_text
}
Expand All @@ -65,6 +69,7 @@ This data source supports the following arguments:

The following options can be used to determine the information returned, and how that returned information is formatted:

- `security_policy_id_list`. List of all your security policy IDs.
- `json`. JSON-formatted list of the security policy information.
- `output_text`. Tabular report showing the ID and name of all your security policies.
- `security_policy_id`. ID of the security policy. Included only if the `security_policy_name` argument is included in your Terraform configuration file.
- `security_policy_id`. ID of the security policy. Included only if the `security_policy_name` argument is included in your Terraform configuration file.
- `security_policy_id_list`. List of all your security policy IDs.
42 changes: 42 additions & 0 deletions docs/data-sources/property_include.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
layout: akamai
subcategory: Property Provisioning
---

# akamai_property_include (Beta)

Use the `akamai_property_include` data source to get details about a specific include.

## Basic usage

This example returns details for an include based on contract, group, and include IDs.

```hcl
data "akamai_property_include" "my_example" {
contract_id = "ctr_1234"
group_id = "grp_5678"
include_id = "inc_9012"
}
output "my_example" {
value = data.akamai_property_include.my_example
}
```

## Argument reference

This data source supports these arguments:

* `contract_id` - (Required) A contract's unique ID, including the optional `ctr_` prefix.
* `group_id` - (Required) A group's unique ID, including the optional `grp_` prefix.
* `include_id` - (Required) An include's unique ID with the optional `inc_` prefix.

## Attributes reference

This data source returns these attributes:

* `name` - The descriptive name for the include.
* `type` - Specifies the type of the include, either `MICROSERVICES` or `COMMON_SETTINGS`. Use this field for filtering. `MICROSERVICES` allow different teams to work independently on different parts of a single site. `COMMON_SETTINGS` includes are useful for configurations that share a large number of settings, often managed by a central team.
* `latest_version` - Returns the most recent version of the include.
* `staging_version` - The include version currently activated on the staging network.
* `production_version` - The include version currently activated on the production network.
43 changes: 43 additions & 0 deletions docs/data-sources/property_include_activation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
layout: akamai
subcategory: Property Provisioning
---

# akamai_property_include_activation (Beta)

Use the `akamai_property_include_activation` data source to get activation details for an include on the provided network.

## Basic usage

This example returns the include activation on a specified network based on the contract, group, and include IDs.

```hcl
data "akamai_include_activation" "my_example" {
contract_id = "ctr_1234"
group_id = "grp_5678"
include_id = "inc_9012"
network = "PRODUCTION"
}
output "my_example" {
value = data.akamai_include_activation.my_example
}
```

## Argument reference

This data source supports these arguments:

* `contract_id` - (Required) A contract's unique ID, including the optional `ctr_` prefix.
* `group_id` - (Required) A group's unique ID, including the optional `grp_` prefix.
* `include_id` - (Required) An include's unique ID with the optional `inc_` prefix.
* `network` - (Required) The Akamai network where you want to check the activation details, either `STAGING` or `PRODUCTION`. `STAGING` is the default.

## Attributes reference

This data source returns these attributes:

* `version` - The version of the activated include.
* `name` - The descriptive name for the property.
* `note` - A log message assigned to the activation request.
* `notify_emails` - The list of email addresses notified when the activation status changes.
44 changes: 44 additions & 0 deletions docs/data-sources/property_include_parents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: akamai
subcategory: Property Provisioning
---

# akamai_property_include_parents (Beta)

Use the `akamai_property_include_parents` data source to return a list of parent properties that use the given include. In your property's rule tree, you can reference an include by adding the `include` behavior and specifying the `include_id`.

## Basic usage

This example returns all active properties a specific include is referenced in, based on the contract, group, and include IDs.

```hcl
data "akamai_property_include_parents" "my_example" {
contract_id = "ctr_1-AB123"
group_id = "grp_12345"
include_id = "inc_123456"
}
output "my_example" {
value = data.akamai_property_include_parents.my_example
}
```

## Argument reference

This data source supports these arguments:

* `contract_id` - (Required) A contract's unique ID, including the optional `ctr_` prefix.
* `group_id` - (Required) A group's unique ID, including the optional `grp_` prefix.
* `include_id` - (Required) An include's unique ID with the optional `inc_` prefix.

## Attributes reference

This data source returns these attributes:

* `parents` - The list of include's parent properties.
* `id` - The property's unique identifier.
* `name` - The descriptive name for the property.
* `staging_version` - The property version currently activated on the staging network.
* `production_version` - The property version currently activated on the production network.
* `is_include_used_in_staging_version` - Whether the specified include is active on the staging network and is referenced in parent's `staging_version`.
* `is_include_used_in_production_version` - Whether the specified include is active on the production network and is referenced in parent's `production_version`.
Loading

0 comments on commit 3024358

Please sign in to comment.