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

[WIP] Add support Extension properties #802

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

phenixdotnet
Copy link

Hi

Please find a PR which address #737

@phenixdotnet
Copy link
Author

Actually I'm stuck with the acceptance test which return an error about delta in state after import

Here the logs

2022/05/20 13:19:09 [DEBUG] Importing Resource - parsing "f897af1f-6780-4fd3-808c-5ab9f35c97c6/extensionProperty/b6415c1f-1a26-4a2b-a6fa-d2033768d25d"
2022/05/20 13:19:09 [DEBUG] ============================ Begin AzureAD Request ============================
Request ID: 0ab96d16-1722-485a-fb2d-86b3e70dde15

GET /beta/XXXXXXXXXXXXXXXXXXXXXX/applications/f897af1f-6780-4fd3-808c-5ab9f35c97c6/extensionProperties?%24filter=id+eq+%27b6415c1f-1a26-4a2b-a6fa-d2033768d25d%27 HTTP/1.1
Host: graph.microsoft.com
User-Agent: HashiCorp Terraform/1.2.0 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azuread/acc Hamilton (Go-http-client/1.1) pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Accept: application/json; charset=utf-8; IEEE754Compatible=false
Content-Type: application/json; charset=utf-8
Odata-Maxversion: 4.0
Odata-Version: 4.0
Accept-Encoding: gzip


============================= End AzureAD Request =============================
2022/05/20 13:19:10 [DEBUG] ============================ Begin AzureAD Response ===========================
GET https://graph.microsoft.com/beta/XXXXXXXXXXXXXXXXXXXXXX/applications/f897af1f-6780-4fd3-808c-5ab9f35c97c6/extensionProperties?%24filter=id+eq+%27b6415c1f-1a26-4a2b-a6fa-d2033768d25d%27
Request ID: 0ab96d16-1722-485a-fb2d-86b3e70dde15

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache
Client-Request-Id: 10f36b6e-2e61-43b8-955d-0cacac6ac3fc
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Fri, 20 May 2022 13:19:09 GMT
Odata-Version: 4.0
Request-Id: 10f36b6e-2e61-43b8-955d-0cacac6ac3fc
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF000118A0"}}
X-Ms-Resource-Unit: 1

1c6
{"@odata.context":"https://graph.microsoft.com/beta/$metadata#applications('f897af1f-6780-4fd3-808c-5ab9f35c97c6')/extensionProperties","value":[{"id":"b6415c1f-1a26-4a2b-a6fa-d2033768d25d","deletedDateTime":null,"appDisplayName":"acctest-APP-220520131858937372","name":"extension_cdcad7ea4d3f46169132826e9a3ba3e3_acctest_APP_complete_220520131858937372","dataType":"String","isMultiValued":null,"isSyncedFromOnPremises":false,"targetObjects":["User"]}]}
0


============================= End AzureAD Response ============================
2022-05-20T13:19:10.122Z [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577
2022-05-20T13:19:10.123Z [DEBUG] sdk.helper_resource: Creating sdkv2 provider instance: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577 tf_provider_addr=registry.terraform.io/hashicorp/azuread
2022-05-20T13:19:10.123Z [DEBUG] sdk.helper_resource: Created sdkv2 provider instance: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577 tf_provider_addr=registry.terraform.io/hashicorp/azuread
2022-05-20T13:19:10.123Z [DEBUG] sdk.helper_resource: Starting sdkv2 provider instance server: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577 tf_provider_addr=registry.terraform.io/hashicorp/azuread
2022-05-20T13:19:10.123Z [DEBUG] sdk.helper_resource: Started sdkv2 provider instance server: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577 tf_provider_addr=registry.terraform.io/hashicorp/azuread
2022-05-20T13:19:10.190Z [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577
    testcase.go:60: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.

        (map[string]string) {
        }


        (map[string]string) (len=1) {
         (string) (len=14) "application_id": (string) (len=36) "f897af1f-6780-4fd3-808c-5ab9f35c97c6"
        }
2022-05-20T13:19:10.191Z [DEBUG] sdk.helper_resource: Creating sdkv2 provider instance: test_name=TestAccApplicationExtensionProperty_complete test_step_number=2 test_terraform_path=/usr/local/bin/terraform test_working_directory=/tmp/plugintest1032555577 tf_provider_addr=registry.terraform.io/hashicorp/azuread

Any help is welcome ^^'

@manicminer manicminer self-requested a review June 1, 2022 15:27
@ken5scal
Copy link

ken5scal commented Jan 4, 2023

@phenixdotnet It seems your implementation forgot to write the application_id of resources to be imported...; am I answering your concern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants