Giter VIP home page Giter VIP logo

Comments (2)

remilapeyre avatar remilapeyre commented on July 16, 2024

After testing with this configuration, it seems that the only resources to be subject to this bug are consul_intention, consul_node and consul_service:

resource "consul_agent_service" "app" {
  address = "www.google.com"
  name    = "google"
  port    = 80
  tags    = ["tag0", "tag1"]
}

resource "consul_catalog_entry" "app" {
  address = "192.168.10.10"
  node    = "foobar"

  service = {
    address = "127.0.0.1"
    id      = "redis1"
    name    = "redis"
    port    = 8000
    tags    = ["master", "v1"]
  }
}

resource "consul_intention" "database" {
  source_name      = "api"
  destination_name = "db"
  action           = "allow"
}

resource "consul_keys" "app" {
  # Set the CNAME of our load balancer as a key
  key {
    path  = "service/app/elb_address"
    value = "coucou"
  }
}

resource "consul_key_prefix" "myapp_config" {
  # Prefix to add to prepend to all of the subkey names below.
  path_prefix = "myapp/config/"

  subkeys = {
    "elb_cname"         = "coucou"
  }
}

resource "consul_node" "foobar" {
  address = "192.168.10.10"
  name    = "foobar"
}

resource "consul_prepared_query" "myapp-query" {
  name         = "myquery"
  only_passing = true
  near         = "_agent"

  service = "myapp"
  tags    = ["active", "!standby"]

  failover {
    nearest_n   = 3
    datacenters = ["us-west1", "us-east-2", "asia-east1"]
  }

  dns {
    ttl = "30s"
  }
}

resource "consul_service" "google" {
  name    = "google"
  node    = "${consul_node.compute.name}"
  port    = 80
  tags    = ["tag0"]
}

resource "consul_node" "compute" {
  name    = "compute-google"
  address = "www.google.com"
}

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on July 16, 2024

Fixed by #69

from terraform-provider-consul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.