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

ec_deployments filter by name-prefix doesn't work with hyphens #239

Closed
3 tasks
oscarmorasu opened this issue Feb 13, 2021 · 1 comment · Fixed by #241
Closed
3 tasks

ec_deployments filter by name-prefix doesn't work with hyphens #239

oscarmorasu opened this issue Feb 13, 2021 · 1 comment · Fixed by #241
Assignees
Labels
bug Something isn't working

Comments

@oscarmorasu
Copy link

Readiness Checklist

  • [ x ] I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I am reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

Given I have multiple Deployments with a hyphenated prefix myorg-:

myorg-cluster-dev
myorg-cluster-prod
myorg-monitoring

I should be able to find the Deployment called myorg-monitoring with this name_prefix filter:

data "ec_deployments" "example" {
  name_prefix = "myorg-monitoring"
}

Current Behavior

The ec_deployments data source doesn't find any Deployments if the name-prefix filter contains hyphens

## Terraform definition

data "ec_deployments" "example" {
  name_prefix = "myorg-monitoring"
}

Possible Solution

Steps to Reproduce

Context

I have several deployments prefixed with my organization name followed by a hyphen:

myorg-cluster-dev
myorg-cluster-prod
myorg-monitoring

I want to configure the dev and prod clusters to send the logs to the myorg-monitoring Deployment. I would like to leverage the ec_deployments to find the monitoring Deployment when provisioning the -dev and -prod Deployments.

Your Environment

  • Version used:
  • Environment name and version (e.g. Go 1.9):
  • Server type and version:
  • Operating System and version:
  • Link to your project:
@oscarmorasu oscarmorasu added Team:Delivery bug Something isn't working labels Feb 13, 2021
@karencfv karencfv self-assigned this Feb 17, 2021
@karencfv
Copy link
Contributor

Hi @oscarmorasu 👋 Thank you for finding this bug and taking the time to report it. I have opened up a PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants