Skip to content

Commit 683c782

Browse files
authored
DXE-5849 Merge pull request #99 from akamai/release/v2.6.0
Release/v2.6.0
2 parents 4c73bd7 + 6fa8725 commit 683c782

File tree

155 files changed

+14348
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+14348
-91
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# RELEASE NOTES
22

3+
## 2.6.0 (Nov 13, 2025)
4+
5+
#### FEATURES/ENHANCEMENTS:
6+
7+
* Cloud Certificates (Beta)
8+
* Added the `export-cloudcertificate` command that generates the configuration for the
9+
`akamai_cloudcertificates_certificate` and `akamai_cloudcertificates_upload_signed_certificate` resources.
10+
11+
* PAPI Domain Ownership Validation (Beta)
12+
* Added support for exporting the `akamai_property_domainownership_validation` and `akamai_property_domainownership_domains` resources
13+
for specified domains and optionally validation scopes using the `export-domainownership` command.
14+
If a domain is not validated, it is exported as commented out in the `akamai_property_domainownership_validation` resource.
15+
16+
* PAPI
17+
* Modified the `export-property` command to generate `CCM` specific information for hostnames in the `akamai_property` resource.
18+
Additionally, for `CCM` related hostnames, the `akamai_edge_hostname` resource is not generated.
19+
* Added support for the new rule format `v2025-10-16`.
20+
21+
#### BUG FIXES:
22+
23+
* AppSec
24+
* Fixed an export of the `akamai_appsec_ip_geo` resource for the `asn_controls`, `geo_controls`, and `ip_controls` fields, which wasn't working correctly since Akamai Terraform 9.0.0.
25+
326
## 2.5.0 (Oct 15, 2025)
427

528
#### FEATURES/ENHANCEMENTS:

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ Global Flags:
148148
<li><a href="#exportappsec">export-appsec</a></li>
149149
<li><a href="#exportclientlist">export-clientlist</a></li>
150150
<li><a href="#export-cloudaccess">export-cloudaccess</a></li>
151+
<li><a href="#export-cloudcertificate">export-cloudcertificate</a></li>
151152
<li><a href="#exportcloudlets-policy">export-cloudlets-policy</a></li>
152153
<li><a href="#exportcloudwrapper">export-cloudwrapper</a></li>
153154
<li><a href="#exportcps">export-cps</a></li>
154155
<li><a href="#exportdomain">export-domain</a></li>
156+
<li><a href="#exportdomainownership">export-domainownership</a></li>
155157
<li><a href="#exportedgekv">export-edgekv</a></li>
156158
<li><a href="#exportedgeworker">export-edgeworker</a></li>
157159
<li><a href="#exportiam">export-iam</a></li>
@@ -280,6 +282,27 @@ akamai terraform export-cloudaccess 98765
280282
</tbody>
281283
</table>
282284

285+
## export-cloudcertificate
286+
287+
Export a Terraform configuration for your cloud certificate.
288+
289+
> **Note:**
290+
>
291+
> If the certificate is in the `READY_FOR_USE` or `ACTIVE` status, the `akamai_cloudcertificates_upload_signed_certificate` resource will also be included in your configuration.
292+
> If the certificate is in the `CSR_READY` status, the `akamai_cloudcertificates_upload_signed_certificate` resource will be generated but commented out.
293+
294+
### Syntax
295+
296+
```shell
297+
akamai [global flags] terraform export-cloudcertificate [command flags] <cloud_certificate_name>
298+
```
299+
300+
### Basic usage
301+
302+
```shell
303+
akamai terraform export-cloudcertificate "my-cloudcertificate"
304+
```
305+
283306
## export‑cloudlets-policy
284307

285308
Export a Terraform configuration for your cloudlet policy.
@@ -346,6 +369,29 @@ akamai [global flags] terraform export-domain [command flags] <domain>
346369
akamai terraform export-domain "my-domain"
347370
```
348371

372+
## export‑domainownership
373+
374+
Export a Terraform configuration for your domain ownership.
375+
376+
> **Notes:**
377+
> - Each domain with a validation scope must exist as an `FQDN` for the export to succeed.
378+
> - If a domain doesn't have a validation scope, it should match only one type: `HOST`, `DOMAIN`, or `WILDCARD`.
379+
> - Domains with a domain status other than `VALIDATED` are exported as commented out for the `akamai_property_domainownership_validation` resource.
380+
> - You can export up to 1000 domains at once.
381+
> - The names of the exported Terraform resources are taken from the first domain in the list. If that domain contains invalid characters, these characters are replaced with underscores in the resources’ names.
382+
383+
### Syntax
384+
385+
```shell
386+
akamai [global flags] terraform export-domainownership [command flags] <domain_name>[:validation_scope][,<domain_name>[:validation_scope]...]
387+
```
388+
389+
### Basic usage
390+
391+
```shell
392+
akamai terraform export-domainownership "my-domain:HOST,another-domain"
393+
```
394+
349395
## export‑edgekv
350396
351397
Export a Terraform configuration for your namespace and network's EdgeKV.
@@ -496,6 +542,7 @@ Export a Terraform configuration for your property along with its JSON-formatted
496542
>
497543
> - Certain export conditions require the use of a particular property rule format. Verify whether your rule format matches the use case requirement and [update your rule format](https://techdocs.akamai.com/terraform/docs/set-up-property-provisioning#update-rule-format) as needed.
498544
> - If the property you're exporting hasn't been activated on any networks, staging or production, the `akamai_property_activation` resource will still be included in your configuration but commented out. This is to avoid accidental activation. To activate the property, uncomment the `akamai_property_activation` resource and run `terraform apply`.
545+
> - The `akamai_edge_hostname` resource isn't generated for `CCM` related hostnames.
499546
500547
### Syntax
501548

cli.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"commands": [
66
{
77
"name": "terraform",
8-
"version": "2.5.0",
8+
"version": "2.6.0",
99
"description": "Export selected resources for faster adoption in Terraform",
1010
"bin": "https://github.com/akamai/cli-terraform/releases/download/v{{.Version}}/akamai-{{.Name}}-{{.Version}}-{{.OS}}{{.Arch}}{{.BinSuffix}}",
1111
"auto-complete": true,

cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
var (
1919
// Version holds current version of cli-terraform
20-
Version = "2.5.0"
20+
Version = "2.6.0"
2121
)
2222

2323
// Run initializes the cli and runs it

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/akamai/cli-terraform/v2
33
go 1.23.6
44

55
require (
6-
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.1.0
6+
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.2.0
77
github.com/akamai/cli/v2 v2.0.2
88
github.com/fatih/color v1.18.0
99
github.com/hashicorp/hcl/v2 v2.23.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
66
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
77
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
88
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
9-
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.1.0 h1:feVgyeLunm1eepTK9urvVpyhXCgEuSnfUxyYfMCtD0g=
10-
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.1.0/go.mod h1:Bf6hnZkloZnfL4I/gFGnMMMdMHiu/ERnSOWtFgnodDk=
9+
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.2.0 h1:nDx/0X2EkxwCGN/W9o+a6LcUrTRaDFFJ+7wxMoh4+lU=
10+
github.com/akamai/AkamaiOPEN-edgegrid-golang/v12 v12.2.0/go.mod h1:Bf6hnZkloZnfL4I/gFGnMMMdMHiu/ERnSOWtFgnodDk=
1111
github.com/akamai/cli/v2 v2.0.2 h1:gqjVTqN5lp3t5RjVVl+q7u+aW8YOZ4/kIYG0bg6Xhy8=
1212
github.com/akamai/cli/v2 v2.0.2/go.mod h1:5tLoIp57aX21plVEcI0TeYz6C54ek6zlPnIHhfe1YRk=
1313
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=

pkg/commands/commands.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import (
66
"github.com/akamai/cli-terraform/v2/pkg/providers/appsec"
77
"github.com/akamai/cli-terraform/v2/pkg/providers/clientlists"
88
"github.com/akamai/cli-terraform/v2/pkg/providers/cloudaccess"
9+
"github.com/akamai/cli-terraform/v2/pkg/providers/cloudcertificates"
910
"github.com/akamai/cli-terraform/v2/pkg/providers/cloudlets"
1011
"github.com/akamai/cli-terraform/v2/pkg/providers/cloudwrapper"
1112
"github.com/akamai/cli-terraform/v2/pkg/providers/cps"
1213
"github.com/akamai/cli-terraform/v2/pkg/providers/dns"
14+
"github.com/akamai/cli-terraform/v2/pkg/providers/domainownership"
1315
"github.com/akamai/cli-terraform/v2/pkg/providers/edgeworkers"
1416
"github.com/akamai/cli-terraform/v2/pkg/providers/gtm"
1517
"github.com/akamai/cli-terraform/v2/pkg/providers/iam"
@@ -104,6 +106,21 @@ func CommandLocator() []*cli.Command {
104106
},
105107
BashComplete: autocomplete.Default,
106108
},
109+
{
110+
Name: "export-cloudcertificate",
111+
Description: "Generates Terraform configuration for CCM (Cloud Certificate Manager) resources.",
112+
Usage: "export-cloudcertificate",
113+
ArgsUsage: "<certificate_name>",
114+
Action: validatedAction(cloudcertificates.CmdCreateCloudCertificate, requireValidWorkpath, requireNArguments(1)),
115+
Flags: []cli.Flag{
116+
&cli.StringFlag{
117+
Name: "tfworkpath",
118+
Usage: "Directory used to store files created when running commands.",
119+
DefaultText: "current directory",
120+
},
121+
},
122+
BashComplete: autocomplete.Default,
123+
},
107124
{
108125
Name: "export-cloudlets-policy",
109126
Description: "Generates Terraform configuration for Cloudlets Policy resources.",
@@ -164,6 +181,22 @@ func CommandLocator() []*cli.Command {
164181
},
165182
BashComplete: autocomplete.Default,
166183
},
184+
{
185+
Name: "export-domainownership",
186+
Description: "Generates Terraform configuration for Property Domain Ownership domains and validation resources.",
187+
Usage: "export-domainownership",
188+
ArgsUsage: "<domain_name>[:<validation_scope>][,<domain_name>[:<validation_scope>]...]",
189+
Action: validatedAction(domainownership.CmdCreateDomainOwnership, requireValidWorkpath,
190+
requireNArguments(1)),
191+
Flags: []cli.Flag{
192+
&cli.StringFlag{
193+
Name: "tfworkpath",
194+
Usage: "Directory used to store files created when running commands.",
195+
DefaultText: "current directory",
196+
},
197+
},
198+
BashComplete: autocomplete.Default,
199+
},
167200
{
168201
Name: "export-edgekv",
169202
Description: "Generates Terraform configuration for EdgeKV resources.",

pkg/providers/appsec/templates/modules-security-firewall.tmpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,45 @@ resource "akamai_appsec_ip_geo" "{{ $policyName }}" {
77
security_policy_id = akamai_appsec_ip_geo_protection.{{ $policyName}}.security_policy_id
88
{{ if eq .IPGeoFirewall.Block "blockAllTrafficExceptAllowedIPs" -}}
99
mode = "allow"
10+
{{ if .IPGeoFirewall.BlockAllAction -}}
11+
block_action = "{{ .IPGeoFirewall.BlockAllAction }}"
12+
{{ end -}}
1013
{{ else -}}
1114
mode = "block"
1215
{{ end -}}
1316
{{ if .IPGeoFirewall.ASNControls -}}
1417
{{ if .IPGeoFirewall.ASNControls.BlockedIPNetworkLists -}}
1518
{{ if .IPGeoFirewall.ASNControls.BlockedIPNetworkLists.NetworkList -}}
19+
asn_controls {
20+
{{ if .IPGeoFirewall.ASNControls.BlockedIPNetworkLists.Action -}}
21+
action = "{{ .IPGeoFirewall.ASNControls.BlockedIPNetworkLists.Action }}"
22+
{{ end -}}
1623
asn_network_lists = [{{ toList .IPGeoFirewall.ASNControls.BlockedIPNetworkLists.NetworkList }}]
24+
}
1725
{{ end -}}
1826
{{ end -}}
1927
{{ end -}}
2028
{{ if .IPGeoFirewall.GeoControls -}}
2129
{{ if .IPGeoFirewall.GeoControls.BlockedIPNetworkLists -}}
2230
{{ if .IPGeoFirewall.GeoControls.BlockedIPNetworkLists.NetworkList -}}
31+
geo_controls {
32+
{{ if .IPGeoFirewall.GeoControls.BlockedIPNetworkLists.Action -}}
33+
action = "{{ .IPGeoFirewall.GeoControls.BlockedIPNetworkLists.Action }}"
34+
{{ end -}}
2335
geo_network_lists = [{{ toList .IPGeoFirewall.GeoControls.BlockedIPNetworkLists.NetworkList }}]
36+
}
2437
{{ end -}}
2538
{{ end -}}
2639
{{ end -}}
2740
{{ if .IPGeoFirewall.IPControls -}}
2841
{{ if .IPGeoFirewall.IPControls.BlockedIPNetworkLists -}}
2942
{{ if .IPGeoFirewall.IPControls.BlockedIPNetworkLists.NetworkList -}}
43+
ip_controls {
44+
{{ if .IPGeoFirewall.IPControls.BlockedIPNetworkLists.Action -}}
45+
action = "{{ .IPGeoFirewall.IPControls.BlockedIPNetworkLists.Action }}"
46+
{{ end -}}
3047
ip_network_lists = [{{ toList .IPGeoFirewall.IPControls.BlockedIPNetworkLists.NetworkList }}]
48+
}
3149
{{ end -}}
3250
{{ end -}}
3351
{{ if .IPGeoFirewall.IPControls.AllowedIPNetworkLists -}}

pkg/providers/appsec/testdata/ase-apr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3425,6 +3425,7 @@
34253425
"block": "blockSpecificIPGeo",
34263426
"ipControls": {
34273427
"blockedIPNetworkLists": {
3428+
"action": "deny",
34283429
"networkList": [
34293430
"118736_TFDEMOLISTATUL"
34303431
]

pkg/providers/appsec/testdata/ase-apr/modules/security/firewall.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ resource "akamai_appsec_ip_geo" "default_policy" {
33
config_id = local.config_id
44
security_policy_id = akamai_appsec_ip_geo_protection.default_policy.security_policy_id
55
mode = "block"
6-
ip_network_lists = ["118736_TFDEMOLISTATUL"]
6+
ip_controls {
7+
action = "deny"
8+
ip_network_lists = ["118736_TFDEMOLISTATUL"]
9+
}
710
}
811

0 commit comments

Comments
 (0)