terraform-provider-akamai
terraform-provider-akamai copied to clipboard
Activation fails with http status 409 "ARL file/version exist"
The problem
Occasionally, when activating a property, activation fails with a http 409 status error: "ARL file/version exist".
This happens in multiple projects. It's worth noting that:
- We apply staging and production activations at same time (keeping everything updated to current code revision)
- This seems only to occur with the production activations
- It's a rare occurence. Activating staging and production at the same time most of the time works.
- It's temporary. Repeat plan/apply succesfully activates production (note that staging then typically was activated in the first attempt)
There seems to be no mentions of this error at https://developer.akamai.com/api/core_features/property_manager/v1.html#errors
This might very well be something internal to Akamai PAPI, so out of scope of the Terraform module. On the other hand, it might be caused by how the TF module does certain things, or might be mitigated in some way. If there's more appropriate channels to send this issue to then please let me know.
Terraform Version
Terraform: 0.13.7 Akamai provider: 1.8.0
Affected Resource(s)
- akamai_property_activation
Terraform Configuration Files
# Both staging_enable_activation and production_enable_activation are set to true
resource "akamai_property_activation" "staging_activation" {
count = var.staging_enable_activation ? 1 : 0
depends_on = [akamai_property.property]
property_id = akamai_property.property.id
contact = var.contact
version = local.staging_version_to_activate
network = "STAGING"
}
resource "akamai_property_activation" "production_activation" {
count = var.production_enable_activation ? 1 : 0
depends_on = [akamai_property.property]
property_id = akamai_property.property.id
contact = var.contact
version = local.production_version_to_activate
network = "PRODUCTION"
}
Debug Output
TF apply output (values anonymized):
Error: create activation failed: creating activation: API error:
{
"type": "https://problems.luna.akamaiapis.net/papi/v0/arlfile-version-exist",
"title": "ARL file/version exist",
"detail": "A file version already exists, or the file is locked by a concurrent transaction. Please try again.",
"instance": "https://<code>.luna.akamaiapis.net/papi/v1/properties/prp_<id>/activations#<some-hash>",
"statusCode": 409
}
Expected Behavior
Property being activated on production
Actual Behavior
Property version not activated
Steps to Reproduce
Rare occurrence. No reproducable pattern found.
Hi @TBeijen This issue has been acknolwledged by team working on PAPI (Provisioning API). At this point I cannot share any details about a date of fix. I will update this ticket once I have additional information.
Hi @TBeijen, this issue should be addressed now on the API level. Let us know if you experience it again.