Skip to content
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 Grafana service account #38101

Merged
merged 31 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
715bfff
Setup workspace_service_account resource
bonclay7 Jun 22, 2024
3a02995
Implement create, read and delete
bonclay7 Jun 22, 2024
d1243a5
Rename typo
bonclay7 Jun 22, 2024
9de6680
Compile resource
bonclay7 Jun 23, 2024
a021f10
Add validation for Grafana role
bonclay7 Jun 23, 2024
bc6cff9
Add pagination for list, align schema with grafana api
bonclay7 Jun 23, 2024
6ba9b54
Fix acceptance tests
bonclay7 Jun 24, 2024
d78b3e5
Add doc
bonclay7 Jun 24, 2024
a27d8cb
Lint doc and code
bonclay7 Jun 24, 2024
70e9250
Lint doc and code
bonclay7 Jun 24, 2024
6a94b7b
Refactor and rename
bonclay7 Jun 25, 2024
c09bb4e
fixup! Refactor and rename
bonclay7 Jun 25, 2024
94f1141
remove unnecessary leading space
bonclay7 Jun 26, 2024
c16045c
Add schema validators
bonclay7 Jun 27, 2024
a72a23a
Optimize tests
bonclay7 Jun 27, 2024
65e029f
Clean docs
bonclay7 Jun 27, 2024
1f51bc6
Update docs
bonclay7 Jun 27, 2024
3b62fa3
Adding service account token
bonclay7 Jun 27, 2024
b62c77c
fixup! Adding service account token
bonclay7 Jun 27, 2024
47c7d7a
Drop dead code
bonclay7 Jun 27, 2024
6b89e4c
Remove 'workspace_id' constant.
ewbankkit Jul 12, 2024
a75d8e4
Merge branch 'main' into HEAD
ewbankkit Jul 12, 2024
e7a6a6d
Add CHANGELOG entries.
ewbankkit Jul 12, 2024
6db522d
r/aws_grafana_workspace_service_account: Tidy up.
ewbankkit Jul 12, 2024
1e5ab73
r/aws_grafana_workspace_service_account_token: Tidy up.
ewbankkit Jul 12, 2024
2e1b4e1
Fixes after some testing.
ewbankkit Jul 12, 2024
140f97c
Run 'make fix-constants PKG=grafana'.
ewbankkit Jul 12, 2024
7b96b4f
Fix typos.
ewbankkit Jul 12, 2024
b796cba
More fixes after testing.
ewbankkit Jul 12, 2024
da430af
r/aws_grafana_workspace_service_account_token: Fix acceptance test co…
ewbankkit Jul 12, 2024
9b3012d
r/aws_grafana_workspace_service_account_token: Tweak documentation ex…
ewbankkit Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .ci/.semgrep-constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3435,3 +3435,18 @@ rules:
- pattern-not-inside: 'provider.ConflictingEndpointsWarningDiag(...)'
severity: ERROR
fix: "names.AttrWeight"

- id: literal-workspace_id-string-constant
languages: [go]
message: Use the constant `names.AttrWorkspaceID` for the string literal "workspace_id"
paths:
include:
- "internal/service/**/*.go"
patterns:
- pattern: '"workspace_id"'
- pattern-not-regex: '"workspace_id":\s+test\w+,'
- pattern-not-inside: 'config.Variables{ ... }'
- pattern-not-inside: 'packageName = ...'
- pattern-not-inside: 'provider.ConflictingEndpointsWarningDiag(...)'
severity: ERROR
fix: "names.AttrWorkspaceID"
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/fms v1.34.1
github.com/aws/aws-sdk-go-v2/service/glacier v1.23.1
github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.25.1
github.com/aws/aws-sdk-go-v2/service/grafana v1.23.1
github.com/aws/aws-sdk-go-v2/service/groundstation v1.28.1
github.com/aws/aws-sdk-go-v2/service/guardduty v1.44.1
github.com/aws/aws-sdk-go-v2/service/healthlake v1.25.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ github.com/aws/aws-sdk-go-v2/service/glacier v1.23.1 h1:nUOHgAUOnQth5+fMWgCQiOEq
github.com/aws/aws-sdk-go-v2/service/glacier v1.23.1/go.mod h1:29ythAZEVnLPIOCpzENgCzvZLoAHt8S8BHryPpm8EyI=
github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.25.1 h1:7C51ZbOLStv+VJwdiKGzJeKK0LPX6+XTJv199Q9xe0U=
github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.25.1/go.mod h1:VSQN6t3mMZfL/CEC2sg+MaSDv7A9sTFFhIB82k7zexA=
github.com/aws/aws-sdk-go-v2/service/grafana v1.23.1 h1:J1nNR2/admfa8nDN178GQM3nIv0rrpZylP6/N/llWAg=
github.com/aws/aws-sdk-go-v2/service/grafana v1.23.1/go.mod h1:6/0Jo9jruzMV1rlBnvQZxxLECA50Roq9EaASk6eGpOw=
github.com/aws/aws-sdk-go-v2/service/groundstation v1.28.1 h1:XTtOVIG/v1yaff76zGqNLB9LDW/+hY7dQTuwvh4y5Qo=
github.com/aws/aws-sdk-go-v2/service/groundstation v1.28.1/go.mod h1:GF6S/WXbeYIIdbsIAKsYdEvndnn8wksiolvsk27TaBo=
github.com/aws/aws-sdk-go-v2/service/guardduty v1.44.1 h1:0LOU9mO7AI2rjuuO9p8iymDR3jhY91d+P7XEjJkaa7w=
Expand Down
5 changes: 5 additions & 0 deletions internal/conns/awsclient_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions internal/service/grafana/exports_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package grafana

// Exports for use in tests only.
var (
ResourceWorkspaceServiceAccount = newResourceWorkspaceServiceAccount

FindWorkspaceServiceAccount = findWorkspaceServiceAccount
)
1 change: 1 addition & 0 deletions internal/service/grafana/generate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

//go:generate go run ../../generate/tags/main.go -AWSSDKVersion=2
//go:generate go run ../../generate/tags/main.go -ListTags -ServiceTagsMap -UpdateTags
//go:generate go run ../../generate/servicepackage/main.go
// ONLY generate directives and package declaration! Do not add anything else to this file.
Expand Down
70 changes: 70 additions & 0 deletions internal/service/grafana/service_endpoint_resolver_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

169 changes: 147 additions & 22 deletions internal/service/grafana/service_endpoints_gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading