terraform-provider-oci
terraform-provider-oci copied to clipboard
`always_free` example fails out of the box
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
1.6.4
Affected Resource(s)
affected_resources = tls_self_signed_cert
Terraform Configuration Files
https://github.com/oracle/terraform-provider-oci/blob/master/examples/always_free/main.tf
resource "tls_self_signed_cert" "example" {
key_algorithm = "ECDSA"
private_key_pem = tls_private_key.example.private_key_pem
subject {
organization = "Oracle"
country = "US"
locality = "Austin"
province = "TX"
}
validity_period_hours = 8760 # 1 year
allowed_uses = [
"key_encipherment",
"digital_signature",
"server_auth",
"client_auth",
"cert_signing"
]
is_ca_certificate = true
}
Expected Behavior
I'd expect the always_free
example to work out of the box.
Actual Behavior
When you use the code as written, you get this error:
╷
│ Error: Invalid Configuration for Read-Only Attribute
│
│ with tls_self_signed_cert.example,
│ on main.tf line 301, in resource "tls_self_signed_cert" "example":
│ 301: key_algorithm = "ECDSA"
│
│ Cannot set value for this attribute as the provider has marked it as
│ read-only. Remove the configuration line setting the value.
│
│ Refer to the provider documentation or contact the provider developers for
│ additional information about configurable and read-only attributes that are
│ supported.
╵
Steps to Reproduce
-
terraform apply
Important Factoids
The error goes away when I comment out the line.
References
https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/self_signed_cert#cert_pem