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

Add table aws_mq_broker Closes #2005 #2020

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Add table aws_mq_broker Closes #2005 #2020

merged 3 commits into from
Jan 8, 2024

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Dec 14, 2023

Integration test logs

Logs
No env file present for the current environment:  staging 
 Falling back to .env config
No env file present for the current environment:  staging
customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined

SETUP: tests/aws_mq_broker []

PRETEST: tests/aws_mq_broker

TEST: tests/aws_mq_broker
Running terraform
data.aws_partition.current: Reading...
data.aws_region.alternate: Reading...
data.aws_region.primary: Reading...
data.aws_caller_identity.current: Reading...
data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_region.primary: Read complete after 0s [id=us-east-1]
data.aws_region.alternate: Read complete after 0s [id=us-east-2]
data.aws_caller_identity.current: Read complete after 0s [id=333333333333]
data.null_data_source.resource: Reading...
data.null_data_source.resource: Read complete after 0s [id=static]

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

Terraform will perform the following actions:

  # aws_mq_broker.named_test_resource will be created
  + resource "aws_mq_broker" "named_test_resource" {
      + apply_immediately          = false
      + arn                        = (known after apply)
      + authentication_strategy    = (known after apply)
      + auto_minor_version_upgrade = false
      + broker_name                = "turbottest74875"
      + deployment_mode            = "SINGLE_INSTANCE"
      + engine_type                = "ActiveMQ"
      + engine_version             = "5.17.6"
      + host_instance_type         = "mq.t2.micro"
      + id                         = (known after apply)
      + instances                  = (known after apply)
      + publicly_accessible        = false
      + security_groups            = (known after apply)
      + storage_type               = (known after apply)
      + subnet_ids                 = (known after apply)
      + tags                       = {
          + "Name" = "turbottest74875"
        }
      + tags_all                   = {
          + "Name" = "turbottest74875"
        }

      + configuration {
          + id       = (known after apply)
          + revision = (known after apply)
        }

      + user {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
    }

  # aws_mq_configuration.named_test_resource will be created
  + resource "aws_mq_configuration" "named_test_resource" {
      + arn                     = (known after apply)
      + authentication_strategy = (known after apply)
      + data                    = <<-EOT
            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
            <broker xmlns="http://activemq.apache.org/schema/core">
              <plugins>
                <forcePersistencyModeBrokerPlugin persistenceFlag="true"/>
                <statisticsBrokerPlugin/>
                <timeStampingBrokerPlugin ttlCeiling="86400000" zeroExpirationOverride="86400000"/>
              </plugins>
            </broker>
        EOT
      + description             = "Example Configuration"
      + engine_type             = "ActiveMQ"
      + engine_version          = "5.17.6"
      + id                      = (known after apply)
      + latest_revision         = (known after apply)
      + name                    = "turbottest74875"
      + tags_all                = (known after apply)
    }

  # aws_security_group.named_test_resource will be created
  + resource "aws_security_group" "named_test_resource" {
      + arn                    = (known after apply)
      + description            = "Test Security Group."
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "turbottest74875"
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "name" = "turbottest74875"
        }
      + tags_all               = {
          + "name" = "turbottest74875"
        }
      + vpc_id                 = (known after apply)
    }

  # aws_subnet.named_test_resource will be created
  + resource "aws_subnet" "named_test_resource" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = (known after apply)
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = false
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "turbottest74875"
        }
      + tags_all                                       = {
          + "Name" = "turbottest74875"
        }
      + vpc_id                                         = (known after apply)
    }

  # aws_vpc.main will be created
  + resource "aws_vpc" "main" {
      + arn                                  = (known after apply)
      + cidr_block                           = "10.0.0.0/16"
      + default_network_acl_id               = (known after apply)
      + default_route_table_id               = (known after apply)
      + default_security_group_id            = (known after apply)
      + dhcp_options_id                      = (known after apply)
      + enable_dns_hostnames                 = (known after apply)
      + enable_dns_support                   = true
      + enable_network_address_usage_metrics = (known after apply)
      + id                                   = (known after apply)
      + instance_tenancy                     = "default"
      + ipv6_association_id                  = (known after apply)
      + ipv6_cidr_block                      = (known after apply)
      + ipv6_cidr_block_network_border_group = (known after apply)
      + main_route_table_id                  = (known after apply)
      + owner_id                             = (known after apply)
      + tags                                 = {
          + "name" = "turbottest74875"
        }
      + tags_all                             = {
          + "name" = "turbottest74875"
        }
    }

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

Changes to Outputs:
  + account_id     = "333333333333"
  + aws_partition  = "aws"
  + aws_region     = "us-east-1"
  + engine_type    = "ActiveMQ"
  + engine_version = "5.17.6"
  + resource_arn   = (known after apply)
  + resource_id    = (known after apply)
  + resource_name  = "turbottest74875"
aws_mq_configuration.named_test_resource: Creating...
aws_vpc.main: Creating...
aws_mq_configuration.named_test_resource: Creation complete after 4s [id=c-eb2b95e8-5189-4f10-a02c-f50abcc9d337]
aws_vpc.main: Creation complete after 5s [id=vpc-0d7a48b479392f3a3]
aws_subnet.named_test_resource: Creating...
aws_security_group.named_test_resource: Creating...
aws_subnet.named_test_resource: Creation complete after 3s [id=subnet-06cd3d89cf79e8ffa]
aws_security_group.named_test_resource: Creation complete after 6s [id=sg-063bc00177f824ee4]
aws_mq_broker.named_test_resource: Creating...
aws_mq_broker.named_test_resource: Still creating... [10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [1m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [2m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [3m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [4m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [5m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [6m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [7m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [8m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [9m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m0s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m10s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m20s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m30s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m40s elapsed]
aws_mq_broker.named_test_resource: Still creating... [10m50s elapsed]
aws_mq_broker.named_test_resource: Still creating... [11m0s elapsed]
aws_mq_broker.named_test_resource: Creation complete after 11m7s [id=b-13254b0b-7ef5-415a-af33-7bebbe36dfc2]

Warning: Deprecated

  with data.null_data_source.resource,
  on variables.tf line 44, in data "null_data_source" "resource":
  44: data "null_data_source" "resource" {

The null_data_source was historically used to construct intermediate values
to re-use elsewhere in configuration, the same can now be achieved using
locals or the terraform_data resource type in Terraform 1.4 and later.

(and one more similar warning elsewhere)

Apply complete! Resources: 5 added, 0 changed, 0 destroyed.

Outputs:

account_id = "333333333333"
aws_partition = "aws"
aws_region = "us-east-1"
engine_type = "ActiveMQ"
engine_version = "5.17.6"
resource_arn = "arn:aws:mq:us-east-1:333333333333:broker:turbottest74875:b-13254b0b-7ef5-415a-af33-7bebbe36dfc2"
resource_id = "b-13254b0b-7ef5-415a-af33-7bebbe36dfc2"
resource_name = "turbottest74875"

Running SQL query: test-get-query.sql
[
  {
    "arn": "arn:aws:mq:us-east-1:333333333333:broker:turbottest74875:b-13254b0b-7ef5-415a-af33-7bebbe36dfc2",
    "broker_id": "b-13254b0b-7ef5-415a-af33-7bebbe36dfc2",
    "broker_name": "turbottest74875"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[
  {
    "arn": "arn:aws:mq:us-east-1:333333333333:broker:turbottest74875:b-13254b0b-7ef5-415a-af33-7bebbe36dfc2",
    "broker_name": "turbottest74875",
    "engine_type": "ActiveMQ",
    "engine_version": "5.17.6"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
[]
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "arn:aws:mq:us-east-1:333333333333:broker:turbottest74875:b-13254b0b-7ef5-415a-af33-7bebbe36dfc2"
    ],
    "broker_name": "turbottest74875",
    "region": "us-east-1",
    "tags": {
      "Name": "turbottest74875"
    },
    "title": "turbottest74875"
  }
]
✔ PASSED

TEARDOWN: tests/aws_mq_broker

SUMMARY:

1/1 passed.

Example query results

Results

> select * from aws_mq_broker
[
 {
  "_ctx": {
   "connection_name": "aws",
   "steampipe": {
    "sdk_version": "5.8.0"
   }
  },
  "account_id": "333333333333",
  "actions_required": null,
  "akas": [
   "arn:aws:mq:us-east-1:333333333333:broker:turbottest32168:b-d7851111-64ba-4a92-9713-a432ac81c4d9"
  ],
  "arn": "arn:aws:mq:us-east-1:333333333333:broker:turbottest32168:b-d7851111-64ba-4a92-9713-a432ac81c4d9",
  "authentication_strategy": "simple",
  "auto_minor_version_upgrade": false,
  "broker_id": "b-d7851111-64ba-4a92-9713-a432ac81c4d9",
  "broker_instances": [],
  "broker_name": "turbottest32168",
  "broker_state": "CREATION_IN_PROGRESS",
  "configurations": {
   "Current": null,
   "History": [],
   "Pending": {
    "Id": "c-5dc320cf-500b-4c91-a850-16bc73a241b1",
    "Revision": 2
   }
  },
  "created": "2023-12-14T16:33:28+05:30",
  "data_replication_metadata": null,
  "data_replication_mode": "",
  "deployment_mode": "SINGLE_INSTANCE",
  "encryption_options": {
   "KmsKeyId": null,
   "UseAwsOwnedKey": true
  },
  "engine_type": "ActiveMQ",
  "engine_version": "5.17.6",
  "host_instance_type": "mq.t2.micro",
  "ldap_server_metadata": null,
  "logs": {
   "Audit": false,
   "AuditLogGroup": "/aws/amazonmq/broker/b-d7851111-64ba-4a92-9713-a432ac81c4d9/audit",
   "General": false,
   "GeneralLogGroup": "/aws/amazonmq/broker/b-d7851111-64ba-4a92-9713-a432ac81c4d9/general",
   "Pending": null
  },
  "maintenance_window_start_time": {
   "DayOfWeek": "MONDAY",
   "TimeOfDay": "20:00",
   "TimeZone": "UTC"
  },
  "partition": "aws",
  "pending_authentication_strategy": "",
  "pending_data_replication_metadata": null,
  "pending_data_replication_mode": "",
  "pending_engine_version": null,
  "pending_host_instance_type": null,
  "pending_ldap_server_metadata": null,
  "pending_security_groups": null,
  "publicly_accessible": false,
  "region": "us-east-1",
  "security_groups": [
   "sg-0ffebc97df88f4e22"
  ],
  "storage_type": "efs",
  "subnet_ids": [
   "subnet-0fcf3ddec20e5a49c"
  ],
  "tags": {
   "Name": "turbottest32168"
  },
  "title": "turbottest32168",
  "users": [
   {
    "PendingChange": "CREATE",
    "Username": "ExampleUser"
   }
  ]
 }
]

Time: 88ms. Rows fetched: 1 (cached). Hydrate calls: 0.

> select * from aws_mq_broker where broker_id = 'b-d7851111-64ba-4a92-9713-a432ac81c4d9'
+-----------------+----------------------------------------+-------------------------------------------------------------------------------------------------+----------------------+-----------------+---------------------------+--------------------+--------------------->
| broker_name     | broker_id                              | arn                                                                                             | broker_state         | deployment_mode | created                   | host_instance_type | authentication_strat>
+-----------------+----------------------------------------+-------------------------------------------------------------------------------------------------+----------------------+-----------------+---------------------------+--------------------+--------------------->
| turbottest32168 | b-d7851111-64ba-4a92-9713-a432ac81c4d9 | arn:aws:mq:us-east-1:333333333333:broker:turbottest32168:b-d7851111-64ba-4a92-9713-a432ac81c4d9 | CREATION_IN_PROGRESS | SINGLE_INSTANCE | 2023-12-14T16:33:28+05:30 | mq.t2.micro        | simple              >
+-----------------+----------------------------------------+-------------------------------------------------------------------------------------------------+----------------------+-----------------+---------------------------+--------------------+--------------------->

Time: 4.9s. Rows fetched: 1. Hydrate calls: 1.

@ParthaI ParthaI self-assigned this Dec 14, 2023
@ParthaI ParthaI linked an issue Dec 14, 2023 that may be closed by this pull request
Copy link
Contributor

@madhushreeray30 madhushreeray30 left a comment

Choose a reason for hiding this comment

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

@ParthaI Please take a look at the comments, thanks!

aws/table_aws_mq_broker.go Outdated Show resolved Hide resolved
aws/table_aws_mq_broker.go Outdated Show resolved Hide resolved
aws/table_aws_mq_broker.go Outdated Show resolved Hide resolved
docs/tables/aws_mq_broker.md Show resolved Hide resolved
@madhushreeray30 madhushreeray30 merged commit 6e8c4f3 into main Jan 8, 2024
1 check passed
@madhushreeray30 madhushreeray30 deleted the issue-2005 branch January 8, 2024 11:17
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.

Add table aws_mq_broker
2 participants