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

New attempt to configure access with ssh-oidc #65

Merged
merged 6 commits into from
Sep 24, 2024
Merged

Conversation

sebastian-luna-valero
Copy link
Member

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

Summary

This has been well tested now. It should hopefully work!


Related issue :

@sebastian-luna-valero sebastian-luna-valero requested a review from a team as a code owner September 20, 2024 12:56
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.motley: Refreshing state... [id=90726780-7918-4bfa-a03b-c1a723d5757b]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7b11db97-b476-48a1-940c-29b4c3784a4c]
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/7b11db97-b476-48a1-940c-29b4c3784a4c/]

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

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7b11db97-b476-48a1-940c-29b4c3784a4c"
        name                = "dashboard"
      ~ security_groups     = [
          - "motley-cue",
          - "test",
            # (1 unchanged element hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be destroyed
  # (because openstack_compute_secgroup_v2.motley is not in configuration)
  - resource "openstack_compute_secgroup_v2" "motley" {
      - description = "Open access via ssh-oidc" -> null
      - id          = "90726780-7918-4bfa-a03b-c1a723d5757b" -> null
      - name        = "motley-cue" -> null

      - rule {
          - cidr        = "0.0.0.0/0" -> null
          - from_port   = 22 -> null
          - id          = "9cbaa6ae-dd2b-44b1-b995-bbd40520dc5b" -> null
          - ip_protocol = "tcp" -> null
          - self        = false -> null
          - to_port     = 22 -> null
        }
      - rule {
          - cidr        = "0.0.0.0/0" -> null
          - from_port   = 8181 -> null
          - id          = "30baec6f-303c-467a-bde6-33cf2fd98196" -> null
          - ip_protocol = "tcp" -> null
          - self        = false -> null
          - to_port     = 8181 -> null
        }
    }

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

Warning: Deprecated Resource

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

use openstack_networking_secgroup_v2 resource instead

(and 3 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.motley: Refreshing state... [id=90726780-7918-4bfa-a03b-c1a723d5757b]
openstack_compute_secgroup_v2.secgroup: Refreshing state... [id=47779555-2ce1-400c-ba68-d177683c7228]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7b11db97-b476-48a1-940c-29b4c3784a4c]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7b11db97-b476-48a1-940c-29b4c3784a4c/]

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

Terraform will perform the following actions:

  # openstack_compute_instance_v2.dashboard will be updated in-place
  ~ resource "openstack_compute_instance_v2" "dashboard" {
        id                  = "7b11db97-b476-48a1-940c-29b4c3784a4c"
        name                = "dashboard"
      ~ security_groups     = [
          - "motley-cue",
          - "test",
            # (1 unchanged element hidden)
        ]
        tags                = []
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # openstack_compute_secgroup_v2.motley will be destroyed
  # (because openstack_compute_secgroup_v2.motley is not in configuration)
  - resource "openstack_compute_secgroup_v2" "motley" {
      - description = "Open access via ssh-oidc" -> null
      - id          = "90726780-7918-4bfa-a03b-c1a723d5757b" -> null
      - name        = "motley-cue" -> null

      - rule {
          - cidr        = "0.0.0.0/0" -> null
          - from_port   = 22 -> null
          - id          = "9cbaa6ae-dd2b-44b1-b995-bbd40520dc5b" -> null
          - ip_protocol = "tcp" -> null
          - self        = false -> null
          - to_port     = 22 -> null
        }
      - rule {
          - cidr        = "0.0.0.0/0" -> null
          - from_port   = 8181 -> null
          - id          = "30baec6f-303c-467a-bde6-33cf2fd98196" -> null
          - ip_protocol = "tcp" -> null
          - self        = false -> null
          - to_port     = 8181 -> null
        }
    }

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

Warning: Deprecated Resource

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

use openstack_networking_secgroup_v2 resource instead

(and 3 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

@sebastian-luna-valero sebastian-luna-valero marked this pull request as draft September 23, 2024 06:08
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...
data.openstack_images_image_v2.egi-docker: Reading...
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_secgroup_v2.motley: Refreshing state... [id=90726780-7918-4bfa-a03b-c1a723d5757b]
data.openstack_images_image_v2.egi-docker: Read complete after 3s [id=6aa64f02-660c-477f-81a2-d2363df75679]
openstack_compute_instance_v2.dashboard: Refreshing state... [id=7b11db97-b476-48a1-940c-29b4c3784a4c]
openstack_compute_floatingip_associate_v2.fip: Refreshing state... [id=147.213.76.217/7b11db97-b476-48a1-940c-29b4c3784a4c/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ 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                  = "7b11db97-b476-48a1-940c-29b4c3784a4c"
      ~ image_id            = "582840e6-3cc1-4133-ad20-6b302239ce19" -> "6aa64f02-660c-477f-81a2-d2363df75679"
        name                = "dashboard"
      ~ security_groups     = [
          - "test",
            # (2 unchanged elements hidden)
        ]
        tags                = []
        # (13 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 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

@sebastian-luna-valero sebastian-luna-valero changed the title Disable motley for now New attempt to configure access with ssh-oidc Sep 24, 2024
@sebastian-luna-valero sebastian-luna-valero marked this pull request as ready for review September 24, 2024 09:56
@sebastian-luna-valero
Copy link
Member Author

This has been well tested now. It should hopefully work!

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.

Go for it

@sebastian-luna-valero sebastian-luna-valero merged commit f87e04c into main Sep 24, 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