Skip to content

Commit

Permalink
Merge pull request #195 from akamai/release/v1.0.0
Browse files Browse the repository at this point in the history
Release/v1.0.0
  • Loading branch information
ssrirama-aka authored Dec 10, 2020
2 parents 25c506d + 17ac9fe commit 1d221dd
Show file tree
Hide file tree
Showing 272 changed files with 11,382 additions and 5,969 deletions.
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# RELEASE NOTES

## 1.0.0 (Dec 9, 2020) Provisioning redesign

#### BREAKING CHANGES:
* provider: configuring via an inline provider block (`property`, `dns`, or `gtm`) has been replaced with a more general `config` block that works the same way.
* There are several breaking changes in the 1.0 release. You should consult the [Migration guide](docs/guides/1.0_migration.md) for details.
* resources/akamai_property_activation no longer supports the following fields : activate. version has gone from being optional to being a required field.
* data-sources/akamai_property_rules removed in favor of using template JSON object to better work with other Akamai tools and documentation that is all JSON based.
* resources/akamai_property_variables removed in favor of directly managing the variable segment as part of ruletree object.
* resources/akamai_cp_code no longer auto-imports on create. If a conflict is detected will error out and to ignore simply import the resource.
* resources/akamai_edge_hostname no longer supports the following fields : ipv4, ipv6. The revised resource allows setting ip_behavior directly.
* resources/akamai_property no longer supports the following fields : cp_code, origin, variables, is_secure, contact. The revised resource simplifies the object structure and removes the ability to set the same value more than one way.
#### NOTES:
* provider/papi: changed attribute names in Provisioning to distinguish objects and names from id attributes. In prior releases, "group" could represent a name, an id, or sometimes both. This release distinguishes them with distinct attribute names "group_name", "group_id" instead of "group"."
#### KNOWN BUGS:
* resources/akamai_property removing hostnames attribute can result in repeated noop update calls because in this case removal means the hostname relationships are un-managed leaving the attribute as empty is a better way to express this change.
#### FEATURES:
* data-sources/akamai_properties added to list properties accessible to the user.
* data-sources/akamai_property_contracts added to list contracts accessible to the user.
* data-sources/akamai_property_groups added to list groups accessible to the user.
* data-sources/akamai_property_products added to list products associated with a given contract.
* data-sources/akamai_property_rule_formats added to list rule_formats.
* data-sources/akamai_property_rules changed to output the structure of a particular rule version on the server. NOTE: this is NOT the same as the deprecated datasource used for rule formatting.
* data-sources/akamai_rules_template added to handle file based JSON templating for rules tree data management
#### ENHANCEMENTS:
* resources/akamai_property_activation aliased property to property_id. Returns these additional attributes : target_version, warnings, errors, activation_id, and status
#### BUG FIXES:
* provider: provider configuration validation requires an edgerc file configured and present even when environment variable-based configuration was used.
* provider: provider inline configuration support was re-introduced as a new config field.
* resources/akamai_property_activation activating and destroying activation for the same property multiple times in a row would fail on second destroy attempt and subsequent destroy attempts with "resource not found error" message.
* resources/akamai_property_activation wrong activation id read for property versions that had been activated and deactivated multiple time.
#### MINOR CHANGES:
* resources/akamai_property aliased property to property_id. contract to contract_id, and product to product_id and account to account_id. Renamed version to latest_version.
* data-sources/akamai_contract aliased group to group_id and/or group_name.
* data-sources/akamai_cp_code aliased group to group_id and contract to contract_id.
* data-sources/akamai_group aliased name to group_name and contract to contract_id.

## 0.11.0 (Nov 19,2020)

