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

Create random_string resource conditionally #1690

Closed
NickKoz opened this issue Jul 12, 2023 · 1 comment · Fixed by #2024
Closed

Create random_string resource conditionally #1690

NickKoz opened this issue Jul 12, 2023 · 1 comment · Fixed by #2024
Labels
enhancement New feature or request Stale

Comments

@NickKoz
Copy link

NickKoz commented Jul 12, 2023

TL;DR

The resource random_string named cluster_service_account_suffix can be created conditionally by using the var.create_service_account boolean flag.

Terraform Resources

No response

Detailed design

The code should be the following:

sa.tf file/line 34:
resource "random_string" "cluster_service_account_suffix" {
  count   = var.create_service_account ? 1 : 0
  upper   = false
  lower   = true
  special = false
  length  = 4
}

Additional information

No response

@NickKoz NickKoz added the enhancement New feature or request label Jul 12, 2023
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Sep 10, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant