-
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 workspaces data source (v1beta1 list workspaces equivalent) #6
Changes from all commits
2c8451e
815d1b8
638a320
58804f7
c2d2c80
b30375d
b5a6a5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
|
||
<!-- | ||
A clear and concise description of what the bug is. | ||
On errors, please provide the output of the console | ||
--> | ||
|
||
``` | ||
Please paste terminal or playground output in a code block here | ||
``` | ||
|
||
**What Terraform Provider Version and Terraform Version did you experience this bug?** | ||
|
||
<!-- | ||
Run the command `astro version` to get the cli version | ||
--> | ||
|
||
|
||
**What Operating System is the above Terraform Provider installed on?** | ||
|
||
**🪜 Steps To Reproduce** | ||
|
||
<!-- | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
--> | ||
|
||
**📸 Screenshots** | ||
|
||
<!-- | ||
If applicable, add screenshots to help explain your problem. | ||
--> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
- [ ] I have checked that a similar [feature request](https://github.com/astronomer/astronomer-terraform-provider/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist. | ||
|
||
**✍️ Is your feature request related to a problem? Please describe.** | ||
|
||
<!-- | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
--> | ||
|
||
**🧩 Describe the solution you'd like** | ||
|
||
<!-- | ||
A clear and concise description of what you want to happen. | ||
--> | ||
|
||
**🤔 Describe alternatives you've considered** | ||
|
||
<!-- | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
--> | ||
|
||
**💡 Additional context** | ||
|
||
<!-- | ||
Add any other context or screenshots about the feature request here. | ||
--> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "astronomer_workspaces Data Source - astronomer" | ||
subcategory: "" | ||
description: |- | ||
Workspaces data source | ||
--- | ||
|
||
# astronomer_workspaces (Data Source) | ||
|
||
Workspaces data source | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `names` (List of String) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this supposed to be list of workspace names? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep that you can query if you want |
||
- `workspace_ids` (List of String) | ||
|
||
### Read-Only | ||
|
||
- `workspaces` (Attributes List) (see [below for nested schema](#nestedatt--workspaces)) | ||
|
||
<a id="nestedatt--workspaces"></a> | ||
### Nested Schema for `workspaces` | ||
|
||
Required: | ||
|
||
- `id` (String) Workspace identifier | ||
|
||
Read-Only: | ||
|
||
- `cicd_enforced_default` (Boolean) Whether new Deployments enforce CI/CD deploys by default | ||
- `created_at` (String) Workspace creation timestamp | ||
- `created_by` (Attributes) Workspace creator (see [below for nested schema](#nestedatt--workspaces--created_by)) | ||
- `description` (String) Workspace description | ||
- `name` (String) Workspace name | ||
- `organization_name` (String) Workspace organization name | ||
- `updated_at` (String) Workspace last updated timestamp | ||
- `updated_by` (Attributes) Workspace updater (see [below for nested schema](#nestedatt--workspaces--updated_by)) | ||
|
||
<a id="nestedatt--workspaces--created_by"></a> | ||
### Nested Schema for `workspaces.created_by` | ||
|
||
Read-Only: | ||
|
||
- `api_token_name` (String) | ||
- `avatar_url` (String) | ||
- `full_name` (String) | ||
- `id` (String) | ||
- `subject_type` (String) | ||
- `username` (String) | ||
|
||
|
||
<a id="nestedatt--workspaces--updated_by"></a> | ||
### Nested Schema for `workspaces.updated_by` | ||
|
||
Read-Only: | ||
|
||
- `api_token_name` (String) | ||
- `avatar_url` (String) | ||
- `full_name` (String) | ||
- `id` (String) | ||
- `subject_type` (String) | ||
- `username` (String) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,11 @@ func (d *workspaceDataSource) Read( | |
} | ||
|
||
// Populate the model with the response data | ||
data.ReadFromResponse(ctx, workspace.JSON200) | ||
diags := data.ReadFromResponse(ctx, workspace.JSON200) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is notice this being referenced and used a lot There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. workspace is the response object from the API client, workspace.JSON200 gives us the we use a different client here than we do for the component tests, which is why there are these syntax differences |
||
if diags.HasError() { | ||
resp.Diagnostics.Append(diags...) | ||
return | ||
} | ||
|
||
// Save data into Terraform state | ||
resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) | ||
|
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.
should this be astronomer/astro since the provider is for astro the product?
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.
sure we can change it
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.
what do you think @sunkickr ?
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.
astronomer/astro
makes more sense to me as well