#### NOTES:
Expand Down Expand Up @@ -39,7 +75,7 @@
* provider: fixed documentation to properly present guides and categories on Hashicorp Terraform registry site
* resources/edge_hostname: added error when neither IPV4 nor IPV6 is selected
* resources/akamai_property: comparisons in rule tree now properly ignore equivalent values with attribute order differences.
* datasource/akamai_property_rules: comparisons in rule tree now properly ignore equivalent values with attribute order differences.
* data-sources/akamai_property_rules: comparisons in rule tree now properly ignore equivalent values with attribute order differences.
* provider: updated all error messages to better identify issues and actions required by user
* provider: fixed crash due to unexpected data types from unexpected API responses
* provider: fixed crash due to unexpected data types in Terraform files
Expand Down
62 changes: 30 additions & 32 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
TEST?=$$(go list ./...)
GOFMT_FILES?=$$(find . -name '*.go')
PKG_NAME=akamai
#WEBSITE_REPO=github.com/hashicorp/terraform-website
TEST ?= $$(go list ./...)
GOFMT_FILES ?= $$(find . -name '*.go')
PKG_NAME = akamai

# Local provider install parameters
version = 0.11.0
registry_name = registry.terraform.io
namespace = $(PKG_NAME)
bin_name = terraform-provider-$(PKG_NAME)
build_dir = .build
TF_PLUGIN_DIR ?= ~/.terraform.d/plugins
install_path = $(TF_PLUGIN_DIR)/$(registry_name)/$(namespace)/$(PKG_NAME)/$(version)/$$(go env GOOS)_$$(go env GOARCH)

default: build

.PHONY: install
install: build
mkdir -p $(install_path)
cp $(build_dir)/$(bin_name) $(install_path)/$(bin_name)_v$(version)

.PHONY: build
build: fmtcheck
go install -tags all
mkdir -p $(build_dir)
go build -tags all -o $(build_dir)/$(bin_name)

.PHONY: check
check: errcheck fmtcheck lint vet

.PHONY: test
test: fmtcheck
go test $(TEST) -v $(TESTARGS) -timeout 60s
go test $(TEST) -v $(TESTARGS) -timeout 2m

.PHONY: testacc
testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 300m

.PHONY: vet
vet:
@echo "go vet ."
@go vet $$(go list ./...); if [ $$? -eq 1 ]; then \
Expand All @@ -25,48 +44,27 @@ vet:
exit 1; \
fi

.PHONY: fmt
fmt:
gofmt -w $(GOFMT_FILES)

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

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

#lint:
# @echo "==> Checking source code against linters..."
# @golangci-lint run ./$(PKG_NAME)

.PHONY: lint
lint: tools.golangci-lint
@echo "==> Checking source code againse golangci-lint"
@golangci-lint run ./$(PKG_NAME)

tools:
@echo "==> installing required tooling..."
#GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
#GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint

.PHONY: test-compile
test-compile:
go test -c ./akamai $(TESTARGS)

website:
#ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
# echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
# git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
#endif
# @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

website-test:
#ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
# echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
# git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
#endif
# @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

.PHONY: build build-docker test test-docker testacc vet fmt fmtcheck errcheck tools test-compile website website-test

.PHONY: tools.golangci-lint

tools.golangci-lint:
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ This provider is automatically installed when you run `terraform init` on a conf

## Documentation

Documentation can be found on the [Terraform Website](https://www.terraform.io/docs/providers/akamai/index.html).
Documentation can be found on the [Terraform Website](https://registry.terraform.io/providers/akamai/akamai/latest/docs).
4 changes: 2 additions & 2 deletions build/internal/docker_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Lastly you can quit the shell by typing 'exit' and press return key. This will destroy the container
WORKDIR="${WORKDIR-$(pwd)}"
echo "WORKDIR is $WORKDIR"
TERRAFORM_VERSION="0.13.1"
TERRAFORM_VERSION="0.13.5"
PROVIDER_BRANCH_HASH="$(git rev-parse --short HEAD)"
PROVIDER_BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)"
eTAG="$(git describe --tags --always)"
Expand Down Expand Up @@ -42,4 +42,4 @@ docker run -d -it --name akatf-dev-container --entrypoint "/usr/bin/tail" \
terraform/akamai-local:$eTAG -f /dev/null
docker exec -it akatf-dev-container sh
docker rm -f akatf-dev-container
echo Container destruction complete. Using Akamai provider plugin version:$eTAG
echo Container destruction complete. Using Akamai provider plugin version:$eTAG
4 changes: 2 additions & 2 deletions build/internal/docker_qa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Lastly you can quit the shell by typing 'exit' and press return key. This will destroy the container
WORKDIR="${WORKDIR-$(pwd)}"
echo "WORKDIR is $WORKDIR"
TERRAFORM_VERSION="0.13.1"
TERRAFORM_VERSION="0.13.5"
PROVIDER_BRANCH_NAME="develop"

docker rm -f akatf-container 2> /dev/null || true
Expand All @@ -20,4 +20,4 @@ docker run -d -it --name akatf-container --entrypoint "/usr/bin/tail" \
-w /tf/ \
pdr.akamai.com/pulsar/terraform-provider:latest -f /dev/null
docker exec -it akatf-container sh
docker rm -f akatf-container 2> /dev/null || true
docker rm -f akatf-container 2> /dev/null || true
2 changes: 1 addition & 1 deletion build/internal/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.0-experimental
ARG TERRAFORM_VERSION="0.13.1"
ARG TERRAFORM_VERSION="0.13.5"
FROM golang:1.15.1-alpine AS builder
ENV GO111MODULE="on" \
CGO_ENABLED=0 \
Expand Down
4 changes: 2 additions & 2 deletions build/internal/package/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN cd terraform-provider-akamai \
&& go install -tags all \
&& go mod edit -dropreplace github.com/akamai/AkamaiOPEN-edgegrid-golang/v2

FROM hashicorp/terraform:0.13.1
FROM hashicorp/terraform:0.13.5
ENV PROVIDER_VERSION="1.0.0"
COPY --from=builder /go/bin/terraform-provider-akamai /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/${PROVIDER_VERSION}/linux_amd64/terraform-provider-akamai_v${PROVIDER_VERSION}
COPY --from=builder /go/bin/terraform-provider-akamai /root/.terraform.d/plugins/registry.terraform.io/-/akamai/${PROVIDER_VERSION}/linux_amd64/terraform-provider-akamai_v${PROVIDER_VERSION}
COPY --from=builder /go/bin/terraform-provider-akamai /root/.terraform.d/plugins/registry.terraform.io/-/akamai/${PROVIDER_VERSION}/linux_amd64/terraform-provider-akamai_v${PROVIDER_VERSION}
2 changes: 1 addition & 1 deletion docs/data-sources/appsec_match_targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ The following arguments are supported:

In addition to the arguments above, the following attributes are exported:

* `output_text` - A tabular display showing the ID and Policy ID of all match targets associated with the specified security configuraton and version.
* `output_text` - A tabular display showing the ID and Policy ID of all match targets associated with the specified security configuration and version.

2 changes: 1 addition & 1 deletion docs/data-sources/appsec_selected_hostnames.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In addition to the arguments above, the following attributes are exported:

* `hostnames` - The list of selected hostnames.

* `hostnames_json` - The list of selected hostnames in json format.
* `hostnames_json` - The list of selected hostnames in JSON format.

* `output_text` - A tabular display of the selected hostnames.

39 changes: 0 additions & 39 deletions docs/data-sources/contract.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/data-sources/cp_code.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Basic usage:

```hcl
data "akamai_authorities_set" "example" {
contract = "ctr_#####"
contract = "ctr_1-AB123"
}
```

## Argument Reference

The following arguments are supported:

* `contract` (Required) The contract ID.
* `contract` - (Required) The contract ID.

## Attributes Reference

The following are the return attributes:
The following attributes are returned:

* `authorities` A list of authorities
* `authorities` - A list of authorities
45 changes: 0 additions & 45 deletions docs/data-sources/group.md

This file was deleted.

Loading

0 comments on commit 1d221dd

Please sign in to comment.