-
Notifications
You must be signed in to change notification settings - Fork 118
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
Remove unnecessary ID field #218
Conversation
Hi @guineveresaenger 👋 Thank you for submitting this. While I'm not intimately familiar with To get the schema information via the Terraform CLI command, a placeholder configuration can be used, such as: terraform {
required_providers {
random = {
source = "hashicorp/random"
}
}
} Then the following commands executed: terraform init
terraform providers schema -json For example, {
"version": 0,
"block": {
"attributes": {
"b64_std": {
"type": "string",
"description": "The generated id presented in base64 without additional transformations.",
"description_kind": "markdown",
"computed": true
},
"b64_url": {
"type": "string",
"description": "The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`.",
"description_kind": "markdown",
"computed": true
},
"byte_length": {
"type": "number",
"description": "The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.",
"description_kind": "markdown",
"required": true
},
"dec": {
"type": "string",
"description": "The generated id presented in non-padded decimal digits.",
"description_kind": "markdown",
"computed": true
},
"hex": {
"type": "string",
"description": "The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length.",
"description_kind": "markdown",
"computed": true
},
"id": {
"type": "string",
"description": "The generated id presented in base64 without additional transformations or prefix.",
"description_kind": "markdown",
"computed": true
},
"keepers": {
"type": [
"map",
"string"
],
"description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider documentation](../index.html) for more information.",
"description_kind": "markdown",
"optional": true
},
"prefix": {
"type": "string",
"description": "Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.",
"description_kind": "markdown",
"optional": true
}
},
"description": "\nThe resource `random_id` generates random numbers that are intended to be\nused as unique identifiers for other resources.\n\nThis resource *does* use a cryptographic random number generator in order\nto minimize the chance of collisions, making the results of this resource\nwhen a 16-byte identifier is requested of equivalent uniqueness to a\ntype-4 UUID.\n\nThis resource can be used in conjunction with resources that have\nthe `create_before_destroy` lifecycle flag set to avoid conflicts with\nunique names during the brief period where both the old and new resources\nexist concurrently.\n",
"description_kind": "markdown"
}
} In addition with this change, the description information is intentionally defined as part of the schema to provide practitioners with details about the expected contents of the attribute value, which is output into the automatically generated documentation for the resource. Removing it means the provider documentation is less useful and we could never provide any guarantees that it would not be reintroduced, since it is generally useful for practitioners. We anticipate this type of schema description information to become more prevalent in other providers (especially for Given all this, I'm going to close this out since its not a change we would be willing to accept. Thanks again for raising this though. |
Just to add a little extra here - the addition of an Id field is superfluous. I understand that it's specific to the Pulumi schema but it's not needed as it's part of d.setId and is actually a Hangup of the change to that ecosystem As a former member of the tf ecosystem, I don't see why this PR wouldn't be merged - I can fork the provider and use that going forward thanks, to the fact that the ecosystem is so extendable I thank you for the time you gave here @bflad |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
The Terraform Plugin SDK already adds an ID to the schema, so this field is now unnecessary.
It causes the pulumi schema to pull a duplicate argument.
see also: cloudflare/terraform-provider-cloudflare#1504