fix: pipeline fixes
[skip ci]
This commit is contained in:
parent
8c490da5ce
commit
0ba4612438
4 changed files with 11 additions and 8 deletions
4
.github/actions/acc_test/action.yaml
vendored
4
.github/actions/acc_test/action.yaml
vendored
|
|
@ -192,7 +192,7 @@ runs:
|
|||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test ${{ inputs.test_file }} -count=1 -timeout=30m
|
||||
env:
|
||||
TF_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_REGION: ${{ inputs.region }}
|
||||
TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }}
|
||||
TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }}
|
||||
|
|
@ -220,7 +220,7 @@ runs:
|
|||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test ./... -count=1 -timeout=30m
|
||||
env:
|
||||
TF_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_REGION: ${{ inputs.region }}
|
||||
TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }}
|
||||
TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }}
|
||||
|
|
|
|||
2
.github/workflows/tf-acc-test.yaml
vendored
2
.github/workflows/tf-acc-test.yaml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
uses: ./.github/actions/acc_test
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
project_id: ${{ vars.TEST_PROJECT_ID }}
|
||||
project_id: ${{ vars.TF_ACC_PROJECT_ID }}
|
||||
region: 'eu01'
|
||||
service_account_json_content_b64: "${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON_B64 }}"
|
||||
project_user_email: ${{ vars.TEST_PROJECT_USER_EMAIL }}
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ func (r *instanceResource) Create(
|
|||
|
||||
ctx = core.InitProviderContext(ctx)
|
||||
|
||||
projectId := model.ProjectId.ValueString()
|
||||
projectID := model.ProjectId.ValueString()
|
||||
region := model.Region.ValueString()
|
||||
ctx = tflog.SetField(ctx, "project_id", projectId)
|
||||
ctx = tflog.SetField(ctx, "project_id", projectID)
|
||||
ctx = tflog.SetField(ctx, "region", region)
|
||||
|
||||
var netAcl []string
|
||||
|
|
@ -214,7 +214,7 @@ func (r *instanceResource) Create(
|
|||
// Create new instance
|
||||
createResp, err := r.client.DefaultAPI.CreateInstanceRequest(
|
||||
ctx,
|
||||
projectId,
|
||||
projectID,
|
||||
region,
|
||||
).CreateInstanceRequestPayload(payload).Execute()
|
||||
if err != nil {
|
||||
|
|
@ -231,7 +231,7 @@ func (r *instanceResource) Create(
|
|||
|
||||
// Set data returned by API in identity
|
||||
identity := InstanceResourceIdentityModel{
|
||||
ProjectID: types.StringValue(projectId),
|
||||
ProjectID: types.StringValue(projectID),
|
||||
Region: types.StringValue(region),
|
||||
InstanceID: types.StringPointerValue(instanceID),
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ func (r *instanceResource) Create(
|
|||
return
|
||||
}
|
||||
|
||||
waitResp, err := wait.CreateInstanceWaitHandler(ctx, r.client.DefaultAPI, projectId, region, *instanceID).
|
||||
waitResp, err := wait.CreateInstanceWaitHandler(ctx, r.client.DefaultAPI, projectID, region, *instanceID).
|
||||
WaitWithContext(ctx)
|
||||
if err != nil {
|
||||
core.LogAndAddError(
|
||||
|
|
|
|||
|
|
@ -297,6 +297,9 @@ func TestAccInstanceWithUsers(t *testing.T) {
|
|||
data := getExample()
|
||||
|
||||
userName := "testUser"
|
||||
if pID, ok := os.LookupEnv("TF_ACC_PROJECT_ID"); !ok || pID == "" {
|
||||
t.Errorf("TF_ACC_PROJECT_ID is not set")
|
||||
}
|
||||
data.Users = []User{
|
||||
{
|
||||
Name: userName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue