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

boundary_alias_target does not propagate authorize_session_host_id #621

Open
the-maldridge opened this issue Aug 29, 2024 · 1 comment
Open
Labels

Comments

@the-maldridge
Copy link

Terraform Version

$ terraform version
Terraform v1.9.4-dev
on linux_amd64
+ provider registry.terraform.io/hashicorp/boundary v1.1.15
+ provider registry.terraform.io/hashicorp/http v3.4.3

Affected Resource(s)

  • boundary_alias_target

Terraform Configuration Files

resource "boundary_alias_target" "example_ssh" {
  for_each = boundary_host_static.example_all

  name                      = "ssh_alias_${each.key}"
  description               = ""
  scope_id                  = "global"
  value                     = "${each.key}.boundary"
  destination_id            = boundary_target.example_ssh.id
  authorize_session_host_id = each.value.id
}

Debug Output

https://gist.github.com/the-maldridge/c0ef3c88a0a235d2680077315d206128

Panic Output

N/A

Expected Behavior

Terraform should have reconciled the authorize_session_id for each alias in the set.

Actual Behavior

Terraform did not reconcile the host ID and instead the ID was left blank.

Steps to Reproduce

  1. Prepare a boundary environment. My test environment is currently v0.17.0+ent.
  2. Apply terraform to create scopes, host catalogs, host sets, and targets.
  3. Attempt to create aliases that are pinned to specific host IDs.

Important Factoids

My host sources are being dynamically interpolated to terraform via an API call to a remote DCIM provider, but are otherwise static.

References

@mikemountain
Copy link
Contributor

Hi @the-maldridge, I'm trying to reproduce this but I'm having a bit of trouble.

If you're still getting this error, can you confirm that the values in boundary_host_static.example_all match what you expect them to be?

I applied a terraform plan copied from our repo here along with the following, and it resulted in a filled-out authorize_session_host_id field, so I'd like to verify all the information.

resource "boundary_alias_target" "backend_servers_service_alias" {
  for_each = boundary_host_static.backend_servers
  name                      = "tcp_alias_${each.key}"
  description               = "tcp_alias ${each.key}"
  scope_id                  = "global"
  value                     = "${each.key}.boundary"
  destination_id            = boundary_target.backend_servers_service.id
  authorize_session_host_id = each.value.id
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants