Skip to content

Commit

Permalink
Default go version set to 1.21
Browse files Browse the repository at this point in the history
Bump up hashicorp/null version to 3.2.2

Signed-off-by: Chuan-Yen Chiang <[email protected]>
  • Loading branch information
cychiang committed Jul 30, 2024
1 parent b377c0a commit e4a90f7
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TERRAFORM_VERSION_VALID := $(shell [ "$(TERRAFORM_VERSION)" = "`printf "$(TERRAF

export TERRAFORM_PROVIDER_SOURCE ?= hashicorp/null
export TERRAFORM_PROVIDER_REPO ?= https://github.com/hashicorp/terraform-provider-null
export TERRAFORM_PROVIDER_VERSION ?= 3.1.0
export TERRAFORM_PROVIDER_VERSION ?= 3.2.2
export TERRAFORM_PROVIDER_DOWNLOAD_NAME ?= terraform-provider-null
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX ?= https://releases.hashicorp.com/$(TERRAFORM_PROVIDER_DOWNLOAD_NAME)/$(TERRAFORM_PROVIDER_VERSION)
export TERRAFORM_NATIVE_PROVIDER_BINARY ?= terraform-provider-null_v3.1.0_x5
Expand Down Expand Up @@ -44,7 +44,7 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_REQUIRED_VERSION ?= 1.19
GO_REQUIRED_VERSION ?= 1.21
GOLANGCILINT_VERSION ?= 1.54.0
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
Expand Down
7 changes: 6 additions & 1 deletion apis/null/v1alpha1/zz_resource_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions config/provider-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: hashicorp/null
resources:
null_resource:
subCategory: ""
description: The null_resource resource implements the standard resource lifecycle but takes no further action. The triggers argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.
description: The null_resource resource implements the standard resource lifecycle but takes no further action. On Terraform 1.4 and later, use the terraform_data resource type https://developer.hashicorp.com/terraform/language/resources/terraform-data instead. The triggers argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.
name: null_resource
title: null_resource Resource - terraform-provider-null
examples:
Expand All @@ -11,26 +11,30 @@ resources:
{
"connection": [
{
"host": "${element(aws_instance.cluster.*.public_ip, 0)}"
"host": "${element(aws_instance.cluster[*].public_ip, 0)}"
}
],
"provisioner": {
"remote-exec": [
{
"inline": [
"bootstrap-cluster.sh ${join(\" \", aws_instance.cluster.*.private_ip)}"
"bootstrap-cluster.sh ${join(\" \",\n aws_instance.cluster[*].private_ip)}"
]
}
]
},
"triggers": {
"cluster_instance_ids": "${join(\",\", aws_instance.cluster.*.id)}"
"cluster_instance_ids": "${join(\",\", aws_instance.cluster[*].id)}"
}
}
dependencies:
aws_instance.cluster: |-
{
"count": 3
"ami": "ami-0dcc1e21636832c5d",
"count": 3,
"instance_type": "m5.large"
}
argumentDocs: {}
argumentDocs:
id: (String) This is set to a random value at create time.
triggers: (Map of String) A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
importStatements: []
2 changes: 1 addition & 1 deletion config/schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"format_version":"1.0","provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description":"This is set to a random value at create time.","description_kind":"markdown","computed":true},"triggers":{"type":["map","string"],"description":"A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.","description_kind":"markdown","optional":true}},"description":"The `null_resource` resource implements the standard resource lifecycle but takes no further action.\n\nThe `triggers` argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.","description_kind":"markdown"}}},"data_source_schemas":{"null_data_source":{"version":0,"block":{"attributes":{"has_computed_default":{"type":"string","description":"If set, its literal value will be stored and returned. If not, its value defaults to `\"default\"`. This argument exists primarily for testing and has little practical use.","description_kind":"markdown","optional":true,"computed":true},"id":{"type":"string","description":"This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.","description_kind":"markdown","deprecated":true,"computed":true},"inputs":{"type":["map","string"],"description":"A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.","description_kind":"markdown","optional":true},"outputs":{"type":["map","string"],"description":"After the data source is \"read\", a copy of the `inputs` map.","description_kind":"markdown","computed":true},"random":{"type":"string","description":"A random value. This is primarily for testing and has little practical use; prefer the [hashicorp/random provider](https://registry.terraform.io/providers/hashicorp/random) for more practical random number use-cases.","description_kind":"markdown","computed":true}},"description":"The `null_data_source` data source implements the standard data source lifecycle but does not\ninteract with any external APIs.\n\nHistorically, the `null_data_source` was typically used to construct intermediate values to re-use elsewhere in configuration. The\nsame can now be achieved using [locals](https://www.terraform.io/docs/language/values/locals.html).\n","description_kind":"markdown","deprecated":true}}}}}}
{"format_version":"1.0","provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description":"This is set to a random value at create time.","description_kind":"plain","computed":true},"triggers":{"type":["map","string"],"description":"A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.","description_kind":"plain","optional":true}},"description":"The `null_resource` resource implements the standard resource lifecycle but takes no further action. On Terraform 1.4 and later, use the [terraform_data resource type](https://developer.hashicorp.com/terraform/language/resources/terraform-data) instead.\n\nThe `triggers` argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.","description_kind":"plain"}}},"data_source_schemas":{"null_data_source":{"version":0,"block":{"attributes":{"has_computed_default":{"type":"string","description":"If set, its literal value will be stored and returned. If not, its value defaults to `\"default\"`. This argument exists primarily for testing and has little practical use.","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description":"This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.","description_kind":"plain","deprecated":true,"computed":true},"inputs":{"type":["map","string"],"description":"A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.","description_kind":"plain","optional":true},"outputs":{"type":["map","string"],"description":"After the data source is \"read\", a copy of the `inputs` map.","description_kind":"plain","computed":true},"random":{"type":"string","description":"A random value. This is primarily for testing and has little practical use; prefer the [hashicorp/random provider](https://registry.terraform.io/providers/hashicorp/random) for more practical random number use-cases.","description_kind":"plain","computed":true}},"description":"The `null_data_source` data source implements the standard data source lifecycle but does not\ninteract with any external APIs.\n\nHistorically, the `null_data_source` was typically used to construct intermediate values to re-use elsewhere in configuration. The\nsame can now be achieved using [locals](https://developer.hashicorp.com/terraform/language/values/locals) or the [terraform_data resource type](https://developer.hashicorp.com/terraform/language/resources/terraform-data) in Terraform 1.4 and later.","description_kind":"plain","deprecated":true}}}}}}
8 changes: 5 additions & 3 deletions examples-generated/null/v1alpha1/resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ metadata:
spec:
forProvider:
connection:
- host: ${element(aws_instance.cluster.*.public_ip, 0)}
- host: ${element(aws_instance.cluster[*].public_ip, 0)}
provisioner:
remote-exec:
- inline:
- bootstrap-cluster.sh ${join(" ", aws_instance.cluster.*.private_ip)}
- |-
bootstrap-cluster.sh ${join(" ",
aws_instance.cluster[*].private_ip)}
triggers:
cluster_instance_ids: ${join(",", aws_instance.cluster.*.id)}
cluster_instance_ids: ${join(",", aws_instance.cluster[*].id)}
24 changes: 13 additions & 11 deletions package/crds/null.template.upbound.io_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
openAPIV3Schema:
description: Resource is the Schema for the Resources API. The null_resource
resource implements the standard resource lifecycle but takes no further
action. The triggers argument allows specifying an arbitrary set of values
that, when changed, will cause the resource to be replaced.
action.hashicorp. The triggers argument allows specifying an arbitrary set
of values that, when changed, will cause the resource to be replaced.
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -78,9 +78,9 @@ spec:
triggers:
additionalProperties:
type: string
description: A map of arbitrary strings that, when changed, will
force the null resource to be replaced, re-running any associated
provisioners.
description: |-
running any associated provisioners.
A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
type: object
x-kubernetes-map-type: granular
type: object
Expand All @@ -100,9 +100,9 @@ spec:
triggers:
additionalProperties:
type: string
description: A map of arbitrary strings that, when changed, will
force the null resource to be replaced, re-running any associated
provisioners.
description: |-
running any associated provisioners.
A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
type: object
x-kubernetes-map-type: granular
type: object
Expand Down Expand Up @@ -279,13 +279,15 @@ spec:
atProvider:
properties:
id:
description: (String) This is set to a random value at create
time.
type: string
triggers:
additionalProperties:
type: string
description: A map of arbitrary strings that, when changed, will
force the null resource to be replaced, re-running any associated
provisioners.
description: |-
running any associated provisioners.
A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
type: object
x-kubernetes-map-type: granular
type: object
Expand Down

0 comments on commit e4a90f7

Please sign in to comment.