akamai / terraform-provider-akamai

Terraform Akamai provider
https://www.terraform.io/docs/providers/akamai/
Mozilla Public License 2.0
110 stars 99 forks source link

Error when using uppercase for edge_hostname #330

Closed isss802 closed 2 years ago

isss802 commented 2 years ago

Hi there,

Terraform Version

 terraform -v
Terraform v1.2.5
on darwin_amd64
+ provider registry.terraform.io/akamai/akamai v2.2.0

Affected Resource(s)

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

terraform {
  required_providers {
    akamai = {
      source  = "akamai/akamai"
      version = "2.2.0"
    }
  }
}

provider "akamai" {
  edgerc = "~/.edgerc"
  config_section = "default"
}

# Use of uppercase letters results in an error.
variable "edge_hostname" {
    default = "test-ISSS802.edgesuite.net"
}

variable "group_name" {
  default = "hogehoge"
}

data "akamai_contract" "default" {
  group_name = var.group_name
}

data "akamai_group" "default" {
  name        = var.group_name
  contract_id = data.akamai_contract.default.id
}

resource "akamai_edge_hostname" "default" {
  product_id    = "prd_Site_Accel"
  group_id      = data.akamai_contract.default.group_id
  contract_id   = data.akamai_contract.default.id
  edge_hostname = var.edge_hostname
  ip_behavior   = "IPV4"
}

Panic Output

akamai_edge_hostname.default: Creating...
akamai_edge_hostname.default: Still creating... [10s elapsed]
╷
│ Error: unable to find edge hostname: test-ISSS802.edgesuite.net
│
│   with akamai_edge_hostname.default,
│   on akamai.tf line 32, in resource "akamai_edge_hostname" "default":
│   32: resource "akamai_edge_hostname" "default" {

Expected Behavior

If edge_hostname is apply with upper case, it is converted to lower case and created. There is an error due to a difference between upper and lower case letters. Improvements such as not accepting capital letters. Or avoid generating errors.

Actual Behavior

Using uppercase letters in edge_hostname causes an error.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. terraform plan

Important Factoids

nothing in particular

References

mgwoj commented 2 years ago

Hello @isss802 ,

Thank you for reporting this problem. We are confirming that this is something which should be fixed.

Thanks, Michal

isss802 commented 2 years ago

Hi @mgwoj

When will it be fixed?

lkowalsk-akamai-com commented 2 years ago

Hi @isss802, cannot share any dates yet, but most problaby it will be fixed still in Q3.

lkowalsk-akamai-com commented 2 years ago

Hi @isss802 this issue should be fixed now. Please reopen if it still occurs.