akamai / terraform-provider-akamai

Terraform Akamai provider

Home Page:https://www.terraform.io/docs/providers/akamai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DXE-3283 Using akamai_appsec_ip_geo resource without explicitly setting ukraine_geo_control_action always produces a diff

stigok opened this issue · comments

Running plan for a akamai_appsec_ip_geo resource without explicitly setting ukraine_geo_control_action to "none" always produces a diff.

Terraform Version

Terraform v1.6.1
on linux_amd64
+ provider registry.terraform.io/akamai/akamai v5.3.0

Affected Resource(s)

  • akamai_appsec_ip_geo

Terraform Configuration Files

resource "akamai_appsec_ip_geo_protection" "web-services" {
  config_id          = akamai_appsec_configuration.web-services.config_id
  security_policy_id = akamai_appsec_security_policy.web-services.security_policy_id
  enabled            = true
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

No diff produced

Actual Behavior

  # akamai_appsec_ip_geo.web-services will be updated in-place
  ~ resource "akamai_appsec_ip_geo" "web-services" {
        id                         = "redacted"
      - ukraine_geo_control_action = "none" -> null
        # (6 unchanged attributes hidden)
    }

Steps to Reproduce

  1. terraform apply

Important Factoids

N/A

References

N/A

Hello @stigok
Thank you for opening the issue. We have some difficulties with recreating your bug. Your issue is about resource "akamai_appsec_ip_geo", but in terraform config you mentioned about resource "akamai_appsec_ip_geo_protection".
Could you please provide whole necessary config to reproduce your case?

Best regards,
Pawel

I too have the same issue with ukraine_geo_control_action.

Where the "resource "akamai_appsec_ip_geo" "ipGeo" {" resource does not declare ukraine_geo_control_action will result in a diff in terraform plan

Here's sample code:
resource "akamai_appsec_ip_geo" "ipGeo" {
config_id = var.configId
security_policy_id = akamai_appsec_ip_geo_protection.ipGeoProtection.security_policy_id
mode = block
geo_network_lists = var.geoNetworkLists
ip_network_lists = var.ipNetworkLists
exception_ip_network_lists = var.exceptionIpNetworkLists
}

Terraform plan code:
~ resource "akamai_appsec_ip_geo" "ipGeo" {
id = "1234:xxxx"
- ukraine_geo_control_action = "none" -> null
# (6 unchanged attributes hidden)
}

Hello @BAu0002 ,

thank you for your update and terraform code. I was able to reproduce this issue.
We will inform you about any progress.

Thanks,
Pawel

This issue should be fixed with recent release.