juju / terraform-provider-juju

A Terraform provider for Juju
Apache License 2.0
21 stars 43 forks source link

Data source juju_application #630

Open shipperizer opened 1 week ago

shipperizer commented 1 week ago

Description

Creation of a juju_application data source

Type of change

Environment

QA steps

Manual QA steps should be done to test this PR.

terraform {
  required_providers {
    juju = {
      source  = "juju/juju"
      version = "> 0.14.0"
    }
  }

  required_version = ">= 1.5.0"
}

variable "revision" {
  type = string
}
########################

resource "juju_application" "hydra" {
  model = "test"
  trust = true

  charm {
    name    = "hydra"
    channel = "latest/edge"
    base    = "ubuntu@22.04"
    revision = var.revision
  }
}

### HYDRA dependent ###
data "juju_application" "hydra" {
  model = juju_application.hydra.model
  name  = juju_application.hydra.name
}
jujubot commented 1 week ago

Thanks for opening a pull request! Please follow the instructions here to ensure your pull request is ready for review. Then, a maintainer will review your patch.

@hpidcock @anvial

jujubot commented 1 week ago

Thanks for opening a pull request! Please follow the instructions here to ensure your pull request is ready for review. Then, a maintainer will review your patch.

@hpidcock @anvial