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

Change ports for motley-cue #64

Merged
merged 9 commits into from
Sep 20, 2024
Merged

Change ports for motley-cue #64

merged 9 commits into from
Sep 20, 2024

Conversation

sebastian-luna-valero
Copy link
Member

@sebastian-luna-valero sebastian-luna-valero commented Sep 19, 2024

Summary

motley-cue uses 8080, like traefik for the dashboard. This PR moves motley-cue to a different port.


Related issue :

@sebastian-luna-valero sebastian-luna-valero requested a review from a team as a code owner September 19, 2024 13:52
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          + "motley-cue",
            # (2 unchanged elements hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8080
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8080
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @sebastian-luna-valero, Action: pull_request

@@ -6,7 +6,7 @@ resource "openstack_compute_instance_v2" "dashboard" {
network {
uuid = var.net_id
}
security_groups = [openstack_compute_secgroup_v2.secgroup.name, "default"]
security_groups = ["default", "HTTP", "motley-cue"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we remove default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssh is there, should I add it to motley-cue then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think it's better to have explicit control of the ports than to rely on groups that we don't control

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sebastian-luna-valero sebastian-luna-valero changed the title Open ports for motley-cue Change ports for motley-cue Sep 20, 2024
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          + "motley-cue",
            # (2 unchanged elements hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8181
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8181
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @sebastian-luna-valero, Action: pull_request

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          + "motley-cue",
            # (2 unchanged elements hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8181
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8181
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @sebastian-luna-valero, Action: pull_request

Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just 2 minor things

README.md Outdated Show resolved Hide resolved
@@ -6,7 +6,7 @@ resource "openstack_compute_instance_v2" "dashboard" {
network {
uuid = var.net_id
}
security_groups = [openstack_compute_secgroup_v2.secgroup.name, "default"]
security_groups = ["default", "HTTP", "motley-cue"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think it's better to have explicit control of the ports than to rely on groups that we don't control

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          + "motley-cue",
            # (2 unchanged elements hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8181
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8181
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @sebastian-luna-valero, Action: pull_request

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          - "default",
          + "motley-cue",
            # (1 unchanged element hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 22
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 22
        }
      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8181
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8181
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @sebastian-luna-valero, Action: pull_request

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
terraform
Acquiring state lock. This may take a few moments...
openstack_networking_floatingip_v2.fip: Refreshing state... [id=1a2e1285-0a20-4582-aab9-27255607a862]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7ef4dce4-495f-4c01-9ac2-cb10eca0e318]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7ef4dce4-495f-4c01-9ac2-cb10eca0e318/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7ef4dce4-495f-4c01-9ac2-cb10eca0e318"
        name                = "dashboard"
      ~ security_groups     = [
          - "default",
          + "motley-cue",
            # (1 unchanged element hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be created
  + resource "openstack_compute_secgroup_v2" "motley" {
      + description = "Open access via ssh-oidc"
      + id          = (known after apply)
      + name        = "motley-cue"
      + region      = (known after apply)

      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 22
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 22
        }
      + rule {
          + cidr        = "0.0.0.0/0"
          + from_port   = 8181
          + id          = (known after apply)
          + ip_protocol = "tcp"
          + self        = false
          + to_port     = 8181
        }
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Warning: Deprecated Resource

  with openstack_compute_secgroup_v2.secgroup,
  on main.tf line 12, in resource "openstack_compute_secgroup_v2" "secgroup":
  12: resource "openstack_compute_secgroup_v2" "secgroup" {

use openstack_networking_secgroup_v2 resource instead

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @sebastian-luna-valero, Action: pull_request

Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@enolfc enolfc merged commit f47fc40 into main Sep 20, 2024
5 checks passed
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.

2 participants