-
Notifications
You must be signed in to change notification settings - Fork 18
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 team and teams datasources #129
Conversation
@sofuture - Great, thanks! What's needed to complete this work / get this merged+released? |
@splittingred a few things -- I'll take a look at teams acceptance tests shortly. |
c8a4ba3
to
70541ed
Compare
This reverts commit 0a7fe9a.
update changelog fix team tests add test for teams datasource query
70541ed
to
68f6d60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified that this is working locally
terraform {
required_providers {
firehydrant = {
source = "firehydrant/firehydrant"
version = "0.1.4"
}
}
}
provider "firehydrant" {
api_key = "fhb-youwish"
firehydrant_base_url = "https://api.local.firehydrant.io/v1/"
}
data "firehydrant_teams" "all_teams" {
}
data "firehydrant_teams" "test_teams" {
query = "Test"
}
{
"version": 4,
"terraform_version": "1.5.4",
"serial": 2,
"lineage": "2edce89a-0660-d597-2d6c-113fc6dfc443",
"outputs": {},
"resources": [
{
"mode": "data",
"type": "firehydrant_teams",
"name": "all_teams",
"provider": "provider[\"registry.terraform.io/firehydrant/firehydrant\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "does-not-matter",
"query": null,
"teams": [
{
"description": "",
"id": "c4e2fa1d-7d57-456c-8401-2019b0b2ebcc",
"name": "Firefighters",
"owned_service_ids": [],
"service_ids": [],
"slug": "firefighters"
},
{
"description": "This team does it all.",
"id": "ef32c1a7-a292-4271-b137-5351a687cb6c",
"name": "Frontend",
"owned_service_ids": [],
"service_ids": [],
"slug": "frontend"
},
{
"description": "This team does it all.",
"id": "a7dcb2a9-133d-4757-aaa1-3277840b5276",
"name": "Infrastructure SREs",
"owned_service_ids": [],
"service_ids": [],
"slug": "infrastructure-sres"
},
{
"description": "This team does it all.",
"id": "ebba30cf-a4f4-4ff8-9568-a078cc32281a",
"name": "Laddertruck SREs",
"owned_service_ids": [],
"service_ids": [],
"slug": "laddertruck-sres"
},
{
"description": "",
"id": "82ca3ae5-f357-48ce-9165-28f702affd07",
"name": "Test",
"owned_service_ids": [],
"service_ids": [],
"slug": "test"
}
]
},
"sensitive_attributes": []
}
]
},
{
"mode": "data",
"type": "firehydrant_teams",
"name": "test_teams",
"provider": "provider[\"registry.terraform.io/firehydrant/firehydrant\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "does-not-matter",
"query": "Test",
"teams": [
{
"description": "",
"id": "82ca3ae5-f357-48ce-9165-28f702affd07",
"name": "Test",
"owned_service_ids": [],
"service_ids": [],
"slug": "test"
}
]
},
"sensitive_attributes": []
}
]
}
],
"check_results": null
}
Description
@splittingred this is the changes from #121 -- there were a variety of issues with the integration tests, and 2 missing lines in
provider/provider.go
(now added). We can get the fixes in here, and then merge back.