v3.0.1 (#2809)
Some checks failed
build / Detect Go toolchain version (push) Has been cancelled
build / Parse version file (push) Has been cancelled
Check examples / check (1.10.5) (push) Has been cancelled
Check examples / check (1.11.4) (push) Has been cancelled
Check examples / check (1.12.1) (push) Has been cancelled
Check examples / check (1.6.6) (push) Has been cancelled
Check examples / check (1.7.5) (push) Has been cancelled
Check examples / check (1.8.5) (push) Has been cancelled
Check examples / check (1.9.8) (push) Has been cancelled
Essential checkers and linters / checkers-and-linters (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
HashiCorp Copywrite / copywrite (push) Has been cancelled
Unit Tests / unit_test (push) Has been cancelled
build / generate-metadata-file (push) Has been cancelled
build / upload-terraform-registry-manifest-artifact (push) Has been cancelled
build / Go darwin 386 build (push) Has been cancelled
build / Go freebsd 386 build (push) Has been cancelled
build / Go linux 386 build (push) Has been cancelled
build / Go windows 386 build (push) Has been cancelled
build / Go darwin amd64 build (push) Has been cancelled
build / Go freebsd amd64 build (push) Has been cancelled
build / Go linux amd64 build (push) Has been cancelled
build / Go windows amd64 build (push) Has been cancelled
build / Go freebsd arm build (push) Has been cancelled
build / Go linux arm build (push) Has been cancelled
build / Go darwin arm64 build (push) Has been cancelled
build / Go linux arm64 build (push) Has been cancelled
build / What's next? (push) Has been cancelled

HOTFIX missing schema attribute in `kubernetes_service_v1` datasource.
This commit is contained in:
John Houston 2025-12-08 15:01:48 -07:00 committed by GitHub
parent 3bec39dbbc
commit 8309126c96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 66 additions and 5 deletions

View file

@ -11,7 +11,7 @@ on:
default: 2
clusterVersion:
description: The EKS cluster version
default: 1.27
default: 1.34
nodesPerAz:
description: The number of cluster nodes in each AZ
default: 1
@ -26,7 +26,7 @@ on:
default: "^TestAcc"
terraformVersion:
description: Terraform version
default: 1.12.0
default: 1.14.0
schedule:
- cron: '0 20 * * *'
@ -34,10 +34,10 @@ env:
AWS_REGION: ${{ github.event.inputs.region || 'ca-central-1' }}
KUBE_CONFIG_PATH: ${{ github.workspace }}/kubernetes/test-infra/eks/kubeconfig
PARALLEL_RUNS: ${{ github.event.inputs.parallelRuns || '8' }}
TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || '1.12.0' }}
TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || '1.14.0' }}
TF_VAR_az_span: ${{ github.event.inputs.azSpan || '2' }}
TF_VAR_capacity_type: ${{ 'SPOT' }}
TF_VAR_cluster_version: ${{ github.event.inputs.clusterVersion || '1.29' }}
TF_VAR_cluster_version: ${{ github.event.inputs.clusterVersion || '1.34' }}
TF_VAR_nodes_per_az: ${{ github.event.inputs.nodesPerAz || '1' }}
TF_VAR_instance_type: ${{ github.event.inputs.instanceType || 'm7g.large' }}

View file

@ -1,3 +1,10 @@
## 3.0.1 (Dec 5, 2025)
HOTFIX:
* Fix missing `ip_mode` attribute in `kubernetes_service_v1` data source. [[GH-2807](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2807)]
## 3.0.0 (Dec 3, 2025)
ENHANCEMENTS:

View file

@ -227,6 +227,10 @@ func dataSourceKubernetesServiceV1(deprecationMessage string) *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"ip_mode": {
Type: schema.TypeString,
Computed: true,
},
"hostname": {
Type: schema.TypeString,
Computed: true,

View file

@ -103,6 +103,56 @@ func TestAccKubernetesDataSourceServiceV1_not_found(t *testing.T) {
})
}
func TestAccKubernetesDataSourceServiceV1_loadBalancer_ipMode(t *testing.T) {
name := acctest.RandomWithPrefix("tf-acc-test")
datasourceName := "data.kubernetes_service_v1.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); skipIfNoLoadBalancersAvailable(t) },
IDRefreshIgnore: []string{"metadata.0.resource_version"},
ProviderFactories: testAccProviderFactories,
CheckDestroy: testAccCheckKubernetesServiceV1Destroy,
Steps: []resource.TestStep{
{
Config: testAccKubernetesConfig_ignoreAnnotations() +
testAccKubernetesDataSourceServiceV1Config_loadBalancer_ipMode(name),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(datasourceName, "metadata.0.name", name),
resource.TestCheckResourceAttr(datasourceName, "status.0.load_balancer.0.ingress.0.ip_mode", ""),
),
},
},
})
}
func testAccKubernetesDataSourceServiceV1Config_loadBalancer_ipMode(name string) string {
return fmt.Sprintf(`
resource "kubernetes_service_v1" "test" {
metadata {
name = "%s"
}
spec {
type = "LoadBalancer"
selector = {
app = "test-app"
}
port {
port = 80
target_port = 80
}
}
wait_for_load_balancer = true
}
data "kubernetes_service_v1" "test" {
metadata {
name = "${kubernetes_service_v1.test.metadata.0.name}"
}
}
`, name)
}
func testAccKubernetesDataSourceServiceV1_basic(name string) string {
return fmt.Sprintf(`resource "kubernetes_service_v1" "test" {
metadata {

View file

@ -1 +1 @@
3.0.0
3.0.1