-
Notifications
You must be signed in to change notification settings - Fork 4
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 data source #88
Conversation
internal/provider/datasources/data_source_cluster_options_test.go
Outdated
Show resolved
Hide resolved
.github/workflows/testacc.yml
Outdated
@@ -90,6 +90,7 @@ jobs: | |||
ASTRO_API_HOST: https://api.astronomer-dev.io | |||
SKIP_CLUSTER_RESOURCE_TESTS: ${{ env.SKIP_CLUSTER_RESOURCE_TESTS }} | |||
HOSTED_TEAM_ID: clwbclrc100bl01ozjj5s4jmq | |||
TF_HOSTED_TEAM_ID: clx44rvzr01nc01o06pze6qb7 |
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.
can we use the same team_id as the one above instead of adding a new env var in the meantime (before we convert to terraform-only orgs)
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.
i can remove these env vars for now - i'm still using the hosted team id ones
internal/utils/test.go
Outdated
@@ -105,3 +106,93 @@ func GetDataSourcesLength(state *terraform.State, tfVarName, dataSourceName stri | |||
|
|||
return instanceState, numAttribute, nil | |||
} | |||
|
|||
func TestCheckResourceAttrExists(name, key string, isOptional bool) resource.TestCheckFunc { |
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.
let's remove these functions since it doesn't offer too much
if an optional value is set or not set shouldn't be a huge test case for us
furthermore the code seems rather unmaintainable for us and i prefer not to have too many internal detail code in our repo
i do appreciate the level of effort though to get something like this working so kudos!
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.
sounds good!
) | ||
|
||
func TestAcc_DataSourceTeam(t *testing.T) { | ||
teamId := os.Getenv("HOSTED_TEAM_ID") |
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.
once we add team resource we should create a team using it instead of an existing team
Co-authored-by: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-authored-by: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
…omer/astronomer-terraform-provider into 67-add-team-and-teams-data-source
Description
""
🎟 Issue(s)
#67
🧪 Functional Testing
Can get a team and output its value:
Can get all teams and output their values:
📸 Screenshots
📋 Checklist
examples/
directory