Skip to content

Commit

Permalink
Disable & remove region config
Browse files Browse the repository at this point in the history
This is not implemented in the underlying TF provider so causes an exception.
The tests only pass because they don't pass the CI env down to the test environment.
  • Loading branch information
danielrbradley committed Jun 20, 2024
1 parent cdd90be commit 98bd5de
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .ci-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
provider: xyz

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (ubuntu-latest)

Python release verification missing

Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi python project to preview.

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (ubuntu-latest)

Dotnet release verification missing

Add the key releaseVerification.dotnet to .ci-mgmt.yaml pointing to the directory containing a Pulumi dotnet project to preview.

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (ubuntu-latest)

Go release verification missing

Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi go project to preview.

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (windows-latest)

Go release verification missing

Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi go project to preview.

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (windows-latest)

Dotnet release verification missing

Add the key releaseVerification.dotnet to .ci-mgmt.yaml pointing to the directory containing a Pulumi dotnet project to preview.

Check warning on line 1 in .ci-mgmt.yaml

View workflow job for this annotation

GitHub Actions / verify-release / verify-release (windows-latest)

Python release verification missing

Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi python project to preview.
env:
PULUMI_MISSING_DOCS_ERROR: true
XYZ_REGION: "us-west-2"
# XYZ_REGION: "us-west-2"
makeTemplate: bridged
pulumiConvert: 1
goBuildParallelism: 2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
PROVIDER_VERSION: ${{ inputs.version }}

jobs:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
command-dispatch-for-testing:
name: command-dispatch-for-testing
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2

jobs:
license_check:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2

jobs:
lint:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
prerequisites:
uses: ./.github/workflows/prerequisites.yml
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
prerequisites:
uses: ./.github/workflows/prerequisites.yml
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2

jobs:
prerequisites:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
comment-on-pr:
if: github.event.pull_request.head.repo.full_name != github.repository
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
prerequisites:
uses: ./.github/workflows/prerequisites.yml
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/resync-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2
jobs:
resync_build:
name: resync-build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2

# This should cancel any previous runs of the same workflow on the same branch which are still running.
concurrency:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/verify-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TF_APPEND_USER_AGENT: pulumi
XYZ_REGION: us-west-2

jobs:
verify-release:
Expand Down
15 changes: 8 additions & 7 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ func Provider() tfbridge.ProviderInfo {
GitHubOrg: "",
UpstreamRepoPath: "github.com/iwahbe/terraform-provider-xyz",
MetadataInfo: tfbridge.NewProviderMetadata(metadata),
Config: map[string]*tfbridge.SchemaInfo{
"region": {
Type: tfbridge.MakeResource(mainPkg, "region", "Region"),
Default: &tfbridge.DefaultInfo{
EnvVars: []string{"XYZ_REGION", "XYZ_DEFAULT_REGION"},
},
},
Config: map[string]*tfbridge.SchemaInfo{
// TODO: Implement region in the upstream provider so it doesn't error when set.
// "region": {
// Type: tfbridge.MakeResource(mainPkg, "region", "Region"),
// Default: &tfbridge.DefaultInfo{
// EnvVars: []string{"XYZ_REGION", "XYZ_DEFAULT_REGION"},
// },
// },
},
PreConfigureCallback: preConfigureCallback,
Resources: map[string]*tfbridge.ResourceInfo{
Expand Down

0 comments on commit 98bd5de

Please sign in to comment.