-
Notifications
You must be signed in to change notification settings - Fork 121
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
[awscc v0.34.0] awscc_networkmanager_core_network produces invalid json #695
Comments
Hi @zhujik! There are some rough edges around the 'policy_document' attribute in this resource, while we work on a more long term fix we do have a guide on how to handle this correctly that should help you get unblocked: |
Relates #509. |
@breathingdust thank you for the reply. However, I get the same error in a full setup. My initial example is just a minimal compiling example of producing the error. Here is a full example: resource "awscc_networkmanager_global_network" "cn" {
description = "Global Network"
}
resource "awscc_networkmanager_core_network" "cn" {
description = "Core Network"
global_network_id = awscc_networkmanager_global_network.cn.id
policy_document = jsonencode(jsondecode(data.aws_networkmanager_core_network_policy_document.cn.json))
}
data "aws_networkmanager_core_network_policy_document" "cn" {
core_network_configuration {
vpn_ecmp_support = false
asn_ranges = ["65012-65534"]
edge_locations {
location = "eu-west-1"
asn = 65012
}
edge_locations {
location = "eu-north-1"
asn = 65013
}
}
segments {
name = "cn"
description = "cnSegment"
require_attachment_acceptance = true
}
attachment_policies {
rule_number = 100
condition_logic = "or"
conditions {
type = "any"
}
action {
association_method = "constant"
segment = "cn"
}
}
} Produces:
So either I am missing something crucial here, or the current version is broken somehow. |
Hey, I have seen this issue and it is due to wrong formatting of the policy document. fixing it works. |
Hi: I have the same issue and I validated that the JSON provided by the data source works as expected. This is my data source definition:
Which returns the following JSON:
I get the same error: "unable to unmarshal JSON: unexpected end of JSON input" However, the JSON I got as output is correctly processed by Cloud WAN |
Hi @ewbankkit this is working with me with v0.33.0, but getting these errors in v0.34.0. |
Relates #685. |
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Terraform v1.3.2
on linux_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/zhujik/e4985d91dd915f1bca3e3db6a5102162
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
using awscc 0.34.0:
terraform plan
this does not happen in awscc 0.33.0!
Important Factoids
References
The text was updated successfully, but these errors were encountered: