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

feature(terraform): add outputs.tf endpoint value generator #228

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MichaelThamm
Copy link
Contributor

@MichaelThamm MichaelThamm commented Nov 14, 2024

This add a python script for creating the endpoints values for a charm based on the charmcraft or metadata YAML file. The result is intended to be copied and pasted into the respective charm's outputs.tf file.

  • TODO: Add functionality for the output to be Terraform formatted
  • TODO: Add functionality to overwrite a specified outputs.tf via arguments

Usage:

python3 generate_integrations.py <PATH_TO_CHARM>/charmcraft.yaml

expected outputs:

output "endpoints" {
  value = {
    # Requires
    grafana_source       = "grafana-source",
    grafana_dashboard    = "grafana-dashboard",
    grafana_auth         = "grafana-auth",
    database             = "database",
    catalogue            = "catalogue",
    ingress              = "ingress",
    certificates         = "certificates",
    receive_ca_cert      = "receive-ca-cert",
    oauth                = "oauth",
    tracing              = "tracing",
    # Provides
    metrics_endpoint     = "metrics-endpoint",
  }
}

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…a charm based on the charmcraft or metadata YAML file.
@MichaelThamm MichaelThamm requested a review from a team as a code owner November 14, 2024 13:50
@simskij simskij changed the title [tf] Python script for creating the outputs.tf endpoints values feature(terraform): add outputs.tf endpoint value generator Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant