Skip to content

Commit

Permalink
Terraform 1.6.x não permite chamada de função dentro de um arquivo de
Browse files Browse the repository at this point in the history
teste
  • Loading branch information
daltonmatos committed Oct 15, 2024
1 parent 6288db8 commit 60f3e5f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
29 changes: 24 additions & 5 deletions tests/CustomResourceDefinition.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,30 @@ run "can_parse_crd_v1alpha2" {

variables {
path = "./tests/fixtures/user.gcp.iam.crd_with_default_value_boolean_v1alpha2.yml"
manifest = yamldecode(
file(
"./tests/fixtures/user.gcp.iam.crd_with_default_value_boolean_v1alpha2.yml"
)
)
manifest = {
"apiVersion" = "tf-gapi.lukerops.com/v1alpha2"
"kind" = "CustomResourceDefinition"
"metadata" = {
"name" = "user.gcp.iam"
}
"spec" = {
"group" = "gcp.iam"
"kind" = "User"
"versions" = [
{
"name" = "v1alpha2"
"specSchema" = {
"properties" = {
"email" = {
"type" = "string"
}
}
"type" = "object"
}
},
]
}
}
}

assert {
Expand Down
14 changes: 14 additions & 0 deletions tests/fixtures/crd_v1alpha2_simple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: tf-gapi.lukerops.com/v1alpha2
kind: CustomResourceDefinition
metadata:
name: user.gcp.iam
spec:
group: gcp.iam
kind: User
versions:
- name: v1alpha2
specSchema:
type: object
properties:
email:
type: string

0 comments on commit 60f3e5f

Please sign in to comment.