Skip to content

Commit

Permalink
Merge pull request #965 from hashicorp/brandonc/prep_047_release
Browse files Browse the repository at this point in the history
Prep v0.47.0 release
  • Loading branch information
brandonc committed Jul 18, 2023
2 parents d590b0b + 4e22f7a commit 162db38
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Unreleased
## v0.47.0 (July 18, 2023)

FEATURES:
* **New Resource**: `d/tfe_saml_settings` is a new data source to retrieve SAML settings from the Admin API, by @karvounis-form3 [952](https://github.com/hashicorp/terraform-provider-tfe/pull/952)
* **New Data Source**: `d/tfe_saml_settings` is a new data source to retrieve SAML settings from the Terraform Enterprise Admin API, by @karvounis-form3 [952](https://github.com/hashicorp/terraform-provider-tfe/pull/952)

BUG FIXES:
* `d/tfe_project`: Ignore case when matching project name from Projects List API, by @jbonhag [958](https://github.com/hashicorp/terraform-provider-tfe/pull/958)
Expand Down
5 changes: 2 additions & 3 deletions tfe/data_source_saml_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package tfe
import (
"context"
"fmt"

"github.com/hashicorp/go-tfe"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
Expand Down Expand Up @@ -140,6 +141,7 @@ func (d *dataSourceTFESAMLSettings) Read(ctx context.Context, _ datasource.ReadR
s, err := d.client.Admin.Settings.SAML.Read(ctx)
if err != nil {
resp.Diagnostics.AddError("Unable to read SAML settings", err.Error())
return
}

// Set state
Expand All @@ -164,7 +166,4 @@ func (d *dataSourceTFESAMLSettings) Read(ctx context.Context, _ datasource.ReadR
Certificate: types.StringValue(s.Certificate),
})
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
return
}
}
22 changes: 19 additions & 3 deletions website/docs/d/saml_settings.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,33 @@ description: |-

# Data Source: tfe_saml_settings

Use this data source to get information about SAML Settings.
Use this data source to get information about SAML Settings. It applies only to Terraform Enterprise and requires admin token configuration. See example usage for incorporating an admin token in your provider config.


## Example Usage

Basic usage:

```hcl
data "tfe_saml_settings" "foo" {}
provider "tfe" {
hostname = var.hostname
token = var.token
}
provider "tfe" {
alias = "admin"
hostname = var.hostname
token = var.admin_token
}
data "tfe_saml_settings" "foo" {
provider = tfe.admin
}
```

## Argument Reference

No arguments are required for this datasource.
No arguments are required for this data source.

## Attributes Reference

Expand Down

0 comments on commit 162db38

Please sign in to comment.