Skip to content
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

tls_self_signed_cert and tls_cert_request handle unset street_address differently between first and second plan #175

Closed
1 task done
detro opened this issue Mar 29, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@detro
Copy link
Contributor

detro commented Mar 29, 2022

Terraform CLI and Provider Versions

1.1.x

Terraform Configuration

resource "tls_private_key" "example" {
  algorithm   = "ECDSA"
  ecdsa_curve = "P384"
}

resource "tls_self_signed_cert" "example" {
  key_algorithm   = "ECDSA"
  private_key_pem = tls_private_key.example.private_key_pem

  subject {
    common_name  = "example.com"
    organization = "ACME Examples, Inc"
  }

  validity_period_hours = 12

  allowed_uses = [
    "key_encipherment",
    "digital_signature",
    "server_auth",
  ]
}

output "algorithm" {
  value = tls_self_signed_cert.example.key_algorithm
}

Expected Behavior

  1. plan and apply: Resources created.
  2. plan and apply again, without any change: No changes.

Actual Behavior

  1. plan and apply: Resources created.
  • the value of street_address in the plan is null
  1. plan: reports a changes made outside of Terraform since the last "terraform apply" and indicates that ~subject { street_address = [] ... has changed and will be applied
  2. apply: change is reconsiled
  • the value of street_address in the plan is now []

Steps to Reproduce

  1. terraform plan
  2. terraform apply
  3. terraform plan

How much impact is this issue causing?

Low

Logs

No response

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@detro detro added the bug label Mar 29, 2022
@detro detro self-assigned this Mar 29, 2022
@detro detro added this to the v4.0.0 milestone Apr 6, 2022
@detro detro modified the milestones: next.major, next.minor Apr 28, 2022
@detro
Copy link
Contributor Author

detro commented May 11, 2022

This is caused by a known issue/existing behaviour in terraform-plugin-sdk: addressing it will probably require work on that, and will likely break compatibility with existing configurations and code, that rely on this behaviour now.

Punting.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant