Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubernetes_horizontal_pod_autoscaler_v2beta2: containerResource not support #1637

Closed
Kubendiran opened this issue Mar 11, 2022 · 2 comments · Fixed by #1647
Closed

kubernetes_horizontal_pod_autoscaler_v2beta2: containerResource not support #1637

Kubendiran opened this issue Mar 11, 2022 · 2 comments · Fixed by #1647
Assignees

Comments

@Kubendiran
Copy link

Terraform Version, Provider Version and Kubernetes Version

Terraform version:1.1.7
Kubernetes provider version: v2.8.0
Kubernetes version:1.21

Affected Resource(s)

kubernetes_horizontal_pod_autoscaler_v2beta2

Terraform Configuration Files

resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "spooler" {
  metadata {
    name = "test-hpa"
    namespace = "testing"
  }
  spec {
    min_replicas = 2
    max_replicas = 4
    scale_target_ref {
      kind = "Deployment"
      name = "test-deployment"
    }
    metric {
      type = "ContainerResource"
      ContainerResource {
          name = "memory"
          container = "test-container"
          target {
            type  = "Utilization"
            average_utilization = "70"
        }
      }
    }
  }
}

Debug Output

│ Error: Unsupported block type
│ 
│   on modules/myusage/hpa.tf line 15, in resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "spooler":
│   15:       ContainerResource {
│ 
│ Blocks of type "ContainerResource" are not expected here.

Panic Output

Steps to Reproduce

terraform apply

Expected Behavior

What should have happened?

should plan to create the HPA resource

Actual Behavior

What actually happened?

│ Error: Unsupported block type
│ 
│   on modules/myusage/hpa.tf line 15, in resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "spooler":
│   15:       ContainerResource {
│ 
│ Blocks of type "ContainerResource" are not expected here.
@arybolovlev
Copy link
Contributor

Hi @Kubendiran,

Thank you for reporting this issue. The fix is ready and I am going to merge it into the main branch. It will be available in the upcoming release. Please keep an eye on the release notes.

Thank you!

@arybolovlev arybolovlev linked a pull request Mar 30, 2022 that will close this issue
2 tasks
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants