diff --git a/.github/workflows/custom_action.yaml b/.github/workflows/sandbox.yaml similarity index 97% rename from .github/workflows/custom_action.yaml rename to .github/workflows/sandbox.yaml index 263c633..72a262f 100644 --- a/.github/workflows/custom_action.yaml +++ b/.github/workflows/sandbox.yaml @@ -1,9 +1,9 @@ -name: "Custom Actions Handler" +name: "Create Sandbox" on: repository_dispatch: types: - - actions + - sandbox workflow_dispatch: inputs: api_token: diff --git a/modules/demo_account/hierarchy.tf b/modules/demo_account/hierarchy.tf index a81484d..57d006a 100644 --- a/modules/demo_account/hierarchy.tf +++ b/modules/demo_account/hierarchy.tf @@ -11,8 +11,8 @@ module "product" { description = "The system that manages the order workflow." owner = module.product-engineering-team.this.id services = [ - module.order-workflow.this.id, - module.order-fulfillment.this.id + module.services_from_csv["order-routing"].this.id, + module.services_from_csv["order-fulfillment"].this.id ] }, { @@ -20,7 +20,7 @@ module "product" { description = "The system that manages the shopping cart." owner = module.product-engineering-team.this.id services = [ - module.shopping-cart.this.id + module.services_from_csv["shopping-cart"].this.id, ] } ] @@ -35,7 +35,8 @@ module "product" { description = "The system that manages inventory procurement." owner = module.inventory-team.this.id services = [ - module.procurement-service.this.id + module.services_from_csv["inventory-restock"].this.id, + module.services_from_csv["inventory-sync"].this.id ] }, { @@ -43,8 +44,8 @@ module "product" { description = "Internal tools that help Big River Books employees." owner = module.internal-tools-team.this.id services = [ - module.certificate-manager.this.id, - module.employee-directory.this.id + module.services_from_csv["employee-directory"].this.id, + module.services_from_csv["certificate-manager"].this.id, ] } ] diff --git a/modules/demo_account/rubric_bronze.tf b/modules/demo_account/rubric_bronze.tf index 3101c1e..0f6b0db 100644 --- a/modules/demo_account/rubric_bronze.tf +++ b/modules/demo_account/rubric_bronze.tf @@ -4,7 +4,7 @@ module "service_owner_defined" { name = "Owner is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true } @@ -15,7 +15,7 @@ module "service_repo_defined" { name = "Repository is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true } @@ -25,7 +25,7 @@ module "service_tier_defined" { name = "Tier is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true property = "tier_index" @@ -38,7 +38,7 @@ module "branch_protection" { name = "Default Branch is Protected" category = opslevel_rubric_category.all["security"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true } @@ -48,7 +48,7 @@ module "has_sentry" { name = "Has Error Tracking" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "errors" @@ -64,7 +64,7 @@ module "has_deployed_this_qtr" { name = "[UPCOMING] Has Deployed this Quarter" category = opslevel_rubric_category.all["observability"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = false days = 90 @@ -76,7 +76,7 @@ module "has_dependencies" { name = "Has Defined Dependencies" category = opslevel_rubric_category.all["observability"].id level = opslevel_rubric_level.all["bronze"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true } diff --git a/modules/demo_account/rubric_gold.tf b/modules/demo_account/rubric_gold.tf index 819069d..fa64f7d 100644 --- a/modules/demo_account/rubric_gold.tf +++ b/modules/demo_account/rubric_gold.tf @@ -4,7 +4,7 @@ module "service_product_defined" { name = "Product is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true property = "product" @@ -16,7 +16,7 @@ module "service_system_defined" { name = "System is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true property = "system" @@ -28,7 +28,7 @@ module "has_runbooks" { name = "Runbooks Defined" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "runbooks" @@ -40,7 +40,7 @@ module "slos_defined" { name = "[UPCOMING] Has SLOs Defined" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = false } @@ -50,7 +50,7 @@ module "fast_deploys" { name = "CD is Fast" category = opslevel_rubric_category.all["performance"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tag_key = "deploy_speed" @@ -66,7 +66,7 @@ module "has_deployed_this_sprint" { name = "Has Deployed this Sprint" category = opslevel_rubric_category.all["observability"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true days = 14 @@ -78,7 +78,7 @@ module "check_package_version_testutils" { name = "Uses Latest Test Framework" category = opslevel_rubric_category.all["security"].id level = opslevel_rubric_level.all["gold"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true package_constraint = "matches_version" diff --git a/modules/demo_account/rubric_platinum.tf b/modules/demo_account/rubric_platinum.tf index a255c22..5d01a9a 100644 --- a/modules/demo_account/rubric_platinum.tf +++ b/modules/demo_account/rubric_platinum.tf @@ -5,7 +5,7 @@ module "manual_approval" { notes = "Approving this check you solemnly swear you have finished all your homework!" category = opslevel_rubric_category.all["misc"].id level = opslevel_rubric_level.all["platinum"].id - owner = module.ai-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true } @@ -15,7 +15,7 @@ module "has_gremlin" { name = "Performs Choas Experiments" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["platinum"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "other" @@ -35,7 +35,7 @@ module "has_sentry_stg" { name = "Has Error Tracking in Staging" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["platinum"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "errors" @@ -51,7 +51,7 @@ module "mttr" { name = "MTTR < 2 hours" category = opslevel_rubric_category.all["performance"].id level = opslevel_rubric_level.all["platinum"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tag_key = "mttr" @@ -67,7 +67,7 @@ module "check_package_version_codecov" { name = "Uses Latest CodeCov" category = opslevel_rubric_category.all["security"].id level = opslevel_rubric_level.all["platinum"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true package_constraint = "matches_version" diff --git a/modules/demo_account/rubric_silver.tf b/modules/demo_account/rubric_silver.tf index 7ff820b..f9d09f8 100644 --- a/modules/demo_account/rubric_silver.tf +++ b/modules/demo_account/rubric_silver.tf @@ -4,7 +4,7 @@ module "service_lifecycle_defined" { name = "Lifecycle is Defined" category = opslevel_rubric_category.all["quality"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true property = "lifecycle_index" @@ -16,7 +16,7 @@ module "has_splunk" { name = "Has Logging Dashboard" category = opslevel_rubric_category.all["observability"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "logs" @@ -32,7 +32,7 @@ module "has_datadog" { name = "Has Monitoring Dashboard" category = opslevel_rubric_category.all["observability"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "metrics" @@ -48,7 +48,7 @@ module "has_pagerduty" { name = "Has Alerting/Paging System" category = opslevel_rubric_category.all["reliability"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tool_category = "incidents" @@ -64,7 +64,7 @@ module "fast_builds" { name = "CI is Fast" category = opslevel_rubric_category.all["performance"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true tag_key = "build_speed" @@ -80,7 +80,7 @@ module "package_version_github_checkout" { name = "Uses Latest GA Checkout" category = opslevel_rubric_category.all["security"].id level = opslevel_rubric_level.all["silver"].id - owner = module.internal-tools-team.this.id + owner = module.teams_from_csv["internal-tools"].this.id enabled = true package_constraint = "matches_version" diff --git a/modules/demo_account/scripts/sample_deploys.sh b/modules/demo_account/scripts/sample_deploys.sh index 2215ac7..e2b1021 100755 --- a/modules/demo_account/scripts/sample_deploys.sh +++ b/modules/demo_account/scripts/sample_deploys.sh @@ -1,14 +1,25 @@ #! /bin/bash deploy() { - curl -s -X POST $1 \ + # Detect if we are on macOS or Linux + if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS date command + formatted_date=$(date -u $3 '+%FT%TZ') + else + # Linux date command + # Replace `-v` flag and format the input for Linux `date` + adjusted=$(echo $3 | sed 's/-v //g' | sed 's/H/hour/g; s/d/day/g') + formatted_date=$(date -u -d "$adjusted" '+%FT%TZ') + fi + + curl -s -X POST "$1" \ -H 'content-type: application/json' \ -d '{ "service": "'"$2"'", "deployer": { "email": "'"$5"'" }, - "deployed_at": "'"$(date -u $3 '+%FT%TZ')"'", + "deployed_at": "'"$formatted_date"'", "description": "CI Pipeline: #'"$4"'", "commit": { "sha": "'"$(openssl rand -hex 24)"'" diff --git a/modules/demo_account/services.csv b/modules/demo_account/services.csv index 9d1a744..12dd117 100644 --- a/modules/demo_account/services.csv +++ b/modules/demo_account/services.csv @@ -1,72 +1,70 @@ -Service Name,Description,Team Owner,Tier,Aliases,Tools,Created,Language,Framework,Lifecycle -cart-ninja,Shopping cart management service,Midnight Bandits,Tier 1,"cart_ninja, ninja, shopping_cart","GitHub, PagerDuty, Datadog",2020,Ruby,Rails,Beta -payment-wombat,Payment processing and gateway service,Money Mavericks,Tier 1,"payment_wombat, wombat, payment_processor","GitHub, PagerDuty, New Relic, Datadog",2019,Rust,Rocket,Alpha -inventory-oracle,Real-time inventory tracking and management,Stock Whisperers,Tier 2,"inventory_oracle, oracle, inv_oracle","GitHub, Jira, Datadog",2021,Go,FastHTTP,Beta -hedgehog,User authentication and authorization service,Security Pandas,Tier 1,"auth_hedgehog, auth_service, hedgehog_auth","GitHub, PagerDuty, Datadog",2018,TypeScript,Deno,Generally Available -order-fulfillment-maestro,Order processing and fulfillment orchestration,Shipping Sharks,Tier 1,"order_fulfillment, maestro, fulfillment_service","GitHub, PagerDuty, New Relic",2020,Python,Django,Beta -raccoon,Search and recommendation engine,Data Wizards,Tier 2,"search_raccoon, raccoon_search, search_service","GitHub, Elasticsearch, Datadog",2022,Ruby,Rails,Generally Available -warehouse-pulse,Warehouse management and tracking,Logistics Lions,Tier 2,"warehouse_pulse, pulse, wh_pulse","GitHub, Jira, Datadog",2021,Rust,Rocket,Alpha -chameleon,Dynamic pricing engine,Price Pirates,Tier 2,"pricing_chameleon, price_engine, chameleon_pricing","GitHub, New Relic, Datadog",2023,Go,FastHTTP,Beta -customer-satisfaction-portal,Customer service and support platform,Support Unicorns,Tier 3,"csat_portal, satisfaction_portal, csat","GitHub, Zendesk, Slack",2019,TypeScript,Deno,Generally Available -thunderbolt,Real-time analytics processing,Data Nomads,Tier 2,"analytics_bolt, bolt, thunder","GitHub, Datadog, Elasticsearch",2022,Python,Django,Beta -product-catalog-sage,Product information management,Catalog Cowboys,Tier 1,"catalog_sage, sage, product_sage","GitHub, PagerDuty, Datadog",2020,Ruby,Rails,Generally Available -notification-yeti,Customer notification service,Comms Cobras,Tier 3,"notif_yeti, yeti, notification_service","GitHub, SendGrid, Datadog",2021,Rust,Rocket,Alpha -fraud-sentinel,Fraud detection and prevention,Risk Rangers,Tier 1,"fraud_sentinel, sentinel, fraud_detection","GitHub, PagerDuty, New Relic",2019,Go,FastHTTP,Beta -discount-penguin,Promotion and discount management,Deal Dragons,Tier 2,"discount_penguin, penguin, promo_penguin","GitHub, Jira, Datadog",2022,TypeScript,Deno,Generally Available -shipping-calculator-phoenix,Shipping rate calculation service,Logistics Lions,Tier 2,"shipping_calculator, phoenix, shipping_phoenix","GitHub, New Relic, Datadog",2021,Python,Django,Beta -return-dingo,Returns and refunds processing,Customer Champions,Tier 2,"returns_dingo, dingo, return_processor","GitHub, Zendesk, Datadog",2023,Ruby,Rails,Generally Available -wishlist-whale,Wishlist management service,Feature Foxes,Tier 3,"wishlist_whale, whale, wish_service","GitHub, Jira, Datadog",2022,Rust,Rocket,Alpha -review-rhino,Product review management,Content Crew,Tier 2,"review_rhino, rhino, review_service","GitHub, Elasticsearch, Datadog",2021,Go,FastHTTP,Beta -inventory-forecaster-owl,Inventory prediction service,Stock Whisperers,Tier 2,"inventory_forecaster, owl, forecast_owl","GitHub, New Relic, Datadog",2023,TypeScript,Deno,Generally Available -cart-abandonment-koala,Cart abandonment recovery service,Revenue Rabbits,Tier 2,"cart_koala, koala, abandonment_service","GitHub, SendGrid, Datadog",2022,Python,Django,Beta -platypus,A/B testing platform,Experience Engineers,Tier 2,"ab_platypus, ab_testing, test_platypus","GitHub, Datadog, LaunchDarkly",2021,Ruby,Rails,Generally Available -content-kangaroo,Content management system,Content Crew,Tier 2,"content_kangaroo, kangaroo, cms_service","GitHub, Contentful, Datadog",2020,Rust,Rocket,Alpha -user-preferences-panda,User settings and preferences service,Feature Foxes,Tier 3,"user_preferences, panda, preferences_service","GitHub, Redis, Datadog",Go,FastHTTP,2022,Beta -product-comparison-cobra,Product comparison engine,Catalog Cowboys,Tier 3,"comparison_cobra, cobra, product_compare","GitHub, Elasticsearch, Datadog",2021,TypeScript,Deno,Generally Available -checkout-cheetah,Fast checkout processing service,Money Mavericks,Tier 1,"checkout_cheetah, cheetah, fast_checkout","GitHub, PagerDuty, New Relic",2020,Python,Django,Beta -delivery-tracker-dolphin,Delivery status tracking service,Shipping Sharks,Tier 2,"delivery_tracker, dolphin, tracker_dolphin","GitHub, Twilio, Datadog",2021,Ruby,Rails,Generally Available -subscription-sloth,Subscription management service,Revenue Rabbits,Tier 2,"subscription_sloth, sloth, sub_service","GitHub, Stripe, Datadog",2022,Rust,Rocket,Alpha -inventory-snapshot,Inventory backup service,Stock Whisperers,Tier 3,"inv_snapshot, snapshot, inventory_backup","GitHub, S3, Datadog",2021,Go,FastHTTP,Beta -marketing-meerkat,Marketing automation service,Growth Gorillas,Tier 2,"marketing_meerkat, meerkat, mkt_automation","GitHub, Mailchimp, Datadog",2022,TypeScript,Deno,Generally Available -customer-segmentation-squid,Customer segmentation service,Data Wizards,Tier 2,"segmentation_squid, squid, customer_segments","GitHub, Snowflake, Datadog",2023,Python,Django,Beta -gift-card-gopher,Gift card management service,Money Mavericks,Tier 2,"gift_card_gopher, gopher, gc_service","GitHub, Redis, Datadog",2021,Ruby,Rails,Generally Available -address-validator-armadillo,Address validation service,Logistics Lions,Tier 3,"address_validator, armadillo, address_service","GitHub, Google Maps API, Datadog",2022,Rust,Rocket,Alpha -product-bundle-beaver,Product bundling service,Catalog Cowboys,Tier 2,"bundle_beaver, beaver, product_bundles","GitHub, Redis, Datadog",2023,Go,FastHTTP,Beta -tax-calculator-turtle,Tax computation service,Money Mavericks,Tier 1,"tax_calculator, turtle, tax_service","GitHub, PagerDuty, Avalara",2021,TypeScript,Deno,Generally Available -vendor-portal-vulture,Vendor management platform,Supplier Squad,Tier 2,"vendor_portal, vulture, vendor_management","GitHub, Jira, Datadog",2022,Python,Django,Beta -session-management-salamander,User session handling service,Security Pandas,Tier 1,"session_management, salamander, session_handler","GitHub, PagerDuty, Redis",2020,Ruby,Rails,Generally Available -product-search-sphinx,Product search service,Data Wizards,Tier 1,"search_sphinx, sphinx, product_search","GitHub, PagerDuty, Elasticsearch",2021,Rust,Rocket,Alpha -loyalty-program-lion,Customer loyalty service,Revenue Rabbits,Tier 2,"loyalty_lion, lion, loyalty_service","GitHub, Redis, Datadog",2022,Go,FastHTTP,Beta -invoice-generator-iguana,Invoice creation service,Money Mavericks,Tier 2,"invoice_iguana, iguana, invoice_gen","GitHub, DocuSign, Datadog",2021,TypeScript,Deno,Generally Available -return-label-lemur,Return shipping label generator,Logistics Lions,Tier 2,"return_label, lemur, label_service","GitHub, ShipEngine, Datadog",2022,Python,Django,Beta -size-guide-swan,Product size recommendation service,Experience Engineers,Tier 3,"size_guide, swan, size_recommendation","GitHub, TensorFlow, Datadog",2023,Ruby,Rails,Generally Available -moonshot,Experimental features platform,Innovation Iguanas,Tier 3,"moon, moonshot_platform, experimental","GitHub, LaunchDarkly, Datadog",2023,Rust,Rocket,Alpha -customer-feedback-ferret,Customer feedback collection service,Support Unicorns,Tier 3,"feedback_ferret, ferret, feedback_service","GitHub, SurveyMonkey, Datadog",2022,Go,FastHTTP,Beta -promo-code-parrot,Promotional code validation service,Deal Dragons,Tier 2,"promo_parrot, parrot, promo_service","GitHub, Redis, Datadog",2021,TypeScript,Deno,Generally Available -inventory-insights,Inventory analytics service,Stock Whisperers,Tier 2,"inv_insights, insights, inventory_analytics","GitHub, Tableau, Datadog",2022,Python,Django,Beta -warehouse-walrus,Warehouse space optimization service,Logistics Lions,Tier 2,"warehouse_walrus, walrus, space_optimizer","GitHub, TensorFlow, Datadog",2023,Ruby,Rails,Generally Available -product-recommendation-raptor,Product recommendation engine,Data Wizards,Tier 2,"recommendation_raptor, raptor, rec_engine","GitHub, TensorFlow, Datadog",2022,Rust,Rocket,Alpha -shipping-rate-shark,Shipping cost optimization service,Logistics Lions,Tier 2,"shipping_shark, shark, rate_optimizer","GitHub, Redis, Datadog",2021,Go,FastHTTP,Beta -inventory-allocation-ant,Inventory distribution service,Stock Whisperers,Tier 2,"allocation_ant, ant, inventory_distributor","GitHub, Redis, Datadog",2022,TypeScript,Deno,Generally Available -customer-journey-jaguar,Customer journey tracking service,Experience Engineers,Tier 2,"journey_jaguar, jaguar, customer_journey","GitHub, Segment, Datadog",2023,Python,Django,Beta -price-optimization-phoenix,Dynamic pricing optimization service,Price Pirates,Tier 2,"price_phoenix, phoenix, price_optimizer","GitHub, TensorFlow, Datadog",2022,Ruby,Rails,Generally Available -order-routing-octopus,Order distribution service,Shipping Sharks,Tier 1,"routing_octopus, octopus, order_router","GitHub, PagerDuty, Datadog",2021,Rust,Rocket,Alpha -product-category-cougar,Category management service,Catalog Cowboys,Tier 2,"category_cougar, cougar, category_manager","GitHub, Elasticsearch, Datadog",2022,Go,FastHTTP,Beta -shipping-label-snake,Shipping label generation service,Logistics Lions,Tier 2,"label_snake, snake, label_generator","GitHub, ShipEngine, Datadog",2021,TypeScript,Deno,Generally Available -customer-support-ticketing,Support ticket management service,Support Unicorns,Tier 2,"support_tickets, ticketing, ticket_manager","GitHub, Zendesk, Datadog",2022,Python,Django,Beta -vendor-integration-viper,Vendor API integration service,Supplier Squad,Tier 2,"integration_viper, viper, vendor_integration","GitHub, Kong, Datadog",2023,Ruby,Rails,Generally Available -product-import-platypus,Product data import service,Catalog Cowboys,Tier 2,"import_platypus, platypus, product_importer","GitHub, RabbitMQ, Datadog",2022,Rust,Rocket,Alpha -order-history-hawk,Order history service,Data Nomads,Tier 2,"history_hawk, hawk, order_history","GitHub, MongoDB, Datadog",2021,Go,FastHTTP,Beta -cart-recovery-crab,Abandoned cart recovery service,Revenue Rabbits,Tier 2,"recovery_crab, crab, cart_recovery","GitHub, SendGrid, Datadog",2022,TypeScript,Deno,Generally Available -payment-gateway-gorilla,Payment processor integration,Money Mavericks,Tier 1,"gateway_gorilla, gorilla, payment_gateway","GitHub, PagerDuty, Stripe",2021,Python,Django,Beta -user-activity-tracker,User behavior analytics service,Data Wizards,Tier 2,"activity_tracker, tracker, user_analytics","GitHub, Snowplow, Datadog",2022,Ruby,Rails,Generally Available -email-template-eagle,Email template management service,Comms Cobras,Tier 3,"template_eagle, eagle, email_templates","GitHub, SendGrid, Datadog",2023,Rust,Rocket,Alpha -product-availability-aardvark,Stock availability service,Stock Whisperers,Tier 2,"availability_aardvark, aardvark, stock_checker","GitHub, Redis, Datadog",2022,Go,FastHTTP,Beta -delivery-date-predictor,Delivery estimation service,Logistics Lions,Tier 2,"date_predictor, predictor, delivery_estimates","GitHub, ML Engine, Datadog",2021,TypeScript,Deno,Generally Available -returns-processing-raccoon,Returns management service,Customer Champions,Tier 2,"processing_raccoon, raccoon, returns_manager","GitHub, Zendesk, Datadog",2022,Python,Django,Beta -inventory-restock-ibis,Restock alert service,Stock Whisperers,Tier 2,"restock_ibis, ibis, restock_alerts","GitHub, RabbitMQ, Datadog",2023,Ruby,Rails,Generally Available -price-comparison-peacock,Price comparison service,Price Pirates,Tier 2,"comparison_peacock, peacock, price_compare","GitHub, Redis, Datadog",2022,Rust,Rocket,Alpha -order-validation-owl,Order validation service,Shipping Sharks,Tier 1,"validation_owl, owl, order_validator","GitHub, PagerDuty, Datadog",2021,Go,FastHTTP,Beta -product-feed-fox,Product feed management service,Catalog Cowboys,Tier 2,"feed_fox, fox, product_feeds","GitHub, RabbitMQ, Datadog",2022,TypeScript,Deno,Generally Available -customer-profile-penguin,Customer profile service,Security Pandas,Tier 1,"profile_penguin, penguin, customer_profiles","GitHub, PagerDuty, MongoDB",2021,Python,Django,Beta -inventory-sync-impala,Inventory synchronization service,Stock Whisperers,Tier 2,"sync_impala, impala, inventory_sync","GitHub, Kafka, Datadog",2022,Rust,Rocket,Generally Available +Service Name,Description,Team Owner,Tier,Aliases,Tools,Created,Language,Framework,Lifecycle,Deploys +shopping-cart,Shopping Cart,Midnight Bandits,tier_1,"shopping-cart,cart_ninja,ninja,shopping_cart","GitHub,PagerDuty,Datadog",2020,Ruby,Rails,beta,true +payment-wombat,Payment processing and gateway service,Money Mavericks,tier_1,"payment-wombat,wombat,payment_processor","GitHub,PagerDuty,New Relic,Datadog",2019,Rust,Rocket,alpha,true +inventory-oracle,Real-time inventory tracking and management,Stock Whisperers,tier_2,"inventory_oracle,oracle,inv_oracle","GitHub,Jira,Datadog",2021,Go,FastHTTP,beta,false +hedgehog,User authentication and authorization service,Security Pandas,tier_1,"auth_hedgehog,auth_service,hedgehog_auth","GitHub,PagerDuty,Datadog",2018,TypeScript,Deno,generally_available,false +order-fulfillment,Order processing and fulfillment orchestration,Shipping Sharks,tier_1,"order_fulfillment,maestro,fulfillment_service","GitHub,PagerDuty,New Relic",2020,Python,Django,beta,false +raccoon,Search and recommendation engine,Data Wizards,tier_2,"search_raccoon,raccoon_search,search_service","GitHub,Elasticsearch,Datadog",2022,Ruby,Rails,generally_available,false +warehouse-pulse,Warehouse management and tracking,Logistics Lions,tier_2,"warehouse_pulse,pulse,wh_pulse","GitHub,Jira,Datadog",2021,Rust,Rocket,alpha,false +chameleon,Dynamic pricing engine,Price Pirates,tier_2,"pricing_chameleon,price_engine,chameleon_pricing","GitHub,New Relic,Datadog",2023,Go,FastHTTP,beta,false +customer-satisfaction-portal,Customer service and support platform,Support Unicorns,tier_3,"csat_portal,satisfaction_portal,csat","GitHub,Zendesk,Slack",2019,TypeScript,Deno,generally_available,false +thunderbolt,Real-time analytics processing,Data Nomads,tier_2,"analytics_bolt,bolt,thunder","GitHub,Datadog,Elasticsearch",2022,Python,Django,beta,false +product-catalog-sage,Product information management,Catalog Cowboys,tier_1,"catalog_sage,sage,product_sage","GitHub,PagerDuty,Datadog",2020,Ruby,Rails,generally_available,false +notification-yeti,Customer notification service,Comms Cobras,tier_3,"notif_yeti,yeti,notification_service","GitHub,SendGrid,Datadog",2021,Rust,Rocket,alpha,false +fraud-sentinel,Fraud detection and prevention,Risk Rangers,tier_1,"fraud_sentinel,sentinel,fraud_detection","GitHub,PagerDuty,New Relic",2019,Go,FastHTTP,beta,false +discount-penguin,Promotion and discount management,Deal Dragons,tier_2,"discount_penguin,penguin,promo_penguin","GitHub,Jira,Datadog",2022,TypeScript,Deno,generally_available,false +shipping-calculator-phoenix,Shipping rate calculation service,Logistics Lions,tier_2,"shipping_calculator,phoenix,shipping_phoenix","GitHub,New Relic,Datadog",2021,Python,Django,beta,false +return-dingo,Returns and refunds processing,Customer Champions,tier_2,"returns_dingo,dingo,return_processor","GitHub,Zendesk,Datadog",2023,Ruby,Rails,generally_available,false +wishlist-whale,Wishlist management service,Feature Foxes,tier_3,"wishlist_whale,whale,wish_service","GitHub,Jira,Datadog",2022,Rust,Rocket,alpha,false +review-rhino,Product review management,Content Crew,tier_2,"review_rhino,rhino,review_service","GitHub,Elasticsearch,Datadog",2021,Go,FastHTTP,beta,false +cart-abandonment-koala,Cart abandonment recovery service,Revenue Rabbits,tier_2,"cart_koala,koala,abandonment_service","GitHub,SendGrid,Datadog",2022,Python,Django,beta,false +content-kangaroo,Content management system,Content Crew,tier_2,"content_kangaroo,kangaroo,cms_service","GitHub,Contentful,Datadog",2020,Rust,Rocket,alpha,false +user-preferences-panda,User settings and preferences service,Feature Foxes,tier_3,"user_preferences,panda,preferences_service","GitHub,Redis,Datadog",Go,FastHTTP,2022,beta,false +product-comparison-cobra,Product comparison engine,Catalog Cowboys,tier_3,"comparison_cobra,cobra,product_compare","GitHub,Elasticsearch,Datadog",2021,TypeScript,Deno,generally_available,false +checkout-cheetah,Fast checkout processing service,Money Mavericks,tier_1,"checkout_cheetah,cheetah,fast_checkout","GitHub,PagerDuty,New Relic",2020,Python,Django,beta,true +delivery-tracker-dolphin,Delivery status tracking service,Shipping Sharks,tier_2,"delivery_tracker,dolphin,tracker_dolphin","GitHub,Twilio,Datadog",2021,Ruby,Rails,generally_available,false +subscription-sloth,Subscription management service,Revenue Rabbits,tier_2,"subscription_sloth,sloth,sub_service","GitHub,Stripe,Datadog",2022,Rust,Rocket,alpha,false +inventory-snapshot,Inventory backup service,Stock Whisperers,tier_3,"inv_snapshot,snapshot,inventory_backup","GitHub,S3,Datadog",2021,Go,FastHTTP,beta,false +marketing-meerkat,Marketing automation service,Growth Gorillas,tier_2,"marketing_meerkat,meerkat,mkt_automation","GitHub,Mailchimp,Datadog",2022,TypeScript,Deno,generally_available,false +customer-segmentation-squid,Customer segmentation service,Data Wizards,tier_2,"segmentation_squid,squid,customer_segments","GitHub,Snowflake,Datadog",2023,Python,Django,beta,false +gift-card-gopher,Gift card management service,Money Mavericks,tier_2,"gift_card_gopher,gopher,gc_service","GitHub,Redis,Datadog",2021,Ruby,Rails,generally_available,false +address-validator-armadillo,Address validation service,Logistics Lions,tier_3,"address_validator,armadillo,address_service","GitHub,Google Maps API,Datadog",2022,Rust,Rocket,alpha,true +product-bundle-beaver,Product bundling service,Catalog Cowboys,tier_2,"bundle_beaver,beaver,product_bundles","GitHub,Redis,Datadog",2023,Go,FastHTTP,beta,false +tax-calculator-turtle,Tax computation service,Money Mavericks,tier_1,"tax_calculator,turtle,tax_service","GitHub,PagerDuty,Avalara",2021,TypeScript,Deno,generally_available,false +vendor-portal-vulture,Vendor management platform,Supplier Squad,tier_2,"vendor_portal,vulture,vendor_management","GitHub,Jira,Datadog",2022,Python,Django,beta,false +session-management-salamander,User session handling service,Security Pandas,tier_1,"session_management,salamander,session_handler","GitHub,PagerDuty,Redis",2020,Ruby,Rails,generally_available,false +product-search-sphinx,Product search service,Data Wizards,tier_1,"search_sphinx,sphinx,product_search","GitHub,PagerDuty,Elasticsearch",2021,Rust,Rocket,alpha,false +loyalty-program-lion,Customer loyalty service,Revenue Rabbits,tier_2,"loyalty_lion,lion,loyalty_service","GitHub,Redis,Datadog",2022,Go,FastHTTP,beta,false +invoice-generator-iguana,Invoice creation service,Money Mavericks,tier_2,"invoice_iguana,iguana,invoice_gen","GitHub,DocuSign,Datadog",2021,TypeScript,Deno,generally_available,false +return-label-lemur,Return shipping label generator,Logistics Lions,tier_2,"return_label,lemur,label_service","GitHub,ShipEngine,Datadog",2022,Python,Django,beta,false +size-guide-swan,Product size recommendation service,Experience Engineers,tier_3,"size_guide,swan,size_recommendation","GitHub,TensorFlow,Datadog",2023,Ruby,Rails,generally_available,false +moonshot,Experimental features platform,Innovation Iguanas,tier_3,"moon,moonshot_platform,experimental","GitHub,LaunchDarkly,Datadog",2023,Rust,Rocket,alpha,false +customer-feedback-ferret,Customer feedback collection service,Support Unicorns,tier_3,"feedback_ferret,ferret,feedback_service","GitHub,SurveyMonkey,Datadog",2022,Go,FastHTTP,beta,false +promo-code-parrot,Promotional code validation service,Deal Dragons,tier_2,"promo_parrot,parrot,promo_service","GitHub,Redis,Datadog",2021,TypeScript,Deno,generally_available,false +inventory-insights,Inventory analytics service,Stock Whisperers,tier_2,"inv_insights,insights,inventory_analytics","GitHub,Tableau,Datadog",2022,Python,Django,beta,false +warehouse-walrus,Warehouse space optimization service,Logistics Lions,tier_2,"warehouse_walrus,walrus,space_optimizer","GitHub,TensorFlow,Datadog",2023,Ruby,Rails,generally_available,false +product-recommendation-raptor,Product recommendation engine,Data Wizards,tier_2,"recommendation_raptor,raptor,rec_engine","GitHub,TensorFlow,Datadog",2022,Rust,Rocket,alpha,false +shipping-rate-shark,Shipping cost optimization service,Logistics Lions,tier_2,"shipping_shark,shark,rate_optimizer","GitHub,Redis,Datadog",2021,Go,FastHTTP,beta,false +inventory-allocation-ant,Inventory distribution service,Stock Whisperers,tier_2,"allocation_ant,ant,inventory_distributor","GitHub,Redis,Datadog",2022,TypeScript,Deno,generally_available,false +customer-journey-jaguar,Customer journey tracking service,Experience Engineers,tier_2,"journey_jaguar,jaguar,customer_journey","GitHub,Segment,Datadog",2023,Python,Django,beta,false +order-routing,Order distribution service,Shipping Sharks,tier_1,"routing_octopus,octopus,order_router","GitHub,PagerDuty,Datadog",2021,Rust,Rocket,alpha,false +product-category-cougar,Category management service,Catalog Cowboys,tier_2,"category_cougar,cougar,category_manager","GitHub,Elasticsearch,Datadog",2022,Go,FastHTTP,beta,false +shipping-label-snake,Shipping label generation service,Logistics Lions,tier_2,"label_snake,snake,label_generator","GitHub,ShipEngine,Datadog",2021,TypeScript,Deno,generally_available,false +customer-support-ticketing,Support ticket management service,Support Unicorns,tier_2,"support_tickets,ticketing,ticket_manager","GitHub,Zendesk,Datadog",2022,Python,Django,beta,false +vendor-integration-viper,Vendor API integration service,Supplier Squad,tier_2,"integration_viper,viper,vendor_integration","GitHub,Kong,Datadog",2023,Ruby,Rails,generally_available,false +product-import-platypus,Product data import service,Catalog Cowboys,tier_2,"import_platypus,platypus,product_importer","GitHub,RabbitMQ,Datadog",2022,Rust,Rocket,alpha,false +order-history-hawk,Order history service,Data Nomads,tier_2,"history_hawk,hawk,order_history","GitHub,MongoDB,Datadog",2021,Go,FastHTTP,beta,false +cart-recovery-crab,Abandoned cart recovery service,Revenue Rabbits,tier_2,"recovery_crab,crab,cart_recovery","GitHub,SendGrid,Datadog",2022,TypeScript,Deno,generally_available,false +payment-gateway-gorilla,Payment processor integration,Money Mavericks,tier_1,"gateway_gorilla,gorilla,payment_gateway","GitHub,PagerDuty,Stripe",2021,Python,Django,beta,false +user-activity-tracker,User behavior analytics service,Data Wizards,tier_2,"activity_tracker,tracker,user_analytics","GitHub,Snowplow,Datadog",2022,Ruby,Rails,generally_available,false +email-template-eagle,Email template management service,Comms Cobras,tier_3,"template_eagle,eagle,email_templates","GitHub,SendGrid,Datadog",2023,Rust,Rocket,alpha,false +product-availability-aardvark,Stock availability service,Stock Whisperers,tier_2,"availability_aardvark,aardvark,stock_checker","GitHub,Redis,Datadog",2022,Go,FastHTTP,beta,false +delivery-date-predictor,Delivery estimation service,Logistics Lions,tier_2,"date_predictor,predictor,delivery_estimates","GitHub,ML Engine,Datadog",2021,TypeScript,Deno,generally_available,false +inventory-restock,Restock alert service,Stock Whisperers,tier_2,"restock_ibis,ibis,restock_alerts","GitHub,RabbitMQ,Datadog",2023,Ruby,Rails,generally_available,false +price-comparison-peacock,Price comparison service,Price Pirates,tier_2,"comparison_peacock,peacock,price_compare","GitHub,Redis,Datadog",2022,Rust,Rocket,alpha,false +order-validation-owl,Order validation service,Shipping Sharks,tier_1,"validation_owl,owl,order_validator","GitHub,PagerDuty,Datadog",2021,Go,FastHTTP,beta,false +product-feed-fox,Product feed management service,Catalog Cowboys,tier_2,"feed_fox,fox,product_feeds","GitHub,RabbitMQ,Datadog",2022,TypeScript,Deno,generally_available,false +inventory-sync,Inventory synchronization service,Stock Whisperers,tier_2,"sync_impala,impala,inventory_sync","GitHub,Kafka,Datadog",2022,Rust,Rocket,generally_available,false +internal-tools,Internal Tools,Internal Tools,tier_3,"internal-tools,internal_tools","Datadog",2022,Go,Cobra,generally_available,false +employee-directory,Internal employee directory,Internal Tools,tier_3,"directory",,2022,,,generally_available,false +certificate-manager,Internal certificate provisioning,Internal Tools,tier_4,"cert-manager",,2022,,,beta,false diff --git a/modules/demo_account/services.tf b/modules/demo_account/services.tf index 3442002..95f6aad 100644 --- a/modules/demo_account/services.tf +++ b/modules/demo_account/services.tf @@ -18,7 +18,7 @@ module "services_from_csv" { framework = each.value.framework language = each.value.language lifecycle_alias = each.value.lifecycle - owner = each.value.team_owner + owner = module.teams_from_csv[each.key].this.id tier_alias = each.value.tier tags = ["db:mysql", "k8s:true", "build_speed:fast"] tools = [ @@ -32,3 +32,48 @@ module "services_from_csv" { repositories = local.repository properties = local.properties } + +module "teams_from_csv" { + for_each = { for svc in local.csv_services : svc.service_name => svc } + + source = "../team" + + name = each.value.team_owner + parent = module.company-all.this.id +} + +resource "terraform_data" "deploy_data" { + for_each = { for svc in local.csv_services : svc.service_name => svc if svc.deploys == "true" } + depends_on = [module.deploys] + + provisioner "local-exec" { + on_failure = continue + command = < svc if svc.deploys == "true" } + depends_on = [module.rollbacks] + + provisioner "local-exec" { + on_failure = continue + command = < svc if svc.deploys == "true" } + depends_on = [module.terraform] + + provisioner "local-exec" { + on_failure = continue + command = <