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

DENA-437: kafka-shared: dev: refactor iam to use the tls-app module #123

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

sbuliarca
Copy link
Contributor

Quotas need to be replaced, so there will be some disruption.

The plan is:

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.iam_cerbos_audit_exporter_consumer.kafka_acl.group_acl has moved to module.iam_cerbos_audit_exporter.kafka_acl.group_acl["auth.iam-cerbos-audit-v1"]
    resource "kafka_acl" "group_acl" {
        id                           = "User:CN=auth/iam-cerbos-audit-exporter|*|Read|Allow|Group|exporter-iam-cerbos-audit-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_cerbos_audit_exporter_consumer.kafka_acl.topic_acl has moved to module.iam_cerbos_audit_exporter.kafka_acl.topic_acl["auth.iam-cerbos-audit-v1"]
    resource "kafka_acl" "topic_acl" {
        id                           = "User:CN=auth/iam-cerbos-audit-exporter|*|Read|Allow|Topic|auth.iam-cerbos-audit-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_cerbos_audit_exporter.kafka_quota.quota must be replaced
  # (moved from module.iam_cerbos_audit_exporter_consumer.kafka_quota.consumer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "producer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth/iam-cerbos-audit-exporter|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_cerbos_audit_indexer_consumer.kafka_acl.group_acl has moved to module.iam_cerbos_audit_indexer.kafka_acl.group_acl["auth.iam-cerbos-audit-v1"]
    resource "kafka_acl" "group_acl" {
        id                           = "User:CN=auth/iam-cerbos-audit-indexer|*|Read|Allow|Group|indexer-iam-cerbos-audit-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_cerbos_audit_indexer_consumer.kafka_acl.topic_acl has moved to module.iam_cerbos_audit_indexer.kafka_acl.topic_acl["auth.iam-cerbos-audit-v1"]
    resource "kafka_acl" "topic_acl" {
        id                           = "User:CN=auth/iam-cerbos-audit-indexer|*|Read|Allow|Topic|auth.iam-cerbos-audit-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_cerbos_audit_indexer.kafka_quota.quota must be replaced
  # (moved from module.iam_cerbos_audit_indexer_consumer.kafka_quota.consumer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "producer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth/iam-cerbos-audit-indexer|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_credentials_producer_auth_provider.kafka_acl.producer_acl has moved to module.iam_clubhouse_auth_provider.kafka_acl.producer_acl["auth-customer.iam-credentials-v1"]
    resource "kafka_acl" "producer_acl" {
        id                           = "User:CN=clubhouse/auth-provider|*|Write|Allow|Topic|auth-customer.iam-credentials-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_clubhouse_auth_provider.kafka_quota.quota must be replaced
  # (moved from module.iam_credentials_producer_auth_provider.kafka_quota.producer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "consumer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=clubhouse/auth-provider|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_credentials_producer_api.kafka_acl.producer_acl has moved to module.iam_credentials_api.kafka_acl.producer_acl["auth-customer.iam-credentials-v1"]
    resource "kafka_acl" "producer_acl" {
        id                           = "User:CN=auth-customer/credentials-api|*|Write|Allow|Topic|auth-customer.iam-credentials-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_credentials_api.kafka_quota.quota must be replaced
  # (moved from module.iam_credentials_producer_api.kafka_quota.producer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "consumer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth-customer/credentials-api|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_credentials_consumer.kafka_acl.group_acl has moved to module.iam_credentials_indexer.kafka_acl.group_acl["auth-customer.iam-credentials-v1"]
    resource "kafka_acl" "group_acl" {
        id                           = "User:CN=auth-customer/iam-credentials-v1-indexer|*|Read|Allow|Group|indexer-iam-credentials-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_credentials_consumer.kafka_acl.topic_acl has moved to module.iam_credentials_indexer.kafka_acl.topic_acl["auth-customer.iam-credentials-v1"]
    resource "kafka_acl" "topic_acl" {
        id                           = "User:CN=auth-customer/iam-credentials-v1-indexer|*|Read|Allow|Topic|auth-customer.iam-credentials-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_credentials_indexer.kafka_quota.quota must be replaced
  # (moved from module.iam_credentials_consumer.kafka_quota.consumer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "producer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth-customer/iam-credentials-v1-indexer|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_identitydb_identity_api_consumer.kafka_acl.group_acl has moved to module.iam_identity_api.kafka_acl.group_acl["auth.iam-identitydb-v1"]
    resource "kafka_acl" "group_acl" {
        id                           = "User:CN=auth/iam-identity-api|*|Read|Allow|Group|iam-identity-api|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_identitydb_identity_api_consumer.kafka_acl.topic_acl has moved to module.iam_identity_api.kafka_acl.topic_acl["auth.iam-identitydb-v1"]
    resource "kafka_acl" "topic_acl" {
        id                           = "User:CN=auth/iam-identity-api|*|Read|Allow|Topic|auth.iam-identitydb-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_identity_api.kafka_quota.quota must be replaced
  # (moved from module.iam_identitydb_identity_api_consumer.kafka_quota.consumer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "producer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth/iam-identity-api|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_identitydb_event_forwarder_producer.kafka_acl.producer_acl has moved to module.iam_identitydb_event_forwarder.kafka_acl.producer_acl["auth.iam-identitydb-v1"]
    resource "kafka_acl" "producer_acl" {
        id                           = "User:CN=auth/iam-identitydb-event-forwarder|*|Write|Allow|Topic|auth.iam-identitydb-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_identitydb_event_forwarder.kafka_quota.quota must be replaced
  # (moved from module.iam_identitydb_event_forwarder_producer.kafka_quota.producer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "consumer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth/iam-identitydb-event-forwarder|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.iam_identitydb_snapshotter_consumer.kafka_acl.group_acl has moved to module.iam_identitydb_snapshotter.kafka_acl.group_acl["auth.iam-identitydb-v1"]
    resource "kafka_acl" "group_acl" {
        id                           = "User:CN=auth/iam-identitydb-snapshotter|*|Read|Allow|Group|iam-identitydb-snapshotter|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_identitydb_snapshotter_consumer.kafka_acl.topic_acl has moved to module.iam_identitydb_snapshotter.kafka_acl.topic_acl["auth.iam-identitydb-v1"]
    resource "kafka_acl" "topic_acl" {
        id                           = "User:CN=auth/iam-identitydb-snapshotter|*|Read|Allow|Topic|auth.iam-identitydb-v1|Literal"
        # (7 unchanged attributes hidden)
    }

  # module.iam_identitydb_snapshotter.kafka_quota.quota must be replaced
  # (moved from module.iam_identitydb_snapshotter_consumer.kafka_quota.consumer_quota)
-/+ resource "kafka_quota" "quota" {
      ~ config      = { # forces replacement
          + "producer_byte_rate" = 5242880
            # (2 unchanged elements hidden)
        }
      ~ id          = "User:CN=auth/iam-identitydb-snapshotter|user" -> (known after apply)
        # (2 unchanged attributes hidden)
    }

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

@sbuliarca sbuliarca requested a review from a team as a code owner February 6, 2024 12:31
@sbuliarca sbuliarca requested a review from a team February 6, 2024 12:31
@sbuliarca sbuliarca changed the title kafka-shared: refactor iam to use the tls-app module DENA-437: kafka-shared: refactor iam to use the tls-app module Feb 6, 2024
Copy link

linear bot commented Feb 6, 2024

@sbuliarca sbuliarca changed the title DENA-437: kafka-shared: refactor iam to use the tls-app module DENA-437: kafka-shared: dev: refactor iam to use the tls-app module Feb 6, 2024
Copy link
Contributor

@matthewhughes-uw matthewhughes-uw left a comment

Choose a reason for hiding this comment

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

~ id = "User:CN=auth/iam-cerbos-audit-exporter|user" -> (known after apply)

Are these IDs just going to get the same value as before (but Kafka just can't know that yet)? If not, does anything downstream depend on these?

config = {
config = {
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 thought for future: maybe we could add pre-commit to this repo to run terraform fmt for us to keep things tidy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, that would be good

Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 thought for future: maybe we could add pre-commit to this repo to run terraform fmt for us to keep things tidy

#137

@sbuliarca
Copy link
Contributor Author

~ id = "User:CN=auth/iam-cerbos-audit-exporter|user" -> (known after apply)

Are these IDs just going to get the same value as before (but Kafka just can't know that yet)? If not, does anything downstream depend on these?

Yes, it will be the same id

@sbuliarca sbuliarca merged commit e667b0b into main Feb 6, 2024
@sbuliarca sbuliarca deleted the refactor-iam-modules branch February 6, 2024 13:28
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